From 1650d79862c0e89887ede279a19c8df07fe0d927 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 24 Sep 2017 19:45:19 -0700 Subject: tagging changes - provides ability to mention a forum by using !forumname as well as the traditional red style (@forumname+). This should probably not be advertised on a wide scale until after a critical mass of sites have updated to a version containing these changes. This adds yet another option type to the ACL module which probably needs refactoring soon since it is turning into option type spaghetti. --- view/js/autocomplete.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 313e501e2..1a507a28c 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -192,6 +192,16 @@ function string2bb(element) { template: contact_format }; + // Autocomplete forums + forums = { + match: /(^|\s)(\!)([^ \n]+)$/, + index: 3, + search: function(term, callback) { contact_search(term, callback, backend_url, 'f', extra_channels, spinelement=false); }, + replace: editor_replace, + template: contact_format + }; + + smilies = { match: /(^|\s)(:[a-z_:]{2,})$/, index: 2, @@ -201,7 +211,7 @@ function string2bb(element) { template: smiley_format }; this.attr('autocomplete','off'); - this.textcomplete([contacts,smilies], {className:'acpopup', zIndex:1020}); + this.textcomplete([contacts,forums,smilies], {className:'acpopup', zIndex:1020}); }; })( jQuery ); -- cgit v1.2.3