From 7826039d1fcb51c120d6842348daebb0fc073d7c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 7 Jun 2015 22:15:02 -0700 Subject: [PATCH] GUAC-1176: Set CSS "continuation" class on login interface if login is continuing. --- .../main/webapp/app/login/directives/login.js | 18 +++++++++++++++++- .../main/webapp/app/login/templates/login.html | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/app/login/directives/login.js b/guacamole/src/main/webapp/app/login/directives/login.js index a4b55fe63..c818671a8 100644 --- a/guacamole/src/main/webapp/app/login/directives/login.js +++ b/guacamole/src/main/webapp/app/login/directives/login.js @@ -86,7 +86,7 @@ angular.module('login').directive('guacLogin', [function guacLogin() { /** * Whether an error occurred during login. - * + * * @type Boolean */ $scope.loginError = false; @@ -105,6 +105,22 @@ angular.module('login').directive('guacLogin', [function guacLogin() { */ $scope.remainingFields = []; + /** + * Returns whether a previous login attempt is continuing. + * + * @return {Boolean} + * true if a previous login attempt is continuing, false otherwise. + */ + $scope.isContinuation = function isContinuation() { + + // The login is continuing if any parameter values are provided + for (var name in $scope.values) + return true; + + return false; + + }; + $scope.$watch('values', function resetEnteredValues(values) { angular.extend($scope.enteredValues, values || {}); }); diff --git a/guacamole/src/main/webapp/app/login/templates/login.html b/guacamole/src/main/webapp/app/login/templates/login.html index bcb8ed48e..d00f4a174 100644 --- a/guacamole/src/main/webapp/app/login/templates/login.html +++ b/guacamole/src/main/webapp/app/login/templates/login.html @@ -1,4 +1,4 @@ -
+