diff options
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/MontageCtrl.js | 13 | ||||
| -rw-r--r-- | www/js/NVR.js | 8 |
2 files changed, 15 insertions, 6 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 3871d42c..4a5e03e6 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -595,7 +595,7 @@ angular.module('zmApp.controllers') }; - function getEventStatus(monitor) { + function getEventStatus(monitor, expandSidebar) { ld = NVR.getLogin(); // https:///zm/api/events/index/MonitorId=:2.json?sort=StartTime&direction=desc&limit=1 @@ -634,6 +634,9 @@ 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) { + monitor.Monitor.showSidebar = true; + } }, function (err) { @@ -643,7 +646,7 @@ angular.module('zmApp.controllers') } - function loadEventStatus() { + function loadEventStatus(expandSidebars) { // console.log ("LOADING EVENT STATUS"); if (!NVR.getLogin().enableMontageOverlays) { @@ -655,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]); + getEventStatus($scope.MontageMonitors[i], expandSidebars); } @@ -1390,7 +1393,7 @@ angular.module('zmApp.controllers') // console.log ("Refreshing Image..."); }.bind(this), zm.alarmStatusTime); - loadEventStatus(); + loadEventStatus(true); intervalHandleEventStatus = $interval(function () { loadEventStatus(); // console.log ("Refreshing Image..."); @@ -2210,7 +2213,7 @@ angular.module('zmApp.controllers') // console.log ("Refreshing Image..."); }.bind(this), zm.alarmStatusTime); - loadEventStatus(); + loadEventStatus(true); intervalHandleEventStatus = $interval(function () { loadEventStatus(); // console.log ("Refreshing Image..."); diff --git a/www/js/NVR.js b/www/js/NVR.js index a2e518ba..0153bd79 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -193,7 +193,8 @@ angular.module('zmApp.controllers') 'objectDetectionFilter': false, 'enableEventRefresh': true, 'lastEventCheckTimes':{}, - 'enableMontageOverlays': true + 'enableMontageOverlays': true, + 'showMontageSidebars': false @@ -1051,6 +1052,11 @@ angular.module('zmApp.controllers') } + if (typeof loginData.showMontageSidebars == 'undefined') { + loginData.showMontageSidebars = false; + + } + loginData.canSwipeMonitors = true; loginData.forceImageModePath = false; loginData.enableBlog = true; |
