summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-07-09 12:51:16 +0200
committerAzul <azul@leap.se>2014-07-09 12:51:16 +0200
commit0cc11ebb609de225fbeacbf80788b992b88b6ce6 (patch)
tree3dbf8562e91ac7d7c8759a0516efbdca93cbdeff /app/assets/javascripts
parentbdb4b0e275c205b0b44bbe3cc4ec4c162b309b37 (diff)
list identities based on search only
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/users.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/users.js b/app/assets/javascripts/users.js
index e6c2fcc..e0f1c9d 100644
--- a/app/assets/javascripts/users.js
+++ b/app/assets/javascripts/users.js
@@ -14,6 +14,7 @@
//
var poll_users,
+ poll_identities,
prevent_default,
clear_errors,
clear_field_errors,
@@ -31,6 +32,12 @@
}).done(process);
};
+ poll_identities = function(query, process) {
+ return $.get("/identities.json", {
+ query: query
+ }).done(process);
+ };
+
clear_errors = function() {
return $('#messages').empty();
};
@@ -173,9 +180,8 @@
$('#update_login_and_password').submit(srp.update);
$('#update_pgp_key').submit(prevent_default);
$('#update_pgp_key').submit(update_user);
- return $('#user-typeahead').typeahead({
- source: poll_users
- });
+ $('#user-typeahead').typeahead({ source: poll_users });
+ $('#identity-typeahead').typeahead({ source: poll_identities });
});
}).call(this);