parent
54154cff3c
commit
e31ccef3ed
@ -0,0 +1,24 @@ |
||||
timelinesApp.directive('zoomSlider', function() { |
||||
return { |
||||
restrict: 'A', |
||||
link: function(scope, element, attributes) { |
||||
zooms = jQuery('select[name="zooms"]'); |
||||
element.slider({ |
||||
min: 1, |
||||
max: Timeline.ZOOM_SCALES.length, |
||||
range: 'min', |
||||
value: zooms[0].selectedIndex + 1, |
||||
slide: function(event, ui) { |
||||
zooms[0].selectedIndex = ui.value - 1; |
||||
}, |
||||
change: function(event, ui) { |
||||
zooms[0].selectedIndex = ui.value - 1; |
||||
timeline.zoom(ui.value - 1); |
||||
} |
||||
}).css({ |
||||
// top right bottom left
|
||||
'margin': '4px 6px 3px' |
||||
}); |
||||
} |
||||
}; |
||||
}); |
@ -0,0 +1,42 @@ |
||||
<div id="soon-to-become-{{getTimelineContainerElementId()}}"> |
||||
<div class="tl-toolbar"> |
||||
<div class="tl-toolbar-container"> |
||||
<a ng-if='timeline.USE_MODALS' ng-click="timeline.addPlanningElement()" title="{{timeline.i18n('timelines.new_work_package')}}" class="icon icon-add"></a> |
||||
</div> |
||||
|
||||
<div class="tl-toolbar-container" style="width: 1px; height: 20px; background-color: rgb(0, 0, 0);"></div> |
||||
|
||||
<div class="tl-toolbar-container"> |
||||
<a href="javascript://" title="Zoom out" class="icon tl-icon-zoomout" ng-click="setCurrentScaleLevel(getCurrentScaleLevel() - 1)"></a> |
||||
</div> |
||||
|
||||
<div class="tl-toolbar-container" style="width: 100px; height: 20px;"> |
||||
<div id="zoom-slider" zoom-slider></div> |
||||
</div> |
||||
|
||||
<div class="tl-toolbar-container"> |
||||
<a href="javascript://" title="Zoom in" class="icon tl-icon-zoomin" ng-click="setCurrentScaleLevel(getCurrentScaleLevel() + 1)"></a> |
||||
</div> |
||||
|
||||
|
||||
<div class="tl-toolbar-container"> |
||||
<form> |
||||
<select name="zooms" ng-model="currentScale" ng-options="timeline.i18n(Timeline.ZOOM_CONFIGURATIONS[scale].name) for scale in Timeline.ZOOM_SCALES"> |
||||
</select> |
||||
</form> |
||||
</div> |
||||
|
||||
<div class="tl-toolbar-container" style="width: 1px; height: 20px; background-color: rgb(0, 0, 0);"></div> |
||||
|
||||
<div class="tl-toolbar-container"> |
||||
<a href="javascript://" title="Reset Outline" class="icon tl-icon-outline"></a> |
||||
</div> |
||||
|
||||
<div class="tl-toolbar-container"> |
||||
<form> |
||||
<select name="outlines" ng-model="currentOutlineLevel" ng-options="timeline.i18n(Timeline.OUTLINE_CONFIGURATIONS[level].name) for level in Timeline.OUTLINE_LEVELS"> |
||||
</select> |
||||
</form> |
||||
</div> |
||||
</div> |
||||
</div> |
Loading…
Reference in new issue