Feature #20481 » change_to_right_and_left_resizable_panel.patch
| app/views/gantts/show.html.erb | ||
|---|---|---|
|
<%= content_tag(:div, :style => style, :class => "gantt_subjects_container") do %>
|
||
|
<%
|
||
|
style = ""
|
||
|
style += "right:-2px;"
|
||
|
style += "width: #{subject_width}px;"
|
||
|
style += "height: #{headers_height}px;"
|
||
|
style += 'background: #eee;'
|
||
| ... | ... | |
|
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||
|
<%
|
||
|
style = ""
|
||
|
style += "right:-2px;"
|
||
|
style += "width: #{subject_width}px;"
|
||
|
style += "height: #{t_height}px;"
|
||
|
style += 'border-left: 1px solid #c0c0c0;'
|
||
| ... | ... | |
|
wday = 1 if wday > 7
|
||
|
%>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<% ###### Days headers ####### %>
|
||
|
<% if show_days %>
|
||
| ... | ... | |
|
<%= javascript_tag do %>
|
||
|
var issue_relation_type = <%= raw Redmine::Helpers::Gantt::DRAW_TYPES.to_json %>;
|
||
|
$(document).ready(drawGanttHandler);
|
||
|
$(window).resize(drawGanttHandler);
|
||
|
$(function() {
|
||
|
drawGanttHandler();
|
||
|
resizableSubjectColumn();
|
||
|
$("#draw_relations").change(drawGanttHandler);
|
||
|
$("#draw_progress_line").change(drawGanttHandler);
|
||
|
});
|
||
|
$(window).resize(function() {
|
||
|
drawGanttHandler();
|
||
|
resizableSubjectColumn();
|
||
|
});
|
||
|
<% end %>
|
||
| public/javascripts/gantt.js | ||
|---|---|---|
|
if ($("#draw_relations").prop('checked'))
|
||
|
drawRelations();
|
||
|
}
|
||
|
function resizableSubjectColumn(){
|
||
|
if(isMobile()) {
|
||
|
$('td.gantt_subjects_column').resizable("destroy");
|
||
|
}else{
|
||
|
$('td.gantt_subjects_column').resizable({
|
||
|
alsoResize: ".gantt_subjects_container, .gantt_subjects_container>.gantt_hdr, .project-name, .issue-subject",
|
||
|
minWidth: 100,
|
||
|
handles: "e",
|
||
|
containment: "#content",
|
||
|
create: function( event, ui ) {
|
||
|
$(".ui-resizable-e").css("cursor","ew-resize");
|
||
|
}
|
||
|
}).on('resize', function (e) {
|
||
|
e.stopPropagation();
|
||
|
});
|
||
|
};
|
||
|
}
|
||