diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-21 18:49:32 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-10-21 18:49:32 -0400 |
| commit | e3076881b748fff53690373f02211706b60fab79 (patch) | |
| tree | b417ca52d1be5198bd5f7aefe646782b0d60b4db /www/js/EventCtrl.js | |
| parent | 3f549f3d6ea3dac1fbf862e236549ce0dd7fd570 (diff) | |
#725 moved evaluate tapped notification to service,trapped handler in all controllers
Diffstat (limited to 'www/js/EventCtrl.js')
| -rw-r--r-- | www/js/EventCtrl.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 2c64ce70..cce81b3a 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -71,6 +71,19 @@ angular.module('zmApp.controllers') // initial code //--------------------------------------------------- + + $scope.$on ( "process-push", function () { + NVRDataModel.debug (">> EventCtrl: 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]); + }); + + //we come here is TZ is updated after the view loads var tzu = $scope.$on('tz-updated', function () { $scope.tzAbbr = NVRDataModel.getTimeZoneNow(); @@ -115,8 +128,8 @@ angular.module('zmApp.controllers') footerExpand(); // now do event playback if asked - if (parseInt($rootScope.tappedEid) > 0) { - NVRDataModel.debug(" Trying ot live play " + $rootScope.tappedEid); + if (parseInt($rootScope.tappedEid) > 0 && $stateParams.playEvent == 'true') { + NVRDataModel.debug(" Trying to play event due to push:" + $rootScope.tappedEid); playSpecificEvent($rootScope.tappedEid); } @@ -148,7 +161,7 @@ angular.module('zmApp.controllers') window.removeEventListener("resize", recomputeThumbSize, false); NVRDataModel.debug("EventCtrl: Deregistering broadcast handles"); for (var i = 0; i < broadcastHandles.length; i++) { - // broadcastHandles[i](); + // broadcastHandles[i](); } broadcastHandles = []; }); |
