diff options
| author | PliablePixels <pliablepixels@gmail.com> | 2015-08-13 09:07:50 -0400 |
|---|---|---|
| committer | PliablePixels <pliablepixels@gmail.com> | 2015-08-13 09:07:50 -0400 |
| commit | 324a55aff0059f630e4d69f005c032ae476bd467 (patch) | |
| tree | 352e102400216e8e8245c40fdcd6136b61af496b /www | |
| parent | b4aaf27e8abd6b939793e76ab8d446f1aed85323 (diff) | |
auth error dialog box is auto removed after 5 seconds
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/app.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/www/js/app.js b/www/js/app.js index a9a47f6d..eaedae7c 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -244,10 +244,14 @@ angular.module('zmApp', [ title: 'Zoneminder authentication failed', template: 'This might be a temporary situation and may result in zmNinja not working properly. Please try to log in again.' }); - alertPopup.then (function(data){ - //$state.transitionTo('login'); - }); + // close it after 5 seconds + $timeout(function() { + ZMDataModel.zmLog("Hiding auth error dialog box"); + alertPopup.close(); + },5000); + + }); @@ -279,13 +283,7 @@ angular.module('zmApp', [ d.resolve("Login success - no auth"); return d.promise; } - - - /* if ($rootScope.loggedIntoZm == 1) - { - d.resolve("Already logged in"); - return (d.promise); - }*/ + console.log ("**** ZM AUTO LOGIN CALLED"); ZMDataModel.zmLog("zmAutologin called"); @@ -371,8 +369,10 @@ angular.module('zmApp', [ $ionicLoading.hide(); $rootScope.loggedIntoZm = -1; console.log ("**** ZM Login FAILED"); - ZMDataModel.zmLog ("zmAutologin Error " + JSON.stringify(error), "error"); - $rootScope.$emit('auth-error', error); + ZMDataModel.zmLog ("zmAutologin Error " + JSON.stringify(error), "error, but not calling auth-error emit"); + // FIXME should I really emit here? This usually does not mean bad login + // that is handled in success + // $rootScope.$emit('auth-error', error); d.reject("Login Error"); return d.promise; |
