diff options
| author | PliablePixels <pliablepixels@gmail.com> | 2015-08-07 20:33:53 -0400 |
|---|---|---|
| committer | PliablePixels <pliablepixels@gmail.com> | 2015-08-07 20:33:53 -0400 |
| commit | c854d6c9189298487cd698934f96be28b1bc9bad (patch) | |
| tree | c3563b85c2382470992a529442c41c8eeb80e63b /www/js/MontageCtrl.js | |
| parent | 3aa6aed4d45f536a93f1b25432cd41f47a1ce466 (diff) | |
Lots of refactoring - API is not tied into Portal Auth - bugs may need to be ironed out
Diffstat (limited to 'www/js/MontageCtrl.js')
| -rw-r--r-- | www/js/MontageCtrl.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 99b6d5b5..4b9ed5be 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -11,7 +11,8 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' // Controller main //--------------------------------------------------------------------- - + console.log("******** HAVE ALL MONITORS"); + $scope.monitors = message; document.addEventListener("pause", onPause, false); document.addEventListener("resume", onResume, false); @@ -41,8 +42,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' $scope.slider = {}; $scope.slider.monsize = ZMDataModel.getMontageSize(); - console.log("******** HAVE ALL MONITORS"); - $scope.monitors = message; + // The difference between old and original is this: // old will have a copy of the last re-arranged monitor list @@ -86,7 +86,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' } // at this stage, the monitor arrangement is not matching // the montage order. Its in true order. Let us first process the hiddenOrder part // now - + for (i = 0; i < montageOrder.length; i++) { montageOrder[i] = parseInt(montageOrder[i]); hiddenOrder[i] = parseInt(hiddenOrder[i]); @@ -95,9 +95,12 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' // disabled monitors if (hiddenOrder[i] == 1) { // $scope.monitors[i].Monitor.listDisplay='noshow'; + + if ($scope.monitors[i] !== undefined) $scope.monitors[i].Monitor.listDisplay = 'noshow'; ZMDataModel.zmLog("Monitor " + i + " is marked as hidden in montage"); } else { + if ($scope.monitors[i] !== undefined) $scope.monitors[i].Monitor.listDisplay = 'show'; } } |
