From 9dbc2b5664bbf4046c481c5c53c1708b7aba0b8b Mon Sep 17 00:00:00 2001 From: John Shaver Date: Tue, 14 Nov 2017 07:38:34 -0800 Subject: [PATCH 1/3] Added some error handling so errors dissapearing. --- js/issuer.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/issuer.js b/js/issuer.js index 6d39256..681b1d8 100644 --- a/js/issuer.js +++ b/js/issuer.js @@ -362,7 +362,13 @@ $(function () { function handleAuthorizationDialog() { return getSession(CONFIG.host).then(function (session) { return getGrants(session); - }).catch(function () { + }).catch(function (e) { + if(e) { + console.error( + "Error authing current session. Requiring re-login. Message: " + , e.message + ); + } // TODO select the providers the client wants to show // providers=daplie.com,facebook.com,google.com // etc // TODO let the client specify switch_user From ed1c3374dd2ee5869109f79a777c948c582800b1 Mon Sep 17 00:00:00 2001 From: John Shaver Date: Tue, 14 Nov 2017 07:39:12 -0800 Subject: [PATCH 2/3] Fixed remember me checkbox. --- js/script.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/script.js b/js/script.js index 3a39100..faf8031 100644 --- a/js/script.js +++ b/js/script.js @@ -40,21 +40,18 @@ $('body').on('click', '.js-remember-label', function (ev) { var $this = $(this); if ($this.find('.js-remember-checkbox').is(':checked') === true) { $this.find('.js-remember-checkbox').prop( "checked", false ); + $this.find('js-remember-status').attr("src", "./img/unpressed-check.png"); } else { $this.find('.js-remember-checkbox').prop( "checked", true ); + $this.find('js-remember-status').attr("src", "./img/pressed-check.png"); } }); -$('body').on('click', '.check', function () { - 'use strict'; -}); - $('body').on('click', '.js-auth-li-enabled', function (ev) { 'use strict'; ev.preventDefault(); ev.stopPropagation(); - var $this = $(this); var $hiddenCheckbox = $this.find('.js-auth-checkbox'); var $img = $this.find('.check'); From 23318c01f09819a85222de313b39b7bc3477d701 Mon Sep 17 00:00:00 2001 From: John Shaver Date: Tue, 14 Nov 2017 08:12:51 -0800 Subject: [PATCH 3/3] fixed the initialized state of the remember-me checkbox --- index.html | 2 +- js/script.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index e4deeb5..5d7b199 100644 --- a/index.html +++ b/index.html @@ -69,7 +69,7 @@ Remember this device. - + diff --git a/js/script.js b/js/script.js index faf8031..5eb31a2 100644 --- a/js/script.js +++ b/js/script.js @@ -40,10 +40,10 @@ $('body').on('click', '.js-remember-label', function (ev) { var $this = $(this); if ($this.find('.js-remember-checkbox').is(':checked') === true) { $this.find('.js-remember-checkbox').prop( "checked", false ); - $this.find('js-remember-status').attr("src", "./img/unpressed-check.png"); + $this.find('.js-remember-status').attr("src", "./img/unpressed-check.png"); } else { $this.find('.js-remember-checkbox').prop( "checked", true ); - $this.find('js-remember-status').attr("src", "./img/pressed-check.png"); + $this.find('.js-remember-status').attr("src", "./img/pressed-check.png"); } });