aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/autocomplete.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-03-19 10:51:58 +0100
committerMario Vavti <mario@mariovavti.com>2017-03-19 10:51:58 +0100
commit2a25ddff3685502e22a7de8d30bb2c423c4d0ed1 (patch)
tree60067da32cb440f9b50fbc4a4126f89132374ea8 /view/js/autocomplete.js
parentb2ad4e8c2a41fda822fb2c52d470aaddd4dd1102 (diff)
downloadvolse-hubzilla-2a25ddff3685502e22a7de8d30bb2c423c4d0ed1.tar.gz
volse-hubzilla-2a25ddff3685502e22a7de8d30bb2c423c4d0ed1.tar.bz2
volse-hubzilla-2a25ddff3685502e22a7de8d30bb2c423c4d0ed1.zip
bs4 fixes
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r--view/js/autocomplete.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 9673312a7..e33f6192b 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -66,6 +66,10 @@ function contact_format(item) {
return "<div>" + item.text + "</div>";
}
+function smiley_format(item) {
+ return "<div class='dropdown-item'>" + item.icon + ' ' + item.text + "</div>";
+}
+
function editor_replace(item) {
if(typeof item.replace !== 'undefined') {
return '$1$2' + item.replace;
@@ -181,15 +185,16 @@ function string2bb(element) {
index: 3,
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
replace: editor_replace,
- template: contact_format,
+ template: contact_format
};
smilies = {
match: /(^|\s)(:[a-z_:]{2,})$/,
index: 2,
search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
- template: function(item) { return item.icon + item.text; },
+ //template: function(item) { return item.icon + item.text; },
replace: function(item) { return "$1" + item.text + ' '; },
+ template: smiley_format
};
this.attr('autocomplete','off');
this.textcomplete([contacts,smilies], {className:'acpopup', zIndex:1020});