diff --git a/amadeus/static/css/base/amadeus.css b/amadeus/static/css/base/amadeus.css index 21d489f..4794e04 100755 --- a/amadeus/static/css/base/amadeus.css +++ b/amadeus/static/css/base/amadeus.css @@ -1344,8 +1344,8 @@ div.dataTables_wrapper div.dataTables_paginate { padding: 7px 15px; } .participant .user-info .status, .modal_profile_sidebar .status { - width: 20px; - height: 20px; + width: 12px; + height: 12px; border-width: 1px; border-style: solid; border-radius: 10px; diff --git a/amadeus/static/js/chat.js b/amadeus/static/js/chat.js index 9c67d46..d4ef704 100644 --- a/amadeus/static/js/chat.js +++ b/amadeus/static/js/chat.js @@ -370,6 +370,44 @@ function getParticipants(btn) { }); } +function setSearchSubmit() { + var frm = $("#search-participants"), + content_section = frm.parent().parent().parent().parent().find('.content'); + + frm.submit(function (e) { + e.preventDefault(); + e.stopImmediatePropagation(); + + $.ajax({ + type: frm.attr('method'), + url: frm.attr('action'), + data: {'search': frm.find("input[name='search']").val()}, + success: function (response) { + + content_section.html(response); + + var items = $('#content-list').children(":visible").length; + var holder = content_section.find('.holder'); + + if (items > 10) { + holder.jPages({ + containerID : "content-list", + perPage: 10, + previous: "«", + next: "»", + midRange: 5 + }); + } + }, + error: function(data) { + setSearchSubmit(); + }, + }); + + return false; + }); +} + $('.chat-collapse').on('shown.bs.collapse', function(e) { if($(this).is(e.target)){ var li = $(".breadcrumb").find('li:last-child'); @@ -388,6 +426,8 @@ $('.chat-collapse').on('shown.bs.collapse', function(e) { var url = $(this).data('url'); + setSearchSubmit(); + $.ajax({ url: url, success: function (response) { diff --git a/chat/templates/chat/list_category.html b/chat/templates/chat/list_category.html index 6edb3bf..d0848ee 100644 --- a/chat/templates/chat/list_category.html +++ b/chat/templates/chat/list_category.html @@ -68,7 +68,7 @@