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 | |
| parent | e82f80b46ada10cd83f2e0faf28a2281a27ec533 (diff) | |
made menu toggle persistent #390
Diffstat (limited to 'www')
| -rw-r--r-- | www/js/DataModel.js | 10 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 15 | ||||
| -rw-r--r-- | www/templates/montage.html | 4 |
3 files changed, 20 insertions, 9 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); diff --git a/www/templates/montage.html b/www/templates/montage.html index 3bb62104..680ebe5b 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -3,7 +3,7 @@ <button class="button button-icon button-clear ion-navicon" ng-click="openMenu()"></button> <button class="button button-icon button-clear ion-eye" ng-click="hideUnhide();"> </button> - <button class="button button-icon button-clear ion-android-more-vertical" ng-click="toggleSizeButtons();"> + <button class="button button-icon button-clear ion-android-more-vertical" ng-click="toggleSubMenuFunction();"> </button> <button data-badge="{{$root.alarmCount}}" class="animated infinite tada button button-icon button-clear ion-ios-bell notification-badge" ng-click="handleAlarms();" ng-if="$root.isAlarm"></button> </ion-nav-buttons> @@ -23,7 +23,7 @@ </button> </ion-nav-buttons> <ion-content scroll-sista ng-cloak has-bouncing="false" style="background-color:#444444" delegate-handle="montage-delegate" overflow-scroll="false"> - <div ng-if="!minimal && showSizeButtons" > + <div ng-if="!minimal && toggleSubMenu" > <!-- this is header --> <br/> <div id="flyoutmenu" style="float:left"> |
