diff --git a/accountant/frontend/static/js/entries.js b/accountant/frontend/static/js/entries.js index ac2d622..667a2a8 100644 --- a/accountant/frontend/static/js/entries.js +++ b/accountant/frontend/static/js/entries.js @@ -171,7 +171,6 @@ accountantApp "SoldChartController", [ "$rootScope", "$scope", "$http", "$routeParams", function($rootScope, $scope, $http, $routeParams) { - // Configure chart for entries. $scope.config = { options: { @@ -240,7 +239,9 @@ accountantApp minRange: 3600 * 1000 * 24 * 14, // 2 weeks events: { afterSetExtremes: function(e) { - $scope.selectRange(moment.utc(e.min), moment.utc(e.max)); + $scope.$emit("rangeSelectedEvent", { + begin: moment.utc(e.min), end: moment.utc(e.max) + }); } }, currentMin: moment.utc().startOf('month'), @@ -260,10 +261,6 @@ accountantApp useHighStocks: true }; - $scope.selectRange = function(begin, end) { - $scope.$emit("rangeSelectedEvent", {begin: begin, end: end}); - }; - $scope.loadSolds = function() { $scope.config.loading = true;