diff options
| -rw-r--r-- | www/js/EventCtrl.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 2ff4c35e..059585e7 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -182,7 +182,17 @@ angular.module('zmApp.controllers') $scope.$on('$ionicView.beforeLeave', function () { - + if ($stateParams.lastCheckTime != undefined && $stateParams.lastCheckTime != '' && moment($stateParams.lastCheckTime).isValid()) { + NVR.debug ("removing montage temporary filter"); + $rootScope.isEventFilterOn = false; + $rootScope.fromDate = ""; + $rootScope.fromTime = ""; + $rootScope.toDate = ""; + $rootScope.toTime = ""; + $rootScope.fromString = ""; + $rootScope.toString = ""; + $rootScope.monitorsFilter=""; + } NVR.debug ("Cancelling page reload timer"); $interval.cancel(intervalReloadEvents); document.removeEventListener("pause", onPause, false); @@ -236,6 +246,9 @@ angular.module('zmApp.controllers') $scope.rowHeight = $scope.rowHeightRegular; $scope.mid = ''; + $rootScope.monitorsFilter = ''; + + $scope.$on ("alarm", function() { NVR.debug ("EventCtrl: new event notification, doing an immediate reload"); // do an immediate display reload and schedule timer again @@ -1836,7 +1849,6 @@ angular.module('zmApp.controllers') $rootScope.toTime = ""; $rootScope.fromString = ""; $rootScope.toString = ""; - $rootScope.monitorsFilter = ''; $scope.id = 0; $scope.showEvent = false; |
