Fix javascript error when resizing ganttpanel and chart is not shown

FEA: ItEr68S04BugFixing
This commit is contained in:
Lorenzo Tilve 2011-01-21 17:57:45 +01:00
parent 856f88df3f
commit eab8e216bd

View file

@ -725,8 +725,12 @@ zkTaskContainer.legendResize = function(cmp) {
var taskdetailsContainer = YAHOO.util.Selector.query('.taskdetailsContainer')[0];
var legendContainer = YAHOO.util.Selector.query('.legend-container')[0];
var legendContainerEarned = YAHOO.util.Selector.query('.legend-container')[1];
legendContainer.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px";
legendContainerEarned.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px";
if ( legendContainer != undefined ) {
legendContainer.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px";
}
if ( legendContainerEarned != undefined ) {
legendContainerEarned.style["width"] = (taskdetailsContainer.clientWidth - LEGEND_CONTAINER_OFFSET )+"px";
}
};