summaryrefslogtreecommitdiff
path: root/users/app/assets/javascripts/users.js.coffee
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-11-26 19:17:08 +0100
committerAzul <azul@leap.se>2012-11-26 19:17:08 +0100
commitfa58393f4b665434830535b3e0c1a325c31ce03b (patch)
treedff2714a47805f248913fb9b4773a6e267d864b0 /users/app/assets/javascripts/users.js.coffee
parentbf74255d1530fe5852dc6e6c27ef975ce9aa8d3c (diff)
parenta941c89293bcbb067c6152b63765ead38a484b81 (diff)
Merge branch 'feature/admin-users-list' into develop
Diffstat (limited to 'users/app/assets/javascripts/users.js.coffee')
-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});