[FIX] OPW 575804: web_gantt: hide internal dhtmlx duration for tasks/phases, as it is misleading
The `duration` used by the dhtmlx gantt component corresponds to the calendar duration of the event divided by 3. This makes sense only for events spanning full days, and for working times with 8 hours per day. Unfortunately these hypotheses do not hold for most cases inside OpenERP, so we should hide this information. The actual duration of the items can always been viewed by clicking on the corresponding label. bzr revid: odo@openerp.com-20120702133016-gzscrpbbh1a9mgez
This commit is contained in:
@@ -3139,9 +3139,10 @@ GanttTask.prototype.getPopUpInfo = function(object, event)
|
||||
//data of task
|
||||
var tblInfo = this.Chart.divInfo.lastChild;
|
||||
tblInfo.rows[0].cells[0].innerHTML = "<div style='font-family: Arial, Helvetica, Sans-serif; font-size: 12px; font-weight: bold; color: #688060; margin: 0 0 4px 0;'>" + this.TaskInfo.Name + "</div>";
|
||||
tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>EST: </span><span class='ut'>" + this.TaskInfo.EST.getDate() + "." + (this.TaskInfo.EST.getMonth() + 1) + "." + this.TaskInfo.EST.getFullYear() + "</span><br/>";
|
||||
tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Duration: </span><span class='ut'>" + this.TaskInfo.Duration + " hours </span><br/>";
|
||||
// tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Percent Complete: </span><span class='ut'>" + this.TaskInfo.PercentCompleted + "% </span><br/>";
|
||||
tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Start Date: </span><span class='ut'>" + this.TaskInfo.EST.getDate() + "." + (this.TaskInfo.EST.getMonth() + 1) + "." + this.TaskInfo.EST.getFullYear() + "</span><br/>";
|
||||
// Hidden because currently misleading or unavailable:
|
||||
// tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Duration: </span><span class='ut'>" + this.TaskInfo.Duration + " hours </span><br/>";
|
||||
// tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Percent Complete: </span><span class='ut'>" + this.TaskInfo.PercentCompleted + "% </span><br/>";
|
||||
|
||||
//show predecessor task
|
||||
if (this.predTask)
|
||||
@@ -3804,8 +3805,9 @@ GanttProject.prototype.getPopUpInfo = function(object, event)
|
||||
var tblInfo = this.Chart.divInfo.lastChild;
|
||||
tblInfo.rows[0].cells[0].innerHTML = "<div style='font-family: Arial, Helvetica, Sans-serif; font-size: 12px; font-weight: bold; color: #688060; margin:0 0 4px 0;'>" + this.Project.Name + "</div>";
|
||||
tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Start Date: </span><span class='ut'>" + this.Project.StartDate.getDate() + "." + (this.Project.StartDate.getMonth() + 1) + "." + this.Project.StartDate.getFullYear() + "</span><br/>";
|
||||
tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Duration: </span><span class='ut'>" + this.Duration + " hours</span><br/>";
|
||||
// tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Percent Complete: </span><span class='ut'>" + this.percentCompleted + "%</span><br/>";
|
||||
// Hidden because currently misleading or unavailable:
|
||||
// tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Duration: </span><span class='ut'>" + this.Duration + " hours</span><br/>";
|
||||
// tblInfo.rows[0].cells[0].innerHTML += "<span class='st'>Percent Complete: </span><span class='ut'>" + this.percentCompleted + "%</span><br/>";
|
||||
|
||||
this.Chart.divInfo.style.cssText = "z-index:2;position: absolute;display: inline;";
|
||||
|
||||
@@ -4081,7 +4083,8 @@ GanttTask.prototype.resizeTaskItem = function(width)
|
||||
taskItem.childNodes[1].firstChild.width = width + "px";
|
||||
|
||||
//resize info
|
||||
this.cTaskItem[0].childNodes[1].firstChild.rows[0].cells[0].innerHTML = countHours;
|
||||
// Hidden because currently misleading:
|
||||
// this.cTaskItem[0].childNodes[1].firstChild.rows[0].cells[0].innerHTML = countHours;
|
||||
taskItem.childNodes[2].childNodes[0].style.width = width + "px";
|
||||
taskItem.childNodes[2].childNodes[1].style.left = width - 10 + "px";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user