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

Task #9886: added button to load full project

parent 5fd8a313
Branches
Tags
No related merge requests found
......@@ -1174,6 +1174,15 @@ dataControllerMod.controller('DataController',
}
};
$scope.getFullTimeWindowForSelectedProject = function() {
dataService.getProjectTasksTimeWindow(dataService.selected_project_id).then(function(window) {
if(window.min_starttime && window.max_endtime) {
dataService.viewTimeSpan.from = dataService.convertDatestringToLocalUTCDate(window.min_starttime);
dataService.viewTimeSpan.to = dataService.convertDatestringToLocalUTCDate(window.max_endtime);
}
});
};
$scope.$watch('dataService.viewTimeSpan', function() {
$scope.selectZoomTimespan();
......
......@@ -92,10 +92,11 @@
<button title="Scroll forward in time" type="button" class="btn btn-default" ng-click="scrollForward()"><i class="glyphicon glyphicon-step-forward"></i></button>
</p>
</div>
<div style="float:left; min-width:180px; padding-right:16px; ">
<div style="float:left; min-width:230px; padding-right:16px; ">
<label>Zoom:</label>
<p class="input-group">
<select class="form-control" ng-model="$parent.zoomTimespan" ng-options="option.name for option in $parent.zoomTimespans track by option.value" ng-change="$parent.onZoomTimespanChanged()"></select>
<select style="float:left; width:180px" class="form-control" ng-model="$parent.zoomTimespan" ng-options="option.name for option in $parent.zoomTimespans track by option.value" ng-change="$parent.onZoomTimespanChanged()"></select>
<button style="float:left; " title="Select full time window for this project" type="button" class="btn btn-default" ng-click="getFullTimeWindowForSelectedProject()"><i class="glyphicon glyphicon-resize-horizontal"></i></button>
</p>
</div>
<div style="float:left; min-width:50px;">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment