summaryrefslogtreecommitdiff
path: root/users/app/assets/javascripts
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2012-11-26 10:22:48 -0800
committerjessib <jessib@leap.se>2012-11-26 10:22:48 -0800
commitba962a7d291c0d0a454a284dfb94ac35a3605e6a (patch)
tree873a6dc1b3cae51bbaa23329b238726dada1fd2d /users/app/assets/javascripts
parent3e744e4e226eae3ea2f900d9fccc32b6c046d65f (diff)
parentfa58393f4b665434830535b3e0c1a325c31ce03b (diff)
Merge branch 'develop' into help_develop
Diffstat (limited to 'users/app/assets/javascripts')
-rw-r--r--users/app/assets/javascripts/users.js.coffee4
1 files changed, 4 insertions, 0 deletions
diff --git a/users/app/assets/javascripts/users.js.coffee b/users/app/assets/javascripts/users.js.coffee
index f0bb3dd..76a6d79 100644
--- a/users/app/assets/javascripts/users.js.coffee
+++ b/users/app/assets/javascripts/users.js.coffee
@@ -21,6 +21,9 @@ srp.error = (message) ->
else
alert(message)
+pollUsers = (query, process) ->
+ $.get( "/users.json", query: query).done(process)
+
$(document).ready ->
$('#new_user').submit preventDefault
$('#new_user').submit srp.signup
@@ -28,4 +31,5 @@ $(document).ready ->
$('#new_session').submit srp.login
$('.user.form.edit').submit srp.update
$('.user.form.edit').submit preventDefault
+ $('.user.typeahead').typeahead({source: pollUsers});