summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2017-12-20 09:56:55 -0500
committerPliable Pixels <pliablepixels@gmail.com>2017-12-20 09:56:55 -0500
commitd2eef84479c99e11f01927ffe119a20669f3c450 (patch)
tree226323577ca0a4d2dec9140a45110a34ee63fc69 /www/js
parent5783fe0652bd645081d2bab10104f247417703ea (diff)
#570 persistent submenu toggle
Diffstat (limited to 'www/js')
-rwxr-xr-xwww/js/DataModel.js11
-rw-r--r--www/js/MomentCtrl.js15
2 files changed, 20 insertions, 6 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 2c7e640b..2a4ac72f 100755
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -170,7 +170,8 @@ angular.module('zmApp.controllers')
'isFullScreen': false,
'reloadInMontage': false,
'momentGridSize': 40,
- 'momentMonitorFilter': []
+ 'momentMonitorFilter': [],
+ 'enableMomentSubMenu': false,
};
@@ -1027,6 +1028,12 @@ angular.module('zmApp.controllers')
}
+ if (typeof loginData.enableMomentSubMenu == 'undefined') {
+
+ loginData.enableMomentSubMenu = false;
+
+ }
+
if (typeof loginData.momentMonitorFilter == 'undefined') {
loginData.momentMonitorFilter = JSON.stringify([]);
@@ -2067,8 +2074,8 @@ angular.module('zmApp.controllers')
getStreamingURL: function (id) {
var idnum = parseInt(id);
for (var i = 0; i < monitors.length; i++) {
+ // console.log ("Matched, exiting getMonitorname");
if (parseInt(monitors[i].Monitor.Id) == idnum) {
- // console.log ("Matched, exiting getMonitorname");
return monitors[i].Monitor.streamingURL;
}
diff --git a/www/js/MomentCtrl.js b/www/js/MomentCtrl.js
index 67947d98..c5300d0e 100644
--- a/www/js/MomentCtrl.js
+++ b/www/js/MomentCtrl.js
@@ -197,6 +197,12 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
$scope.isSubMenu = !$scope.isSubMenu;
+
+ var ld = NVRDataModel.getLogin();
+ ld.enableMomentSubMenu = $scope.isSubMenu;
+ NVRDataModel.setLogin(ld);
+
+
if ($scope.isSubMenu)
$ionicScrollDelegate.$getByHandle("moment-delegate").scrollTop();
//($scope.isSubMenu);
@@ -263,7 +269,8 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
}
} //for
if (hide) {
- $scope.moments[ndx].Event.collapseCount = collapseCount;
+ // +1 for the marked frame which doesn't get counted
+ $scope.moments[ndx].Event.collapseCount = collapseCount+1;
} else {
$scope.moments[ndx].Event.collapseCount = "";
}
@@ -310,7 +317,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
}
}
- console.log ("ENDED");
+ //console.log ("ENDED");
constructMask();
var ld = NVRDataModel.getLogin();
@@ -462,7 +469,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
});
- }
+ };
$scope.showThumbnail = function (b, f) {
@@ -668,7 +675,7 @@ angular.module('zmApp.controllers').controller('zmApp.MomentCtrl', ['$scope', '$
excludeMonitors = JSON.parse(ld.momentMonitorFilter || []);
console.log ("RETRIEVED EXCLUDE="+JSON.stringify(excludeMonitors));
constructMask();
- $scope.isSubMenu = false;
+ $scope.isSubMenu = ld.enableMomentSubMenu;
monitors = angular.copy(message);