3 $(document).ready(function() {
4 // Add contact_filter autocompletion to the search field
5 $("#contacts-search").contact_filter(baseurl + '/acl', 'r', true);
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
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");
16 $("#viewcontact_wrapper").show();
17 $("ul.textcomplete-dropdown").removeClass("show");