diff options
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r-- | view/js/autocomplete.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 7bbcd6451..5fbdab27b 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -180,6 +180,10 @@ function string2bb(element) { */ (function( $ ) { $.fn.editor_autocomplete = function(backend_url, extra_channels) { + + if(! this.length) + return; + if (typeof extra_channels === 'undefined') extra_channels = false; // Autocomplete contacts @@ -240,6 +244,10 @@ function string2bb(element) { */ (function( $ ) { $.fn.search_autocomplete = function(backend_url) { + + if(! this.length) + return; + // Autocomplete contacts contacts = { match: /(^@)([^\n]{3,})$/, @@ -285,6 +293,10 @@ function string2bb(element) { (function( $ ) { $.fn.contact_autocomplete = function(backend_url, typ, autosubmit, onselect) { + + if(! this.length) + return; + if(typeof typ === 'undefined') typ = ''; if(typeof autosubmit === 'undefined') autosubmit = false; @@ -317,6 +329,10 @@ function string2bb(element) { (function( $ ) { $.fn.name_autocomplete = function(backend_url, typ, autosubmit, onselect) { + + if(! this.length) + return; + if(typeof typ === 'undefined') typ = ''; if(typeof autosubmit === 'undefined') autosubmit = false; @@ -349,6 +365,9 @@ function string2bb(element) { (function( $ ) { $.fn.bbco_autocomplete = function(type) { + if(! this.length) + return; + if(type=='bbcode') { var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'map', 'nobb', 'list', 'checklist', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'observer.language','embed', 'highlight', 'url', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']; var open_elements = ['observer.baseurl', 'observer.address', 'observer.photo', 'observer.name', 'observer.webname', 'observer.url', '*', 'hr', ]; |