diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-07 20:57:30 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-07 20:57:30 +0100 |
commit | b098d5d901d529b48461811c414c6043c991e92a (patch) | |
tree | dc4845169d59318d1b57cb59f6e660d68aa3419b | |
parent | 8e4d66dd7b232f487e11fab249ca30336cbb3a6f (diff) | |
download | volse-hubzilla-b098d5d901d529b48461811c414c6043c991e92a.tar.gz volse-hubzilla-b098d5d901d529b48461811c414c6043c991e92a.tar.bz2 volse-hubzilla-b098d5d901d529b48461811c414c6043c991e92a.zip |
Make photos tag autocomplete use textcomplete
-rw-r--r-- | view/js/mod_photos.js | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/view/js/mod_photos.js b/view/js/mod_photos.js index 0a64f8102..676f5e8ef 100644 --- a/view/js/mod_photos.js +++ b/view/js/mod_photos.js @@ -2,19 +2,11 @@ var ispublic = aStr['everybody']; $(document).ready(function() { - - var a; - a = $("#photo-edit-newtag").autocomplete({ - serviceUrl: baseurl + '/acl', - minChars: 2, - width: 250, - id: 'newtag-ac', - onSelect: function(value,data) { - $("#photo-edit-newtag").val(data); - }, - }); - a.setOptions({ params: { type: 'p' }}); - + $(document).ready(function() { + $("#photo-edit-newtag").contact_autocomplete(baseurl + '/acl', 'p', function(data) { + $("#photo-edit-newtag").val('@' + data.name.replace(' ','_'); // Is the underscore replacement still needed? + }); + }); $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { var selstr; |