From 79abd405ca4366593b2456e4c5d9aab220d288a1 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Mon, 30 Jan 2017 11:25:13 +0530 Subject: updated files with code that got deleted when I merged the PR #433 --- www/js/app.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 52b25185..f7bc5e69 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -102,6 +102,24 @@ angular.module('zmApp', [ }) + +// for events view +.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() { -- cgit v1.2.3