summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/users.js')
-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);