From 0cf016b0b049a32dd053e680f21237d039959252 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Wed, 7 Jan 2015 20:03:05 +0100 Subject: Make mod_poke use textcomplete --- view/js/mod_poke.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'view/js/mod_poke.js') diff --git a/view/js/mod_poke.js b/view/js/mod_poke.js index 78972888f..c5ca5399c 100644 --- a/view/js/mod_poke.js +++ b/view/js/mod_poke.js @@ -1,14 +1,5 @@ $(document).ready(function() { - var a; - a = $("#poke-recip").autocomplete({ - serviceUrl: baseurl + '/acl', - minChars: 2, - width: 250, - id: 'poke-recip-ac', - onSelect: function(value,data) { - $("#poke-recip-complete").val(data); - } + $("#poke-recip").contact_autocomplete(baseurl + '/acl', function(data) { + $("#poke-recip-complete").val(data.id); }); - a.setOptions({ params: { type: 'a' }}); - }); -- cgit v1.2.3 From c9b15bbab530264c4d5e1a648fc62153843b0618 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Wed, 7 Jan 2015 20:38:56 +0100 Subject: Allow passing autocomplete type to contact_autocomplete --- view/js/mod_poke.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/js/mod_poke.js') diff --git a/view/js/mod_poke.js b/view/js/mod_poke.js index c5ca5399c..3c07fcef7 100644 --- a/view/js/mod_poke.js +++ b/view/js/mod_poke.js @@ -1,5 +1,5 @@ $(document).ready(function() { - $("#poke-recip").contact_autocomplete(baseurl + '/acl', function(data) { + $("#poke-recip").contact_autocomplete(baseurl + '/acl', 'a', function(data) { $("#poke-recip-complete").val(data.id); }); }); -- cgit v1.2.3 From d7a3d9f60654a721cb00d78dd653fd56e4e9fb53 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Wed, 7 Jan 2015 21:32:17 +0100 Subject: Add autosubmit feature to textcomplete based autocompleter --- view/js/mod_poke.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/js/mod_poke.js') diff --git a/view/js/mod_poke.js b/view/js/mod_poke.js index 3c07fcef7..58e50588f 100644 --- a/view/js/mod_poke.js +++ b/view/js/mod_poke.js @@ -1,5 +1,5 @@ $(document).ready(function() { - $("#poke-recip").contact_autocomplete(baseurl + '/acl', 'a', function(data) { + $("#poke-recip").contact_autocomplete(baseurl + '/acl', 'a', false, function(data) { $("#poke-recip-complete").val(data.id); }); }); -- cgit v1.2.3