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')