Skip to content

Commit

Permalink
#806 when global check is tapped, clear sidebars
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Apr 13, 2019
1 parent 84b8dad commit b4413e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@
<plugin name="cordova-plugin-photo-library" spec="https://github.com/nilebma/cordova-plugin-photo-library.git">
<variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value=" " />
</plugin>
<plugin name="cordova-plugin-media-pp-fork" spec="^1.0.2-dev" />
<plugin name="cordova-plugin-ionic-webview" spec="https://github.com/pliablepixels/cordova-plugin-ionic-webview.git">
<variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-media-pp-fork" spec="^1.0.2-dev" />
<engine name="android" spec="7.1.4" />
<engine name="ios" spec="5.0.0" />
</widget>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zmninjapro",
"description": "Home security mobile app for ZoneMinder",
"version": "1.3.057",
"version":"1.3.057",
"displayName": "zmNinja",
"author": "Pliable Pixels",
"license": "custom see LICENSE.md",
Expand Down Expand Up @@ -183,4 +183,4 @@
]
}
}
}
}
13 changes: 7 additions & 6 deletions www/js/MontageCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand All @@ -646,7 +646,7 @@ angular.module('zmApp.controllers')

}

function loadEventStatus(expandSidebars) {
function loadEventStatus(showMontageSidebars) {
// console.log ("LOADING EVENT STATUS");

if (!NVR.getLogin().enableMontageOverlays) {
Expand All @@ -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);

}

Expand Down Expand Up @@ -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...");
Expand Down Expand Up @@ -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...");
Expand Down Expand Up @@ -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;
}

};
Expand Down

0 comments on commit b4413e4

Please sign in to comment.