summaryrefslogtreecommitdiff
path: root/www/js/app.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-06-28 10:42:15 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-06-28 10:42:15 -0400
commitc841472fd5b2b6cf038cfde02283239166f3b0a1 (patch)
tree77448d50a4638cbdf6fbf592a4c2b24744a00ec8 /www/js/app.js
parenta0b53e19dcf4afaaa0ffc3ec2bed0a6a27b62d70 (diff)
#277 - took out ng-if and wrote a custom filter
Former-commit-id: a293b031b874288a0c0a2d4e2ebb2a2dab990e2e
Diffstat (limited to 'www/js/app.js')
-rw-r--r--www/js/app.js23
1 files changed, 23 insertions, 0 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);