Commit e38b0106eb133d55f28817160b6655113567b3e5
Exists in
master
Merge branch 'refactoring'
Showing
4 changed files
with
8 additions
and
3 deletions
Show diff stats
amadeus/static/js/chat.js
... | ... | @@ -287,6 +287,8 @@ function setChatFormSubmit() { |
287 | 287 | var height = $(this)[0].scrollHeight; |
288 | 288 | |
289 | 289 | $(this).animate({scrollTop: height}, 0); |
290 | + | |
291 | + $(this).attr('data-url', data.load_msg_url); | |
290 | 292 | }); |
291 | 293 | |
292 | 294 | if (typeof(new_msgs[data.talk_id]) == 'undefined') { |
... | ... | @@ -345,6 +347,8 @@ function setShortChatFormSubmit() { |
345 | 347 | var height = $(this)[0].scrollHeight; |
346 | 348 | |
347 | 349 | $(this).animate({scrollTop: height}, 0); |
350 | + | |
351 | + $(this).attr('data-url', data.load_msg_url); | |
348 | 352 | }); |
349 | 353 | |
350 | 354 | if (typeof(new_msgs[data.talk_id]) == 'undefined') { | ... | ... |
chat/templates/chat/list.html
... | ... | @@ -44,7 +44,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título |
44 | 44 | </form> |
45 | 45 | </div> |
46 | 46 | <div class="col-lg-4 col-md-4 col-sm-5 col-xs-12"> |
47 | - <a href="{% url 'chat:participants_general' %}" class="pull-right btn btn-default btn-raised btn-md btn-mobile visible-xs-block visible-sm-block">{% trans 'List all participants' %}</a> | |
47 | + <a href="{% url 'chat:participants_general' %}" class="pull-right btn btn-default btn-raised btn-md btn-mobile visible-xs-block visible-sm-block visible-md visible-lg">{% trans 'List all participants' %}</a> | |
48 | 48 | </div> |
49 | 49 | </div> |
50 | 50 | </div> | ... | ... |
chat/templates/chat/list_participants.html
... | ... | @@ -46,7 +46,7 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título |
46 | 46 | </form> |
47 | 47 | </div> |
48 | 48 | <div class="col-lg-4 col-md-4 col-sm-5 col-xs-12"> |
49 | - <a href="{% url 'chat:participants_general' %}" class="pull-right btn btn-default btn-raised btn-md btn-mobile visible-xs-block visible-sm-block">{% trans 'List all participants' %}</a> | |
49 | + <a href="{% url 'chat:participants_general' %}" class="pull-right btn btn-default btn-raised btn-md btn-mobile visible-xs-block visible-sm-block visible-md visible-lg">{% trans 'List all participants' %}</a> | |
50 | 50 | </div> |
51 | 51 | </div> |
52 | 52 | </div> | ... | ... |
chat/views.py
... | ... | @@ -422,10 +422,11 @@ def render_message(request, talk_msg, talk_id, space, space_type, email): |
422 | 422 | context['talk_msg'] = msg |
423 | 423 | |
424 | 424 | form_url = reverse_lazy('chat:create', args = (), kwargs = {'email': email, 'talk_id': talk_id, 'space': space, 'space_type': space_type}) |
425 | + loading_msg = reverse_lazy('chat:load_messages', args = (msg.talk.id, )) | |
425 | 426 | |
426 | 427 | html = render_to_string("chat/_message.html", context, request) |
427 | 428 | |
428 | - return JsonResponse({'view': html, 'new_id': msg.id, 'talk_id': msg.talk.id, 'new_form_url': form_url}) | |
429 | + return JsonResponse({'view': html, 'new_id': msg.id, 'talk_id': msg.talk.id, 'new_form_url': form_url, 'load_msg_url': loading_msg}) | |
429 | 430 | |
430 | 431 | @login_required |
431 | 432 | def favorite(request, message): | ... | ... |