summaryrefslogtreecommitdiff
path: root/www/js/EventCtrl.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2020-09-06 17:05:28 -0400
committerPliable Pixels <pliablepixels@gmail.com>2020-09-06 17:05:28 -0400
commit65f02d0f50bd971a1a212640fadd7a6327d09bb0 (patch)
treeaa10d4f90d4cbfb984b6d5430836103087c2b1e4 /www/js/EventCtrl.js
parent324be96b12957d920bb686331a8f7c37b5f446ee (diff)
#963 remove filter if we set it as part of montage
Diffstat (limited to 'www/js/EventCtrl.js')
-rw-r--r--www/js/EventCtrl.js16
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;