Repository: zeppelin
Updated Branches:
  refs/heads/master 0590ef3d9 -> a2f998174


[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
![before](https://cloud.githubusercontent.com/assets/3348133/16708435/b3ce4e32-462e-11e6-8065-f4e57e1c91f0.gif)

- after
![after](https://cloud.githubusercontent.com/assets/3348133/16708433/9f70238e-462e-11e6-9735-5801bd7bc856.gif)

### 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.


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/a2f99817
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/a2f99817
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/a2f99817

Branch: refs/heads/master
Commit: a2f99817498be8419aa5bc215d407436d55e2c9a
Parents: 0590ef3
Author: astroshim <[email protected]>
Authored: Sun Jul 10 21:50:16 2016 +0900
Committer: Prabhjyot Singh <[email protected]>
Committed: Tue Jul 12 12:28:37 2016 +0530

----------------------------------------------------------------------
 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/a2f99817/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 7c07cd4..7653902 100644
--- a/zeppelin-web/src/app/home/home.controller.js
+++ b/zeppelin-web/src/app/home/home.controller.js
@@ -66,4 +66,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/a2f99817/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: ''
+      };
+    };
   }
 );

Reply via email to