diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-07 20:38:56 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-07 20:38:56 +0100 |
commit | c9b15bbab530264c4d5e1a648fc62153843b0618 (patch) | |
tree | 1b35cec7c119624190d697de9eba4d14f6ca32da /view/js/autocomplete.js | |
parent | 9f8ce331f3661463573dac9d1bd0bf68eb15a322 (diff) | |
download | volse-hubzilla-c9b15bbab530264c4d5e1a648fc62153843b0618.tar.gz volse-hubzilla-c9b15bbab530264c4d5e1a648fc62153843b0618.tar.bz2 volse-hubzilla-c9b15bbab530264c4d5e1a648fc62153843b0618.zip |
Allow passing autocomplete type to contact_autocomplete
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r-- | view/js/autocomplete.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 66d8cf90c..26d3f6211 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -91,13 +91,15 @@ function basic_replace(item) { })( jQuery ); (function( $ ){ - $.fn.contact_autocomplete = function(backend_url, onselect) { + $.fn.contact_autocomplete = function(backend_url, typ, onselect) { + + if(typeof typ === 'undefined') typ = ''; // Autocomplete contacts contacts = { match: /(^)([^\n]+)$/, index: 2, - search: function(term, callback) { contact_search(term, callback, backend_url, '',[]); }, + search: function(term, callback) { contact_search(term, callback, backend_url, typ,[]); }, replace: basic_replace, template: contact_format, } |