summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2017-01-29 10:25:27 +0530
committerPliable Pixels <pliablepixels@gmail.com>2017-01-29 10:25:27 +0530
commit322009158f051c79ffae5e2dcaabf242bcaa369f (patch)
tree43406ff5b6bd1b6e5037593bc39e03b5fc8a9229 /www/js
parent5c58f502350d07213caeb5370d3b845d16cdc760 (diff)
you can now toggle a dev option to hide/unhide archived (flagged) events #432
Diffstat (limited to 'www/js')
-rw-r--r--www/js/DataModel.js8
-rw-r--r--www/js/app.js16
2 files changed, 24 insertions, 0 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js
index 6c9b806c..382f1f36 100644
--- a/www/js/DataModel.js
+++ b/www/js/DataModel.js
@@ -144,6 +144,7 @@ angular.module('zmApp.controllers')
'fastLogin': true,
'followTimeLine': false,
'timelineScale': -1,
+ 'hideArchived': false,
};
@@ -964,6 +965,13 @@ angular.module('zmApp.controllers')
}
+ if (typeof loginData.hideArchived == 'undefined')
+ {
+
+ loginData.hideArchived = false;
+
+ }
+
log("DataModel init recovered this loginData as " + JSON.stringify(loginData));
}
else
diff --git a/www/js/app.js b/www/js/app.js
index 359343ff..4827af11 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -102,6 +102,22 @@ angular.module('zmApp', [
})
+.filter ('eventListFilter', function(NVRDataModel)
+{
+ return function (input) {
+ var ld = NVRDataModel.getLogin();
+ var out = [];
+ angular.forEach (input, function (item)
+ {
+ if (item.Event.Archived == '0' || !ld.hideArchived) {
+ out.push(item);
+ }
+ });
+ return out;
+ };
+
+})
+
// filter for montage iteration
.filter('onlyEnabled', function()
{