]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/contacts-head.tpl
Merge branch 'master' of ../save/merge/frio into frio_merge
[friendica.git] / view / theme / frio / templates / contacts-head.tpl
1
2 <script>
3 $(document).ready(function() {
4         // Add contact_filter autocompletion to the search field
5         $("#contacts-search").contact_filter(baseurl + '/acl', 'r', true);
6
7         // Hide the viewcontact_wrapper if there is an input in the search field
8         // We are doing this to let the the contact_filter replace the original 
9         // shown contacts
10         $("#contacts-search").keyup(function(){
11                 var elText = $(this).val();
12                 if(elText.length !== 0) {
13                         $("#viewcontact_wrapper").hide();
14                         $("ul.textcomplete-dropdown").addClass("show media-list");
15                 } else {
16                         $("#viewcontact_wrapper").show();
17                         $("ul.textcomplete-dropdown").removeClass("show");
18                 }
19         });
20
21 });
22 </script>
23