diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-04-02 02:57:01 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-04-02 02:57:01 -0400 |
commit | 25db8016dadd10c800419edeafdc3fcff9929f4f (patch) | |
tree | 4205f6dc689fd4a73415d0821648a59cdc182836 /data/stuff | |
parent | 45f76b87be81e170971865d023605d1c06b38347 (diff) | |
download | old-guff-25db8016dadd10c800419edeafdc3fcff9929f4f.tar.bz2 old-guff-25db8016dadd10c800419edeafdc3fcff9929f4f.zip |
move login to dialog, clean up user list header
Diffstat (limited to 'data/stuff')
-rw-r--r-- | data/stuff/test/auth.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/data/stuff/test/auth.js b/data/stuff/test/auth.js index f14f0b1..5e98425 100644 --- a/data/stuff/test/auth.js +++ b/data/stuff/test/auth.js @@ -229,7 +229,16 @@ jQuery(function($) { return false; }); - $('#login').click(function() { + $('#login-dialog').on('show.bs.modal', function() { + $('#login-email').val(''); + $('#login-password').val(''); + }); + + $('#login-dialog').on('shown.bs.modal', function() { + $('#login-email').focus(); + }); + + $('#login-confirm').click(function() { var me = $(this); if (me.hasClass('disabled')) @@ -248,6 +257,7 @@ jQuery(function($) { alert('Error ' + r.responseText); }).done(function(r) { console.log(r); + $('#login-dialog').modal('hide'); }); // stop event @@ -258,7 +268,7 @@ jQuery(function($) { if (ev.which == 13) { setTimeout(function() { // trigger login - $('#login').click(); + $('#login-confirm').click(); }, 10); // stop event |