aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/autocomplete.js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-24 19:45:19 -0700
committerzotlabs <mike@macgirvin.com>2017-09-24 19:45:19 -0700
commit1650d79862c0e89887ede279a19c8df07fe0d927 (patch)
treed79456ec287e5627975fa0bba02fb41b148c5030 /view/js/autocomplete.js
parente8a888caabe83170ce879d7043fae188cd0fed16 (diff)
downloadvolse-hubzilla-1650d79862c0e89887ede279a19c8df07fe0d927.tar.gz
volse-hubzilla-1650d79862c0e89887ede279a19c8df07fe0d927.tar.bz2
volse-hubzilla-1650d79862c0e89887ede279a19c8df07fe0d927.zip
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.
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r--view/js/autocomplete.js12
1 files changed, 11 insertions, 1 deletions
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 );