diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2016-01-19 11:38:16 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2016-01-19 11:38:16 -0500 |
| commit | ee0e220a8131075dff46a6e82525f2e73b12757d (patch) | |
| tree | 08a357bd4fad93c4f9496ec91973ad8f4c779ad6 /www/js | |
| parent | 1aa0eff2752bdd50703fb4974c7d053cbec5c9e2 (diff) | |
#144 - persist display order of montage (row or col)
Former-commit-id: 5372d335edf8d941aa11c1f93be4179219b23ea9
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/DataModel.js | 9 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 9 |
2 files changed, 15 insertions, 3 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index a0ff20d9..4bbf3e01 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -62,6 +62,7 @@ angular.module('zmApp.controllers') 'minAlarmCount':'1', 'montageSize':'10', 'useNphZms':true, + 'packMontage':true, }; @@ -231,10 +232,16 @@ angular.module('zmApp.controllers') if (typeof loginData.useNphZms == 'undefined') { - zmDebug ("useNphZms does not exist. Setting to false"); + zmDebug ("useNphZms does not exist. Setting to true"); loginData.useNphZms = true; } + if (typeof loginData.packMontage == 'undefined') + { + zmDebug ("packMontage does not exist. Setting to true"); + loginData.packMontage = true; + } + zmLog ("DataModel init recovered this loginData as " + JSON.stringify(loginData)); } else diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 4b167318..1551a18d 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -70,7 +70,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' var loginData = ZMDataModel.getLogin(); - $scope.packMontage = true; + $scope.packMontage = loginData.packMontage; @@ -699,11 +699,16 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' }; - + + //--------------------------------------------------------------------- + // changes order of montage display + //--------------------------------------------------------------------- $scope.toggleMontageDisplayOrder = function() { $scope.packMontage = !$scope.packMontage; + loginData.packMontage = $scope.packMontage; + ZMDataModel.setLogin(loginData); }; //--------------------------------------------------------------------- |
