Repository: eagle
Updated Branches:
  refs/heads/master 7f4dd3b46 -> 31706c05a


EAGLE-1071 Login form takes empty entries
fix js

https://issues.apache.org/jira/browse/EAGLE-1071

Author: @VSJTech
Reviewer: @zombieJ

Closes: #972


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

Branch: refs/heads/master
Commit: 31706c05adfa699fdb092bd1dd563ccd799d3a8c
Parents: 7f4dd3b
Author: yonzhang <[email protected]>
Authored: Thu Feb 1 15:12:10 2018 -0800
Committer: yonzhang <[email protected]>
Committed: Thu Feb 1 15:12:10 2018 -0800

----------------------------------------------------------------------
 .../src/main/webapp/app/dev/public/js/ctrls/authCtrl.js   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/eagle/blob/31706c05/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js
----------------------------------------------------------------------
diff --git a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js 
b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js
index e4b3329..36093c9 100644
--- a/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js
+++ b/eagle-server/src/main/webapp/app/dev/public/js/ctrls/authCtrl.js
@@ -26,6 +26,14 @@
                $scope.password = '';
 
                $scope.login = function () {
+               if (!$scope.username || !$scope.password)
+                                               {
+                                               $.dialog({
+                               title: 'OPS',
+                               content: 'Username or password cannot be Empty.'
+                            });
+
+                                               }else {
                        Auth.login($scope.username, 
$scope.password).then(function (result) {
                                if (result) {
                                        $wrapState.go('home');
@@ -35,7 +43,7 @@
                                                content: 'Username or password 
not correct.'
                                        });
                                }
-                       });
+                       }); }
                };
 
                $scope.onKeyPress = function (event) {

Reply via email to