diff options
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/users.js | 12 | ||||
-rw-r--r-- | app/assets/stylesheets/application.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/backport.scss | 24 | ||||
-rw-r--r-- | app/assets/stylesheets/leap.scss | 21 |
4 files changed, 56 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); diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 28206b1..9cd3a55 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -11,6 +11,8 @@ // @import "bootstrap"; @import "bootstrap-responsive"; +// backport bootstrap 3.2 features +@import "backport"; // // LEAP web app specific overrides diff --git a/app/assets/stylesheets/backport.scss b/app/assets/stylesheets/backport.scss new file mode 100644 index 0000000..cadb035 --- /dev/null +++ b/app/assets/stylesheets/backport.scss @@ -0,0 +1,24 @@ +// +// Backporting styles from bootstrap 3.2 +// + + +// List options + +// Unstyled keeps list items block level, just removes default browser padding and list-style +.list-unstyled { + padding-left: 0; + list-style: none; +} + +// Inline turns list items into inline-block +.list-inline { + @extend .list-unstyled; + margin-left: -5px; + + > li { + display: inline-block; + padding-left: 5px; + padding-right: 5px; + } +} diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss index 77104e5..3b7075c 100644 --- a/app/assets/stylesheets/leap.scss +++ b/app/assets/stylesheets/leap.scss @@ -145,6 +145,27 @@ input, textarea { } // +// IDENTITIES +// + +// Color code for the identity labels +.identity{ + &.main_email .label { + @extend .label-info + } + &.alias .label { + @extend .label-success + } + &.forward .label { + @extend .label-warning + } + &.disabled .label { + @extend .label-default + } +} + + +// // BORING DEFAULT MASTHEAD // |