Repository: incubator-guacamole-client Updated Branches: refs/heads/master 1c197ae46 -> 68accbf45
GUACAMOLE-301: Clear login interface if login was either successful or implicitly not required. Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/d649f0b9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/d649f0b9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/d649f0b9 Branch: refs/heads/master Commit: d649f0b955348e2860bb781fa6f68ba003bf1231 Parents: d9b888e Author: Michael Jumper <[email protected]> Authored: Sun May 7 18:38:43 2017 -0700 Committer: Michael Jumper <[email protected]> Committed: Mon May 15 13:12:52 2017 -0700 ---------------------------------------------------------------------- .../webapp/app/index/controllers/indexController.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/d649f0b9/guacamole/src/main/webapp/app/index/controllers/indexController.js ---------------------------------------------------------------------- diff --git a/guacamole/src/main/webapp/app/index/controllers/indexController.js b/guacamole/src/main/webapp/app/index/controllers/indexController.js index e17ecee..0f4d78d 100644 --- a/guacamole/src/main/webapp/app/index/controllers/indexController.js +++ b/guacamole/src/main/webapp/app/index/controllers/indexController.js @@ -165,19 +165,18 @@ angular.module('index').controller('indexController', ['$scope', '$injector', $scope.expectedCredentials = error.expected; }); - // Clear login screen if login was successful - $scope.$on('guacLogin', function loginSuccessful() { - $scope.loginHelpText = null; - $scope.acceptedCredentials = null; - $scope.expectedCredentials = null; - }); - // Update title and CSS class upon navigation $scope.$on('$routeChangeSuccess', function(event, current, previous) { // If the current route is available if (current.$$route) { + // Clear login screen if route change was successful (and thus + // login was either successful or not required) + $scope.loginHelpText = null; + $scope.acceptedCredentials = null; + $scope.expectedCredentials = null; + // Set title var title = current.$$route.title; if (title)
