From d2ac0cac045d9a6a340765810b75e31295db23f8 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Wed, 21 Jan 2015 10:22:25 -0500 Subject: [PATCH] Get event URL based on whether there is a filter --- web/skins/bootstrap/js/app.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/skins/bootstrap/js/app.js b/web/skins/bootstrap/js/app.js index cf33b1ce7..e9a6f8d75 100644 --- a/web/skins/bootstrap/js/app.js +++ b/web/skins/bootstrap/js/app.js @@ -2,7 +2,8 @@ var ZoneMinder = angular.module('ZoneMinder', [ 'ZoneMinderControllers', 'tc.chartjs', 'ui.bootstrap', - 'angularUtils.directives.dirPagination' + 'angularUtils.directives.dirPagination', + 'ui.bootstrap.datetimepicker' ]); ZoneMinder.config(['$locationProvider', function($locationProvider){ @@ -79,8 +80,12 @@ ZoneMinder.factory('Footer', function($http) { ZoneMinder.factory('Events', function($http) { return { - get: function(page) { - return $http.get('/api/events.json?page='+page); + get: function(filter, page) { + if (filter) { + return $http.get('/api/events/index/'+filter+'.json?page='+page); + } else { + return $http.get('/api/events.json?page='+page); + } } }; });