From 9d00e4bd31d05947fc79b7595f5e21a8f9deef77 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Tue, 12 Jan 2016 16:20:05 +0530 Subject: #138 skip None as well as disabled Former-commit-id: 7a8e1b09d2f751f2358e450857745d174aeab182 --- www/js/ModalCtrl.js | 4 +++- www/templates/montage.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'www') diff --git a/www/js/ModalCtrl.js b/www/js/ModalCtrl.js index 854adcf1..b95beb34 100644 --- a/www/js/ModalCtrl.js +++ b/www/js/ModalCtrl.js @@ -443,6 +443,8 @@ $scope.togglePresets = function() if (curstate != "monitors") { + // FIXME: clean this up - in a situation where + // no monitors are enabled, will it loop for ever? do { mid = ZMDataModel.getNextMonitor(m, d); m = mid; @@ -451,7 +453,7 @@ $scope.togglePresets = function() found = 0; for (var i = 0; i < $scope.monitors.length; i++) { - if ($scope.monitors[i].Monitor.Id == mid && $scope.monitors[i].Monitor.listDisplay != 'noshow' && $scope.monitors[i].Monitor.Function !='None') { + if ($scope.monitors[i].Monitor.Id == mid && $scope.monitors[i].Monitor.listDisplay != 'noshow' && $scope.monitors[i].Monitor.Function !='None' && $scope.monitors[i].Monitor.Enabled != '0') { found = 1; console.log(mid + "is part of the monitor list"); ZMDataModel.zmDebug("ModalCtrl: swipe detected, moving to " + mid); diff --git a/www/templates/montage.html b/www/templates/montage.html index 4d7426d9..ac043ef8 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -33,7 +33,7 @@
- + -- cgit v1.2.3