diff options
| -rw-r--r-- | www/js/app.js | 23 | ||||
| -rw-r--r-- | www/templates/montage.html | 7 |
2 files changed, 28 insertions, 2 deletions
diff --git a/www/js/app.js b/www/js/app.js index 74a27c68..6cac5802 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -81,6 +81,28 @@ angular.module('zmApp', [ }) + +// filter for montage iteration +.filter('onlyEnabled', function() { + + // Create the return function and set the required parameter name to **input** + return function(input) { + + var out = []; + + angular.forEach(input, function(item) { + + if ((item.Monitor.Function != 'None') && (item.Monitor.Enabled!='0')) { + out.push(item); + } + + }); + + return out; + }; + +}) + // https://forum.ionicframework.com/t/ng-src-not-updated-in-video-tag/7540/6 .directive('dynamicUrl', function () { return { @@ -429,6 +451,7 @@ angular.module('zmApp', [ 'request': function (config) { + // console.log (">>>>"+config.url); // handle basic auth properly if (config.url.indexOf("@") > -1) { //console.log ("HTTP basic auth INTERCEPTOR URL IS " + config.url); diff --git a/www/templates/montage.html b/www/templates/montage.html index 43340041..c27e2ef9 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -53,8 +53,11 @@ - <span ng-repeat="monitor in MontageMonitors|limitTo: monLimit" - ng-if="monitor.Monitor.Function!='None' && monitor.Monitor.Enabled !='0' "> + <!-- <span ng-repeat="monitor in MontageMonitors|limitTo: monLimit" + ng-if="monitor.Monitor.Function!='None' && monitor.Monitor.Enabled !='0' ">--> + + <span ng-repeat="monitor in MontageMonitors | onlyEnabled |limitTo: monLimit" > + |
