Wired up timelines reset outline button.

pull/1114/head
Richard 11 years ago
parent 3c55702234
commit 4c0d465747
  1. 3
      app/assets/javascripts/angular/directives/timelines/timeline-toolbar-directive.js
  2. 2
      public/templates/timelines/toolbar.html

@ -53,6 +53,9 @@ angular.module('openproject.timelines.directives')
scope.currentScaleIndex--; scope.currentScaleIndex--;
} }
}; };
scope.resetOutline = function(){
scope.timeline.expandTo(0);
}
scope.$watch('currentScaleName', function(newScaleName, oldScaleName){ scope.$watch('currentScaleName', function(newScaleName, oldScaleName){
if (newScaleName !== oldScaleName) { if (newScaleName !== oldScaleName) {

@ -31,7 +31,7 @@
<div class="tl-toolbar-container" style="width: 1px; height: 20px; background-color: rgb(0, 0, 0);"></div> <div class="tl-toolbar-container" style="width: 1px; height: 20px; background-color: rgb(0, 0, 0);"></div>
<div class="tl-toolbar-container"> <div class="tl-toolbar-container">
<a href="javascript://" title="Reset Outline" class="icon tl-icon-outline"></a> <a href="javascript://" title="Reset Outline" class="icon tl-icon-outline" ng-click="resetOutline()"></a>
</div> </div>
<div class="tl-toolbar-container"> <div class="tl-toolbar-container">

Loading…
Cancel
Save