Repository: zeppelin Updated Branches: refs/heads/branch-0.6 f81b2eef8 -> c34aaf9f3
[ZEPPELIN-1131] Does not initialize login page values. ### What is this PR for? This PR is for initialization of login page values(id, password). The login id and password does not initialize even if login page closed. ### What type of PR is it? Bug Fix ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1131 ### How should this be tested? 1. click login. 2. put id and password. 3. just close the modal window. 4. reopen login modal. 5. id and password should be initialized. ### Screenshots (if appropriate) - before  - after  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: astroshim <[email protected]> Closes #1158 from astroshim/ZEPPELIN-1131 and squashes the following commits: f7ec0d7 [astroshim] erase space 697007a [astroshim] change the scope 526ac12 [astroshim] change quote. 50d5853 [astroshim] init login page values when modal is closed. (cherry picked from commit a2f99817498be8419aa5bc215d407436d55e2c9a) Signed-off-by: Mina Lee <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/c34aaf9f Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/c34aaf9f Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/c34aaf9f Branch: refs/heads/branch-0.6 Commit: c34aaf9f3ea6a5c30ba8607153561e5fc628ed42 Parents: f81b2ee Author: astroshim <[email protected]> Authored: Sun Jul 10 21:50:16 2016 +0900 Committer: Mina Lee <[email protected]> Committed: Tue Jul 19 03:19:19 2016 +0900 ---------------------------------------------------------------------- zeppelin-web/src/app/home/home.controller.js | 4 ++++ zeppelin-web/src/components/login/login.controller.js | 10 ++++++++++ 2 files changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c34aaf9f/zeppelin-web/src/app/home/home.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/app/home/home.controller.js b/zeppelin-web/src/app/home/home.controller.js index ddd0f80..81818ae 100644 --- a/zeppelin-web/src/app/home/home.controller.js +++ b/zeppelin-web/src/app/home/home.controller.js @@ -65,4 +65,8 @@ angular.module('zeppelinWebApp').controller('HomeCtrl', function($scope, noteboo node.hidden = !node.hidden; }; + angular.element('#loginModal').on('hidden.bs.modal', function(e) { + $rootScope.$broadcast('initLoginValues'); + }); + }); http://git-wip-us.apache.org/repos/asf/zeppelin/blob/c34aaf9f/zeppelin-web/src/components/login/login.controller.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/components/login/login.controller.js b/zeppelin-web/src/components/login/login.controller.js index 0513021..2f3f10c 100644 --- a/zeppelin-web/src/components/login/login.controller.js +++ b/zeppelin-web/src/components/login/login.controller.js @@ -39,5 +39,15 @@ angular.module('zeppelinWebApp').controller('LoginCtrl', }); }; + + $scope.$on('initLoginValues', function() { + initValues(); + }); + var initValues = function() { + $scope.loginParams = { + userName: '', + password: '' + }; + }; } );
