Refactor setExtremes.
This commit is contained in:
parent
c819b62246
commit
ad60e19617
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user