diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-21 09:15:31 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-10-21 09:15:31 -0400 |
| commit | 7dbdc4e09de2fe24460190cead2ee317165c9453 (patch) | |
| tree | 21c911dc440c808a263c347f5e3d0f8f1fff84f0 | |
| parent | c24e0850bddaf1d96df01131f5647dea6eaf04f2 (diff) | |
adding returns after state.go --> seems it takes time to go and code continues to execute below it - WTF!
Former-commit-id: f1f7e2d62f47f9528d163db43fa166d088b0a819
| -rw-r--r-- | www/js/EventCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/EventDateTimeFilterCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/EventServerSettingsCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/EventsGraphsCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/FirstUseCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/HelpCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/LogCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/LoginCtrl.js | 4 | ||||
| -rw-r--r-- | www/js/MonitorCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 3 | ||||
| -rw-r--r-- | www/js/MontageHistoryCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/NewsCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/PortalLoginCtrl.js | 11 | ||||
| -rw-r--r-- | www/js/TimelineCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/TimelineModalCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/WizardCtrl.js | 1 | ||||
| -rw-r--r-- | www/js/app.js | 6 |
17 files changed, 39 insertions, 3 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 8254123c..66dec420 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -730,6 +730,7 @@ angular.module('zmApp.controllers') }, { reload: true }); + return; } }; @@ -799,6 +800,7 @@ angular.module('zmApp.controllers') "id": 0, "playEvent":false }); + return; } else { NVRDataModel.log("Filter reset cancelled in popup"); } diff --git a/www/js/EventDateTimeFilterCtrl.js b/www/js/EventDateTimeFilterCtrl.js index 4047fa1e..4b28140d 100644 --- a/www/js/EventDateTimeFilterCtrl.js +++ b/www/js/EventDateTimeFilterCtrl.js @@ -23,6 +23,7 @@ angular.module('zmApp.controllers') }, { reload: true }); + return; } }; @@ -54,6 +55,7 @@ angular.module('zmApp.controllers') "id": 0, "playEvent":false }); + return; //$ionicHistory.goBack(); }; diff --git a/www/js/EventServerSettingsCtrl.js b/www/js/EventServerSettingsCtrl.js index 48417420..7bee989d 100644 --- a/www/js/EventServerSettingsCtrl.js +++ b/www/js/EventServerSettingsCtrl.js @@ -31,6 +31,7 @@ }, { reload: true }); + return; } }; diff --git a/www/js/EventsGraphsCtrl.js b/www/js/EventsGraphsCtrl.js index 2273598e..19d963ea 100644 --- a/www/js/EventsGraphsCtrl.js +++ b/www/js/EventsGraphsCtrl.js @@ -35,6 +35,7 @@ angular.module('zmApp.controllers').controller('zmApp.EventsGraphsCtrl', ['$ioni }, { reload: true }); + return; } }; diff --git a/www/js/FirstUseCtrl.js b/www/js/FirstUseCtrl.js index f9d8b7d8..8df81f82 100644 --- a/www/js/FirstUseCtrl.js +++ b/www/js/FirstUseCtrl.js @@ -65,6 +65,7 @@ angular.module('zmApp.controllers').controller('zmApp.FirstUseCtrl', ['$scope', $state.go("login", { "wizard": false }); + return; }; $scope.goToWizard = function () { @@ -73,6 +74,7 @@ angular.module('zmApp.controllers').controller('zmApp.FirstUseCtrl', ['$scope', disableBack: true }); $state.go("wizard"); + return; }; diff --git a/www/js/HelpCtrl.js b/www/js/HelpCtrl.js index 328fbfda..ce4ec761 100644 --- a/www/js/HelpCtrl.js +++ b/www/js/HelpCtrl.js @@ -24,6 +24,7 @@ angular.module('zmApp.controllers').controller('zmApp.HelpCtrl', ['$scope', '$ro }, { reload: true }); + return; } }; diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js index 388af6a7..f204e8db 100644 --- a/www/js/LogCtrl.js +++ b/www/js/LogCtrl.js @@ -68,6 +68,7 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo }, { reload: true }); + return; } }; diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index e076cc18..4e4efc0a 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -56,7 +56,9 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r }, { reload: true }); + return; } + }; //---------------------------------------------------------------- @@ -200,7 +202,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r //console.log ( "My loginData saved " + JSON.stringify($scope.loginData)); NVRDataModel.setLogin($scope.loginData); $state.go("eventserversettings"); - + return; }; diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 865e0e3a..c04ef316 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -71,6 +71,7 @@ angular.module('zmApp.controllers') }, { reload: true }); + return; } }; //----------------------------------------------------------------------- diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 735631af..88487231 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -529,6 +529,7 @@ angular.module('zmApp.controllers') }, { reload: true }); + return; } }; @@ -553,6 +554,7 @@ angular.module('zmApp.controllers') }, { reload: true }); + return; } }; @@ -590,6 +592,7 @@ angular.module('zmApp.controllers') minimal: $scope.minimal, isRefresh: true }); + return; }; //--------------------------------------------------------------------- diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index d38be8ab..d6c8216c 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -583,6 +583,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc }, { reload: true }); + return; } }; $scope.handleAlarmsWhileMinimized = function () { @@ -603,6 +604,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc }, { reload: true }); + return; } }; //------------------------------------------------------------- diff --git a/www/js/NewsCtrl.js b/www/js/NewsCtrl.js index 8305fa6b..5328cf6b 100644 --- a/www/js/NewsCtrl.js +++ b/www/js/NewsCtrl.js @@ -24,6 +24,7 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro }, { reload: true }); + return; } }; diff --git a/www/js/PortalLoginCtrl.js b/www/js/PortalLoginCtrl.js index 463cb77b..42ea2936 100644 --- a/www/js/PortalLoginCtrl.js +++ b/www/js/PortalLoginCtrl.js @@ -75,6 +75,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic disableBack: true }); $state.go('first-use'); + return; } else { if (!$rootScope.userCancelledAuth) { $ionicHistory.nextViewOptions({ @@ -84,6 +85,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic $state.go("login", { "wizard": false }); + return; } else { // do this only once - rest for next time $rootScope.userCancelledAuth = false; @@ -134,6 +136,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic $state.go('lowversion', { "ver": data }); + return; } if (NVRDataModel.versionCompare(data, zm.recommendedAppVersion) == -1 && data != "0.0.0") { @@ -141,6 +144,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic $state.go('importantmessage', { "ver": data }); + return; } if (data == "0.0.0") { @@ -150,7 +154,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic $state.go("login", { "wizard": false }); - + return; } // coming here means continue EventServer.refresh(); @@ -159,6 +163,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic NVRDataModel.debug("2nd Auth: Transitioning state to: " + statetoGo + " with param " + JSON.stringify($rootScope.lastStateParam)); $state.go(statetoGo, $rootScope.lastStateParam); + return; }, function (error) { @@ -244,6 +249,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic $state.go(statetoGo, $rootScope.lastStateParam); + return; }, function (error) { // API Error @@ -262,6 +268,7 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic "wizard": false }); }); + return; }, 1000); @@ -321,12 +328,14 @@ angular.module('zmApp.controllers').controller('zmApp.PortalLoginCtrl', ['$ionic $state.go("login", { "wizard": false }); + return; } else { // if user cancelled auth I guess we go to login $rootScope.userCancelledAuth = false; $state.go("login", { "wizard": false }); + return; } }); } else { diff --git a/www/js/TimelineCtrl.js b/www/js/TimelineCtrl.js index 4ea92815..9da3ad37 100644 --- a/www/js/TimelineCtrl.js +++ b/www/js/TimelineCtrl.js @@ -36,6 +36,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla }, { reload: true }); + return; } }; @@ -512,6 +513,7 @@ angular.module('zmApp.controllers').controller('zmApp.TimelineCtrl', ['$ionicPla { $rootScope.customTimelineRange = true; $state.go('events-date-time-filter'); + return; } }; diff --git a/www/js/TimelineModalCtrl.js b/www/js/TimelineModalCtrl.js index 4c3b7ea7..96f5c465 100644 --- a/www/js/TimelineModalCtrl.js +++ b/www/js/TimelineModalCtrl.js @@ -47,6 +47,7 @@ angular.module('zmApp.controllers').controller('TimelineModalCtrl', ['$scope', ' }, { reload: true }); + return; } }; diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js index bb283460..610dfcc5 100644 --- a/www/js/WizardCtrl.js +++ b/www/js/WizardCtrl.js @@ -710,6 +710,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ $state.go("login", { "wizard": true }); + return; }; //-------------------------------------------------------------------------- diff --git a/www/js/app.js b/www/js/app.js index 6badb37f..57fa932b 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -721,6 +721,7 @@ angular.module('zmApp', [ NVRDataModel.log(">>>>>>>>>>>>>>> All init over, going to portal login"); $ionicHistory.nextViewOptions({ disableAnimate: true}); $state.go("zm-portal-login"); + return; }); //------------------------------------------------------------------ @@ -1129,7 +1130,7 @@ angular.module('zmApp', [ $state.go("login", { "wizard": false }); - + return; }; //--------------------------------------------------------------------------- @@ -1416,6 +1417,7 @@ angular.module('zmApp', [ if (val == null || val == true) { NVRDataModel.log("First time detected"); $state.go("first-use"); + return; } else { continueRestOfInit(); } @@ -1485,12 +1487,14 @@ angular.module('zmApp', [ NVRDataModel.debug("going to portal login"); $ionicHistory.nextViewOptions({ disableAnimate: true}); $state.go("zm-portal-login"); + return; } else { $rootScope.lastState = ""; $rootScope.lastStateParam = ""; NVRDataModel.debug("reset lastState to null"); $ionicHistory.nextViewOptions({ disableAnimate: true}); $state.go("zm-portal-login"); + return; } }, forceDelay); |
