From f602109c53cca42cd35afd73d0a0fa23997ea9e4 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Wed, 19 Aug 2015 15:03:15 +0200 Subject: [PATCH] Cleanup. --- accountant/frontend/static/js/entries.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/accountant/frontend/static/js/entries.js b/accountant/frontend/static/js/entries.js index fe7aab6..6d4a940 100644 --- a/accountant/frontend/static/js/entries.js +++ b/accountant/frontend/static/js/entries.js @@ -172,13 +172,6 @@ accountantApp "$rootScope", "$scope", "$http", "$routeParams", function($rootScope, $scope, $http, $routeParams) { - $scope.setExtremes = function(e) { - begin = moment.utc(e.min); - end = moment.utc(e.max); - - $scope.selectRange(begin, end); - }; - // Configure chart for entries. $scope.config = { options: { @@ -246,7 +239,9 @@ accountantApp }, minRange: 3600 * 1000 * 24 * 14, // 2 weeks events: { - afterSetExtremes: $scope.setExtremes + afterSetExtremes: function(e) { + $scope.selectRange(moment.utc(e.min), moment.utc(e.max)); + } }, currentMin: moment.utc().startOf('month'), currentMax: moment.utc().endOf('month')