summaryrefslogtreecommitdiff
path: root/www/js/MomentCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-10-22 11:50:53 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-10-22 11:50:53 -0400
commitff613f8e6210d2c4cd2f8deacc0096e18aff2fcd (patch)
treedee024287af53b9c9189b6acd1b783fa0ef1a527 /www/js/MomentCtrl.js
parente3ee3eeeb220cfce88ddfdb2189ec6e49432565f (diff)
#725 move push handlers inside beforeEnter for better consistency
Diffstat (limited to 'www/js/MomentCtrl.js')
-rw-r--r--www/js/MomentCtrl.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js
index d108010d..44f653df 100644
--- a/www/js/MomentCtrl.js
+++ b/www/js/MomentCtrl.js
@@ -23,16 +23,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
$ionicSideMenuDelegate.toggleLeft();
};
- $scope.$on ( "process-push", function () {
- NVRDataModel.debug (">> MomentCtrl: 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
@@ -844,6 +835,18 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
$scope.$on('$ionicView.beforeEnter', function () {
+
+ $scope.$on ( "process-push", function () {
+ NVRDataModel.debug (">> MomentCtrl: 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]);
+ });
+
//console.log ("HERE>>>>>>>>>>>>>>>>>>>>>>>>>>>");
monitors = angular.copy(message); // don't mess up the main monitors list