From 6460992ab3341423fb44ffd4e3318f00fdc80ec2 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sun, 17 Dec 2017 12:30:27 -0500 Subject: #570 inital framework for 24 hr moment --- www/js/app.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 4e98fcbc..d8c78a0d 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -133,6 +133,29 @@ angular.module('zmApp', [ }) + + // filter for montage iteration + .filter('onlyEnabledMoments', 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.Event.hide ) + { + out.push(item); + } + + }); + + return out; + }; + + }) + // filter for montage iteration .filter('onlyEnabled', function () { @@ -2109,6 +2132,24 @@ angular.module('zmApp', [ }) + + .state('app.moment', { + data: { + requireLogin: true + }, + resolve: { + message: function (NVRDataModel) { + //console.log("Inside app.events resolve"); + return NVRDataModel.getMonitors(0); + } + }, + cache: false, + url: "/moment", + templateUrl: "templates/moment.html", + controller: 'zmApp.MomentCtrl', + + }) + .state('app.devoptions', { data: { requireLogin: false -- cgit v1.2.3