diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2019-04-13 11:15:18 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2019-04-13 11:15:18 -0400 |
| commit | 8af7250dbccd52cbd725aec83d2a7f151914b85f (patch) | |
| tree | ef57f478f2b9ac35a9af6f9130c7f1b2c3a7dbe6 /www | |
| parent | e2cd99f903ea3a2c15a8cc62515fa88b6a05808d (diff) | |
#806 when global check is tapped, clear sidebars
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/MontageCtrl.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 4a5e03e6..3769df71 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -595,7 +595,7 @@ angular.module('zmApp.controllers') }; - function getEventStatus(monitor, expandSidebar) { + function getEventStatus(monitor, showMontageSidebars) { ld = NVR.getLogin(); // https:///zm/api/events/index/MonitorId=:2.json?sort=StartTime&direction=desc&limit=1 @@ -634,7 +634,7 @@ angular.module('zmApp.controllers') var mid = monitor.Monitor.Id; if (res.events.length == 0) res = undefined; monitor.Monitor.lastEvent = res; - if (monitor.Monitor.lastEvent && expandSidebar) { + if (monitor.Monitor.lastEvent && showMontageSidebars) { monitor.Monitor.showSidebar = true; } @@ -646,7 +646,7 @@ angular.module('zmApp.controllers') } - function loadEventStatus(expandSidebars) { + function loadEventStatus(showMontageSidebars) { // console.log ("LOADING EVENT STATUS"); if (!NVR.getLogin().enableMontageOverlays) { @@ -658,7 +658,7 @@ angular.module('zmApp.controllers') if ($scope.MontageMonitors[i].Monitor.Enabled == 0 || $scope.MontageMonitors[i].Monitor.listDisplay == 'noshow' || $scope.MontageMonitors[i].Monitor.Function == 'None') continue; - getEventStatus($scope.MontageMonitors[i], expandSidebars); + getEventStatus($scope.MontageMonitors[i], showMontageSidebars); } @@ -1393,7 +1393,7 @@ angular.module('zmApp.controllers') // console.log ("Refreshing Image..."); }.bind(this), zm.alarmStatusTime); - loadEventStatus(true); + loadEventStatus(ld.showMontageSidebars); intervalHandleEventStatus = $interval(function () { loadEventStatus(); // console.log ("Refreshing Image..."); @@ -2213,7 +2213,7 @@ angular.module('zmApp.controllers') // console.log ("Refreshing Image..."); }.bind(this), zm.alarmStatusTime); - loadEventStatus(true); + loadEventStatus(ld.showMontageSidebars); intervalHandleEventStatus = $interval(function () { loadEventStatus(); // console.log ("Refreshing Image..."); @@ -2279,6 +2279,7 @@ angular.module('zmApp.controllers') for (var i = 0; i < $scope.MontageMonitors.length; i++) { $scope.eventButtonClicked ($scope.MontageMonitors[i], false); + $scope.MontageMonitors[i].Monitor.showSidebar = false; } }; |
