diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-01-30 11:25:13 +0530 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-01-30 11:25:13 +0530 |
| commit | 79abd405ca4366593b2456e4c5d9aab220d288a1 (patch) | |
| tree | b73d07c197701dec340cbcb114d32a7374c9a4bc /www/js | |
| parent | 035a5123833d6d26bbc1957ebd2481d4bea4dcd6 (diff) | |
updated files with code that got deleted when I merged the PR #433
Diffstat (limited to 'www/js')
| -rwxr-xr-x | www/js/DataModel.js | 10 | ||||
| -rwxr-xr-x | www/js/app.js | 18 |
2 files changed, 28 insertions, 0 deletions
diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 77e5ae9a..7c46c1d0 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -148,6 +148,7 @@ angular.module('zmApp.controllers') 'fastLogin': true, 'followTimeLine': false, 'timelineScale': -1, + 'hideArchived': false }; @@ -961,6 +962,8 @@ angular.module('zmApp.controllers') } + + if (typeof loginData.monSingleImageQuality == 'undefined') { @@ -968,6 +971,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 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() { |
