From 25db8016dadd10c800419edeafdc3fcff9929f4f Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 2 Apr 2016 02:57:01 -0400 Subject: move login to dialog, clean up user list header --- data/stuff/test/auth.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'data') 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 -- cgit v1.2.3