2016-04-28 15:35:33 -04:00
|
|
|
|
2017-10-20 09:21:42 -04:00
|
|
|
<script type="text/javascript">
|
2016-04-28 15:35:33 -04:00
|
|
|
$(document).ready(function() {
|
|
|
|
// Add contact_filter autocompletion to the search field
|
|
|
|
$("#contacts-search").contact_filter(baseurl + '/acl', 'r', true);
|
|
|
|
|
|
|
|
// Hide the viewcontact_wrapper if there is an input in the search field
|
|
|
|
// We are doing this to let the the contact_filter replace the original
|
|
|
|
// shown contacts
|
|
|
|
$("#contacts-search").keyup(function(){
|
|
|
|
var elText = $(this).val();
|
|
|
|
if(elText.length !== 0) {
|
|
|
|
$("#viewcontact_wrapper").hide();
|
|
|
|
$("ul.textcomplete-dropdown").addClass("show media-list");
|
|
|
|
} else {
|
|
|
|
$("#viewcontact_wrapper").show();
|
|
|
|
$("ul.textcomplete-dropdown").removeClass("show");
|
|
|
|
}
|
|
|
|
});
|
2016-08-23 10:48:13 -04:00
|
|
|
// initiale autosize for the textareas
|
|
|
|
autosize($("textarea.text-autosize"));
|
2016-04-28 15:35:33 -04:00
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|