From 45ea89756697d35eace6a9420ab7b0aeeec16e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Gonz=C3=A1lez=20Fern=C3=A1ndez?= Date: Sun, 23 Aug 2009 13:28:51 +0200 Subject: [PATCH] ItEr22S12CUVistaRecursosTempoPorProxectoItEr21S07: Increasing the width of .row_resourceload to expand the borders. It does not work well when the scroll appears --- .../zkoss/ganttz/resourceload/ResourceLoadList.java | 2 ++ .../web/js/ganttz/resourceload/resourcesloadlist.js | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourceLoadList.java b/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourceLoadList.java index bd894982a..adba4e7f0 100644 --- a/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourceLoadList.java +++ b/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourceLoadList.java @@ -38,6 +38,8 @@ public class ResourceLoadList extends XulElement { public void zoomLevelChanged(ZoomLevel detailLevel) { response(null, new AuInvoke(ResourceLoadList.this, "adjustTimeTrackerSize")); + response(null, new AuInvoke(ResourceLoadList.this, + "adjustResourceLoadRows")); } }; } diff --git a/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js b/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js index 2187d4da0..e1471edb5 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js +++ b/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js @@ -26,11 +26,18 @@ function addResourcesLoadListMethods(object) { zoom_buttons().style["left"] = scroll+"px"; }); scrollSync.synchXChangeTo(timetracker); - } + }; object.adjustTimeTrackerSize = function(cmp) { watermark().style["height"] = cmp.clientHeight + "px"; timetracker().style["width"] = cmp.clientWidth + "px"; - } + }; + + object.adjustResourceLoadRows = function(cmp) { + YAHOO.util.Selector.query('.row_resourceload').each(function(node){ + node.style["width"] = cmp.clientWidth + "px"; + }); + }; + return object; } \ No newline at end of file