diff options
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); }; //--------------------------------------------------------------------- |
