autocomplete: use webbie on click for nav global contact search
This commit is contained in:
parent
9288c57bea
commit
367869ed81
2 changed files with 10 additions and 2 deletions
|
@ -104,6 +104,13 @@ function basic_replace(item) {
|
||||||
return '$1'+item.name+' ';
|
return '$1'+item.name+' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function webbie_replace(item) {
|
||||||
|
if(typeof item.replace !== 'undefined')
|
||||||
|
return '$1'+item.replace;
|
||||||
|
|
||||||
|
return '$1'+item.nick+' ';
|
||||||
|
}
|
||||||
|
|
||||||
function trim_replace(item) {
|
function trim_replace(item) {
|
||||||
if(typeof item.replace !== 'undefined')
|
if(typeof item.replace !== 'undefined')
|
||||||
return '$1'+item.replace;
|
return '$1'+item.replace;
|
||||||
|
@ -216,7 +223,7 @@ function string2bb(element) {
|
||||||
match: /(^@)([^\n]{2,})$/,
|
match: /(^@)([^\n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'contact'); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'contact'); },
|
||||||
replace: basic_replace,
|
replace: webbie_replace,
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -225,7 +232,7 @@ function string2bb(element) {
|
||||||
match: /(^!)([^\n]{2,})$/,
|
match: /(^!)([^\n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'community'); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'community'); },
|
||||||
replace: basic_replace,
|
replace: webbie_replace,
|
||||||
template: contact_format,
|
template: contact_format,
|
||||||
};
|
};
|
||||||
this.attr('autocomplete', 'off');
|
this.attr('autocomplete', 'off');
|
||||||
|
|
1
view/theme/frio
Submodule
1
view/theme/frio
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5215a9d76673e769e80beeb778fe07ad0c1a3136
|
Loading…
Reference in a new issue