|
|
|
@ -124,11 +124,19 @@ angular.module('openproject.timelines.directives') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function renderTimeline() { |
|
|
|
|
fetchData() |
|
|
|
|
return fetchData() |
|
|
|
|
.then(buildWorkPackageTable) |
|
|
|
|
.then(drawChart); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function reloadTimeline() { |
|
|
|
|
return fetchData() |
|
|
|
|
.then(buildWorkPackageTable) |
|
|
|
|
.then(function() { |
|
|
|
|
scope.timeline.expandToOutlineLevel(scope.currentOutlineLevel); // also triggers rebuildAll()
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function registerModalHelper() { |
|
|
|
|
scope.timeline.modalHelper = modalHelperInstance; |
|
|
|
|
|
|
|
|
@ -142,7 +150,10 @@ angular.module('openproject.timelines.directives') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
jQuery(scope.timeline.modalHelper).on('closed', function() { |
|
|
|
|
renderTimeline(); // TODO remove and do updates via scope
|
|
|
|
|
reloadTimeline().then(function() { |
|
|
|
|
window.clearTimeout(scope.timeline.safetyHook); |
|
|
|
|
}); |
|
|
|
|
// TODO remove and do updates via scope
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|