[FIX] Set height and width when gantt load or sidebar open-close.
bzr revid: cpa@tinyerp.com-20110614133016-euwk5cmcmvgievwn
This commit is contained in:
@@ -2844,7 +2844,7 @@ GanttChart.prototype.create = function(divId)
|
||||
var newCellTblControl;
|
||||
|
||||
//Add to content Table
|
||||
this.contentHeight = content.offsetHeight;
|
||||
this.contentHeight = screen.height * 0.3;
|
||||
this.contentWidth = content.offsetWidth;
|
||||
content.appendChild(tableControl);
|
||||
|
||||
@@ -2891,6 +2891,8 @@ GanttChart.prototype.create = function(divId)
|
||||
if (this._showTreePanel) {
|
||||
this.panelNames.style.height = (this.contentHeight - 56) + "px";
|
||||
this.panelNames.style.width = this.maxWidthPanelNames + "px";
|
||||
this.panelTime.className = "ganttDayPanel";
|
||||
this.oData.className = "ganttTaskPanel";
|
||||
this.oData.style.width = (this.contentWidth - this.maxWidthPanelNames) + "px";
|
||||
this.panelTasks.style.width = this.dayInPixels * this.countDays + "px";
|
||||
this.panelTime.style.width = (this.contentWidth - this.maxWidthPanelNames - 0*18) + "px";
|
||||
|
||||
@@ -74,6 +74,12 @@ init: function(view_manager, session, element_id, dataset, view_id) {
|
||||
ganttChartControl.showContextMenu(true);
|
||||
ganttChartControl.showDescTask(true,'d,s-f');
|
||||
ganttChartControl.showDescProject(true,'n,d');
|
||||
|
||||
jQuery(".toggle-sidebar").click(function(e) {
|
||||
var $gantt_panel = jQuery(".ganttTaskPanel , .ganttDayPanel");
|
||||
$gantt_panel.width(100);
|
||||
$gantt_panel.width(jQuery("#oe_app_search").width() - 150);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<template>
|
||||
<t t-name="GanttView">
|
||||
<h3 class="title"><t t-esc="view.fields_view.arch.attrs.string"/></h3>
|
||||
<table class="gantt-view" width="100%" height="100%" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="width:100%;height:300px;position:relative" id="GanttDiv"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="width:100%;padding-top:10px;position:relative" id="GanttDiv"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user