From ff613f8e6210d2c4cd2f8deacc0096e18aff2fcd Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 22 Oct 2018 11:50:53 -0400 Subject: #725 move push handlers inside beforeEnter for better consistency --- www/js/MontageHistoryCtrl.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'www/js/MontageHistoryCtrl.js') diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index ea9f7f2f..0373adcd 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -12,16 +12,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc $scope.isScreenReady = false; - $scope.$on ( "process-push", function () { - NVRDataModel.debug (">> MontageHistoryCtrl: 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]); - }); + //-------------------------------------------------------------------------------------- // Handles bandwidth change, if required @@ -1076,6 +1067,18 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc } } $scope.$on('$ionicView.beforeEnter', function () { + + $scope.$on ( "process-push", function () { + NVRDataModel.debug (">> MontageHistoryCtrl: 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]); + }); + // This rand is really used to reload the monitor image in img-src so it is not cached // I am making sure the image in montage view is always fresh // I don't think I am using this anymore FIXME: check and delete if needed -- cgit v1.2.3