1
1
Fork 0

Merge pull request #5210 from rabuzarus/20180613_-_frio_fix_autocompletion

Frio: fix contact filtering on contacts page
This commit is contained in:
Hypolite Petovan 2018-06-14 08:43:06 -04:00 committed by GitHub
commit 9500c1b663
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -969,6 +969,7 @@ function _contact_detail_for_template($rr)
'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']), 'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']),
'url' => $url, 'url' => $url,
'network' => ContactSelector::networkToName($rr['network'], $rr['url']), 'network' => ContactSelector::networkToName($rr['network'], $rr['url']),
'nick' => htmlentities($rr['nick']),
]; ];
} }

View file

@ -550,6 +550,10 @@ function filter_replace(item) {
this.attr('autocomplete','off'); this.attr('autocomplete','off');
var a = this.textcomplete([contacts], {className:'accontacts', appendTo: '#contact-list'}); var a = this.textcomplete([contacts], {className:'accontacts', appendTo: '#contact-list'});
if(autosubmit) {
a.on('textComplete:select', function(e,value,strategy) {submit_form(this);});
}
a.on('textComplete:select', function(e, value, strategy) { a.on('textComplete:select', function(e, value, strategy) {
$(".dropdown-menu.textcomplete-dropdown.media-list").show(); $(".dropdown-menu.textcomplete-dropdown.media-list").show();
}); });