diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2020-09-07 17:47:23 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2020-09-07 17:47:23 -0400 |
| commit | 263814ad6fff42161285fe907d3459a430a38efd (patch) | |
| tree | e7a293b90c4d0aac63da9e17a8c4f079491cb79f /www/js | |
| parent | cdd6ec0d7296d10db58b2fd9f90bae313ed4abda (diff) | |
#963 persist filter if going to event filter
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/EventDateTimeFilterCtrl.js | 4 | ||||
| -rwxr-xr-x | www/js/app.js | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 4475af83..02c22cc3 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -184,7 +184,7 @@ angular.module('zmApp.controllers') $scope.$on('$ionicView.beforeLeave', function () { //$window.removeEventListener('orientationchange', updateUI); - if ($stateParams.lastCheckTime != undefined && $stateParams.lastCheckTime != '' && moment($stateParams.lastCheckTime).isValid()) { + if ($stateParams.lastCheckTime != undefined && $stateParams.lastCheckTime != '' && moment($stateParams.lastCheckTime).isValid() && !$rootScope.enteringEventFilter) { NVR.debug ("removing montage temporary filter"); $rootScope.isEventFilterOn = false; $rootScope.fromDate = ""; diff --git a/www/js/EventDateTimeFilterCtrl.js b/www/js/EventDateTimeFilterCtrl.js index 2de8dd15..733d6263 100644 --- a/www/js/EventDateTimeFilterCtrl.js +++ b/www/js/EventDateTimeFilterCtrl.js @@ -25,6 +25,10 @@ angular.module('zmApp.controllers') } }; + $scope.$on('$ionicView.beforeLeave', function () { + $rootScope.enteringEventFilter=false; + }); + $scope.$on('$ionicView.beforeEnter', function () { $scope.today = moment().format("YYYY-MM-DD"); $scope.monitors = NVR.getMonitorsNow(); diff --git a/www/js/app.js b/www/js/app.js index 81977def..8b4b3e88 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1139,7 +1139,7 @@ angular.module('zmApp', [ - + $rootScope.enteringEventFilter=false; $rootScope.dpadId = 0; $rootScope.textScaleFactor = 1.0; $rootScope.isLoggedIn = false; |
