diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-01 18:02:35 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-01 18:02:35 -0500 |
| commit | cc6d8a9efcc4206f382cfd9915fce6be488881d5 (patch) | |
| tree | cee96fcc534be589d61b3c5f36da423edd54b49d /www/js | |
| parent | 31c333acc1239c12611210c72ae8c64170d4eda5 (diff) | |
nots
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/DataModel.js | 11 | ||||
| -rw-r--r-- | www/js/LoginCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/app.js | 6 |
3 files changed, 16 insertions, 3 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 8cc58798..c6a7dba7 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -330,13 +330,18 @@ angular.module('zmApp.controllers') }, isLoggedIn: function () { + if ( (loginData.username != "" && loginData.password != "" && loginData.url != "" && - loginData.apiurl != "") || (loginData.isUseAuth == '0')) + loginData.apiurl != "") || (loginData.isUseAuth !='1')) { return 1; - } else + } + else { - return 0; + + + return 0; + } }, diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index 02a39f73..89bde3c0 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -173,6 +173,8 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r $scope.loginData.username = $scope.loginData.username.trim(); $scope.loginData.streamingurl = $scope.loginData.streamingurl.trim(); $scope.loginData.eventServer = $scope.loginData.eventServer.trim(); + + $scope.loginData.isUseAuth = ($scope.check.isUseAuth) ? "1" : "0"; $scope.loginData.isUseEventServer = ($scope.check.isUseEventServer) ? "1" : "0"; diff --git a/www/js/app.js b/www/js/app.js index 45b5f56c..a5e0d07c 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -566,8 +566,14 @@ angular.module('zmApp', [ if (ZMDataModel.isLoggedIn()) { console.log("State transition is authorized"); + return; } + else + { + + + } if (requireLogin) { |
