diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-12-06 12:10:29 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-12-06 12:10:29 -0500 |
| commit | 5d5c56fb66825f0b2ab8f57fd890118e453435fa (patch) | |
| tree | 880ee901c12bf72015e87b7f603c3b753e444281 /www/js | |
| parent | e82f80b46ada10cd83f2e0faf28a2281a27ec533 (diff) | |
made menu toggle persistent #390
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/DataModel.js | 10 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 15 |
2 files changed, 18 insertions, 7 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 4c8be1a7..8786b56e 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -107,7 +107,7 @@ angular.module('zmApp.controllers') 'montageOrder': '', 'montageHiddenOrder': '', 'montageArraySize': '0', - + 'showMontageSubMenu': false, 'graphSize': 2000, 'enableAlarmCount': true, 'minAlarmCount': 1, @@ -911,6 +911,14 @@ angular.module('zmApp.controllers') } + + if (typeof loginData.showMontageSubMenu == 'undefined') + { + + loginData.showMontageSubMenu = false; + + } + if (typeof loginData.monSingleImageQuality == 'undefined') { diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index ffb265cf..a2207946 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -706,7 +706,7 @@ angular.module('zmApp.controllers') NVRDataModel.debug("setting dragabilly to " + $scope.isDragabillyOn); if ($scope.isDragabillyOn) { - $scope.showSizeButtons = true; + $scope.toggleSubMenu = true; $scope.dragBorder = "dragborder"; NVRDataModel.debug("Enabling drag for " + draggies.length + " items"); @@ -1106,13 +1106,16 @@ angular.module('zmApp.controllers') }; - $scope.toggleSizeButtons = function() + $scope.toggleSubMenuFunction = function() { - $scope.showSizeButtons = !$scope.showSizeButtons; + $scope.toggleSubMenu = !$scope.toggleSubMenu; - NVRDataModel.debug("toggling size buttons:" + $scope.showSizeButtons); - if ($scope.showSizeButtons) $ionicScrollDelegate.$getByHandle("montage-delegate").scrollTop(); + NVRDataModel.debug("toggling size buttons:" + $scope.toggleSubMenu); + if ($scope.toggleSubMenu) $ionicScrollDelegate.$getByHandle("montage-delegate").scrollTop(); + var ld = NVRDataModel.getLogin(); + ld.showMontageSubMenu = $scope.toggleSubMenu; + NVRDataModel.setLogin(ld); }; // minimal has to be beforeEnter or header won't hide @@ -1173,7 +1176,7 @@ angular.module('zmApp.controllers') } $scope.monLimit = $scope.LoginData.maxMontage; - $scope.showSizeButtons = false; + $scope.toggleSubMenu = NVRDataModel.getLogin().showMontageSubMenu; $scope.monitors = message; $scope.MontageMonitors = angular.copy(message); |
