diff options
Diffstat (limited to 'www/js/MonitorCtrl.js')
| -rw-r--r-- | www/js/MonitorCtrl.js | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 6e2ce019..8926688b 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -48,16 +48,7 @@ angular.module('zmApp.controllers') $ionicSideMenuDelegate.toggleLeft(); }; - $scope.$on ( "process-push", function () { - NVRDataModel.debug (">> MonitorCtrl: push handler"); - var s = NVRDataModel.evaluateTappedNotification(); - NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s)); - $ionicHistory.nextViewOptions({ - disableAnimate:true, - disableBack: true - }); - $state.go(s[0],s[1],s[2]); - }); + //---------------------------------------------------------------- // Alarm notification handling @@ -262,6 +253,20 @@ angular.module('zmApp.controllers') // reset power state on exit as if it is called after we enter another // state, that effectively overwrites current view power management needs //------------------------------------------------------------------------ + + $scope.$on('$ionicView.beforeEnter', function() { + + $scope.$on ( "process-push", function () { + NVRDataModel.debug (">> MonitorCtrl: push handler"); + var s = NVRDataModel.evaluateTappedNotification(); + NVRDataModel.debug("tapped Notification evaluation:"+ JSON.stringify(s)); + $ionicHistory.nextViewOptions({ + disableAnimate:true, + disableBack: true + }); + $state.go(s[0],s[1],s[2]); + }); + }); $scope.$on('$ionicView.enter', function () { // console.log("**VIEW ** Monitor Ctrl Entered"); NVRDataModel.setAwake(false); |
