Skip to content
Snippets Groups Projects
Commit 7ea47f7e authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #9607: adapted custom timespan string

parent 212068a9
No related branches found
No related tags found
No related merge requests found
......@@ -1105,7 +1105,13 @@ dataControllerMod.controller('DataController',
} else {
var customZoomTimespan = $scope.zoomTimespans.find(function(zts) { return zts.name.startsWith('Custom'); });
customZoomTimespan.value = viewTimeSpanInMinutes;
customZoomTimespan.name = 'Custom (' + viewTimeSpanInMinutes + ' min)';
if(viewTimeSpanInMinutes < 1440) {
customZoomTimespan.name = 'Custom (' + viewTimeSpanInMinutes + ' min)';
} else {
var viewTimeSpanInDays = Math.floor(viewTimeSpanInMinutes / 1440);
var viewTimeSpanReaminingMinutes = viewTimeSpanInMinutes - viewTimeSpanInDays * 1440;
customZoomTimespan.name = 'Custom (' + viewTimeSpanInDays + ' days ' + viewTimeSpanReaminingMinutes + ' min)';
}
$scope.zoomTimespan = customZoomTimespan;
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment