Skip to content

Commit

Permalink
#963 remove filter if we set it as part of montage
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Sep 6, 2020
1 parent 324be96 commit 65f02d0
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions www/js/EventCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1836,7 +1849,6 @@ angular.module('zmApp.controllers')
$rootScope.toTime = "";
$rootScope.fromString = "";
$rootScope.toString = "";
$rootScope.monitorsFilter = '';

$scope.id = 0;
$scope.showEvent = false;
Expand Down

0 comments on commit 65f02d0

Please sign in to comment.