diff options
author | zotlabs <mike@macgirvin.com> | 2018-04-08 17:30:46 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-04-08 17:30:46 -0700 |
commit | c3cd613f427b6aef483fce0c5bd1cebcefba8891 (patch) | |
tree | 504be8607f6b5021bb8c05bf865c4a572c9a27a3 /view/js/autocomplete.js | |
parent | f2078b25adc71e8c9b1b197864bbb3f4aab6fb8b (diff) | |
download | volse-hubzilla-c3cd613f427b6aef483fce0c5bd1cebcefba8891.tar.gz volse-hubzilla-c3cd613f427b6aef483fce0c5bd1cebcefba8891.tar.bz2 volse-hubzilla-c3cd613f427b6aef483fce0c5bd1cebcefba8891.zip |
extend AC
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r-- | view/js/autocomplete.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 07b9bc449..69ccd1fe5 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -243,8 +243,19 @@ function string2bb(element) { replace: basic_replace, template: contact_format, }; + + // Autocomplete forums + forums = { + match: /(^\!)([^\n]{3,})$/, + index: 2, + search: function(term, callback) { contact_search(term, callback, backend_url, 'f', [], spinelement='#nav-search-spinner'); }, + replace: basic_replace, + template: contact_format + }; + + this.attr('autocomplete', 'off'); - var a = this.textcomplete([contacts], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'}); + var a = this.textcomplete([contacts,forums], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'}); a.on('textComplete:select', function(e, value, strategy) { submit_form(this); }); }; })( jQuery ); |