From 367869ed81f0310bca3d69826a5a38ab41508360 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 1 May 2016 08:45:11 +0200 Subject: [PATCH] autocomplete: use webbie on click for nav global contact search --- js/autocomplete.js | 11 +++++++++-- view/theme/frio | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) create mode 160000 view/theme/frio diff --git a/js/autocomplete.js b/js/autocomplete.js index 322cc3df54..8020478722 100644 --- a/js/autocomplete.js +++ b/js/autocomplete.js @@ -104,6 +104,13 @@ function basic_replace(item) { 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) { if(typeof item.replace !== 'undefined') return '$1'+item.replace; @@ -216,7 +223,7 @@ function string2bb(element) { match: /(^@)([^\n]{2,})$/, index: 2, search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'contact'); }, - replace: basic_replace, + replace: webbie_replace, template: contact_format, }; @@ -225,7 +232,7 @@ function string2bb(element) { match: /(^!)([^\n]{2,})$/, index: 2, search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'community'); }, - replace: basic_replace, + replace: webbie_replace, template: contact_format, }; this.attr('autocomplete', 'off'); diff --git a/view/theme/frio b/view/theme/frio new file mode 160000 index 0000000000..5215a9d766 --- /dev/null +++ b/view/theme/frio @@ -0,0 +1 @@ +Subproject commit 5215a9d76673e769e80beeb778fe07ad0c1a3136 -- 2.39.5