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 ++- src/guff/views/ecrs/test/auth.ecr | 194 ++++++++++++++++++++++---------------- 2 files changed, 127 insertions(+), 81 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 diff --git a/src/guff/views/ecrs/test/auth.ecr b/src/guff/views/ecrs/test/auth.ecr index 00cc918..0e044f7 100644 --- a/src/guff/views/ecrs/test/auth.ecr +++ b/src/guff/views/ecrs/test/auth.ecr @@ -23,24 +23,37 @@ Users - -
- - - Add User - -
@@ -95,6 +108,7 @@ id='filter-q' class='form-control' title='Enter search terms' + data-search-delay='500' /> @@ -106,62 +120,6 @@ - -
-
- - - Login - -
- -
-
- - - -
- -
- - - -
- -
- -
-
-
@@ -365,3 +323,81 @@ + + -- cgit v1.2.3