timetracker
org.zkoss.ganttz.timetracker.TimeTrackerComponent
diff --git a/ganttzk/src/main/resources/web/ganttz/limitingresources/limitingdependencylist.dsp b/ganttzk/src/main/resources/web/ganttz/limitingresources/limitingdependencylist.dsp
new file mode 100644
index 000000000..3557ba84e
--- /dev/null
+++ b/ganttzk/src/main/resources/web/ganttz/limitingresources/limitingdependencylist.dsp
@@ -0,0 +1,16 @@
+<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
+<%@ taglib uri="http://www.zkoss.org/dsp/zk/core" prefix="z" %>
+
+
+
+
+
+
+
+ ${z:redraw(child, null)}
+
+
+
+
+
+
diff --git a/ganttzk/src/main/resources/web/ganttz/limitingresources/limitingresources.dsp b/ganttzk/src/main/resources/web/ganttz/limitingresources/limitingresources.dsp
index 907fd3f43..a1ba008f8 100644
--- a/ganttzk/src/main/resources/web/ganttz/limitingresources/limitingresources.dsp
+++ b/ganttzk/src/main/resources/web/ganttz/limitingresources/limitingresources.dsp
@@ -2,6 +2,7 @@
<%@ taglib uri="http://www.zkoss.org/dsp/zk/core" prefix="z" %>
+
${self.resourceLoadName}
diff --git a/ganttzk/src/main/resources/web/js/ganttz/limitingresources/limitingdependencylist.js b/ganttzk/src/main/resources/web/js/ganttz/limitingresources/limitingdependencylist.js
new file mode 100644
index 000000000..0dd28a648
--- /dev/null
+++ b/ganttzk/src/main/resources/web/js/ganttz/limitingresources/limitingdependencylist.js
@@ -0,0 +1,24 @@
+/*
+ * This file is part of NavalPlan
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+zkDependencylist = {};
+
+zkDependencylist.init = function (cmp) {
+}
diff --git a/ganttzk/src/main/resources/web/js/ganttz/limitingresources/limitingresourceslist.js b/ganttzk/src/main/resources/web/js/ganttz/limitingresources/limitingresourceslist.js
new file mode 100644
index 000000000..cb286ce66
--- /dev/null
+++ b/ganttzk/src/main/resources/web/js/ganttz/limitingresources/limitingresourceslist.js
@@ -0,0 +1,112 @@
+/*
+ * This file is part of NavalPlan
+ *
+ * Copyright (C) 2009 Fundación para o Fomento da Calidade Industrial e
+ * Desenvolvemento Tecnolóxico de Galicia
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+zkLimitingResourcesList = addLimitingResourcesListMethods( {});
+
+function addLimitingResourcesListMethods(object) {
+ var scrollSync;
+
+ function watermark() {
+ return document.getElementById('watermark');
+ }
+
+ function timetracker() {
+ return document.getElementById('timetracker');
+ }
+
+ function resourceloadlist() {
+ return YAHOO.util.Selector.query('.resourceloadlist')[0];
+ }
+
+ function taskspanelgap() {
+ return YAHOO.util.Selector.query('.taskspanelgap')[0];
+ }
+
+ function resourcesloadgraph() {
+ return YAHOO.util.Selector.query('.resourcesloadgraph div')[0];
+ }
+
+ function scrolledpannel() {
+ return YAHOO.util.Selector.query('.rightpanellayout div')[0];
+ }
+
+
+ function timetrackergap() {
+ return YAHOO.util.Selector.query('.timetrackergap')[0];
+ }
+
+ function leftpanel() {
+ return YAHOO.util.Selector.query('.leftpanelgap .z-tree-body')[0];
+ }
+
+
+ object.init = function(cmp) {
+ this.adjustTimeTrackerSize(cmp);
+ YAHOO.util.Event.addListener(window, 'resize',
+ zkResourcesLoadList.adjustTimeTrackerSize, cmp);
+ scrollSync = new ScrollSync(cmp);
+ scrollSync.synchXChangeTo(timetracker);
+
+ listenToScroll();
+ };
+
+ function listenToScroll() {
+
+ var timetrackergap_ = timetrackergap();
+ var scrolledpannel_ = scrolledpannel();
+ var resourcesloadgraph_ = resourcesloadgraph();
+ var leftpanel_ = leftpanel();
+
+ var onScroll = function() {
+ timetrackergap_.style["left"] = "-" + scrolledpannel_.scrollLeft + "px";
+ leftpanel_.style["top"] = "-" + scrolledpannel_.scrollTop + "px";
+ resourcesloadgraph_.scrollLeft = scrolledpannel_.scrollLeft;
+
+ };
+
+ YAHOO.util.Selector.query('.rightpanellayout div')[0].onscroll = onScroll;
+
+ }
+
+ object.adjustTimeTrackerSize = function(cmp) {
+ watermark().style["height"] = cmp.clientHeight + "px";
+ timetracker().style["width"] = cmp.clientWidth + "px";
+ /* Set watermark width */
+ YAHOO.util.Selector.query('.resourceloadlist')[0].style["width"] = YAHOO.util.Selector
+ .query('.second_level_')[0].clientWidth
+ + "px";
+ YAHOO.util.Selector.query('.rightpanellayout tr#watermark td')[0].style["height"] =
+ /* Calculate min : taskspanelgap().clientHeight + 120 + 'px'; ) */
+ YAHOO.util.Selector.query('.resourceloadlist')[0].clientHeight + 120
+ + "px";
+ };
+
+ object.adjustResourceLoadRows = function(cmp) {
+ YAHOO.util.Selector.query('.row_resourceload').each(function(node) {
+ node.style["width"] = cmp.clientWidth + "px";
+ });
+ };
+
+ object.adjustScrollHorizontalPosition = function(cmp, offsetInPx) {
+ cmp.scrollLeft = offsetInPx;
+ }
+
+ return object;
+}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesController.java
index e36bfc164..2a69914a3 100644
--- a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesController.java
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesController.java
@@ -93,7 +93,7 @@ public class LimitingResourcesController implements Composer {
resourceLoadModel.initGlobalView(filterBy, filterByResources);
}
timeTracker = buildTimeTracker();
- limitingResourcesPanel = buildResourcesLoadPanel();
+ limitingResourcesPanel = buildLimitingResourcesPanel();
addListeners();
this.parent.getChildren().clear();
@@ -104,7 +104,7 @@ public class LimitingResourcesController implements Composer {
try {
Messagebox
.show(
- _("Some lines have not allocation periods.\nBelow it shows the load all company resources"),
+_("Limiting resources error") + e,
_("Error"), Messagebox.OK, Messagebox.ERROR);
} catch (InterruptedException o) {
throw new RuntimeException(e);
@@ -139,7 +139,7 @@ public class LimitingResourcesController implements Composer {
SeveralModificators.create(new BankHolidaysMarker()), parent);
}
- private LimitingResourcesPanel buildResourcesLoadPanel() {
+ private LimitingResourcesPanel buildLimitingResourcesPanel() {
return new LimitingResourcesPanel(resourceLoadModel.getLoadTimeLines(),
timeTracker);
}
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/tabs/LimitingResourcesTabCreator.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/tabs/LimitingResourcesTabCreator.java
index d1e9c5bdb..170ba6bfe 100644
--- a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/tabs/LimitingResourcesTabCreator.java
+++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/tabs/LimitingResourcesTabCreator.java
@@ -52,8 +52,8 @@ public class LimitingResourcesTabCreator {
LimitingResourcesController LimitingResourcesControllerGlobal,
Component breadcrumbs) {
return new LimitingResourcesTabCreator(mode,
- LimitingResourcesController, upCommand,
- LimitingResourcesControllerGlobal, breadcrumbs)
+ LimitingResourcesController, LimitingResourcesControllerGlobal,
+ breadcrumbs)
.build();
}
@@ -62,29 +62,27 @@ public class LimitingResourcesTabCreator {
private final LimitingResourcesController LimitingResourcesControllerGlobal;
- private final IToolbarCommand upCommand;
private final Component breadcrumbs;
private LimitingResourcesTabCreator(Mode mode,
LimitingResourcesController LimitingResourcesController,
- IToolbarCommand upCommand,
LimitingResourcesController LimitingResourcesControllerGlobal,
Component breadcrumbs) {
this.mode = mode;
this.LimitingResourcesController = LimitingResourcesController;
- this.upCommand = upCommand;
this.LimitingResourcesControllerGlobal = LimitingResourcesControllerGlobal;
this.breadcrumbs = breadcrumbs;
}
private ITab build() {
return TabOnModeType.forMode(mode)
- .forType(ModeType.GLOBAL, createGlobalResourcesLoadTab())
- .forType(ModeType.ORDER, createOrderResourcesLoadTab())
+.forType(ModeType.GLOBAL,
+ createGlobalLimitingResourcesTab()).forType(ModeType.ORDER,
+ createOrderLimitingResourcesTab())
.create();
}
- private ITab createOrderResourcesLoadTab() {
+ private ITab createOrderLimitingResourcesTab() {
IComponentCreator componentCreator = new IComponentCreator() {
@Override
@@ -122,7 +120,7 @@ public class LimitingResourcesTabCreator {
};
}
- private ITab createGlobalResourcesLoadTab() {
+ private ITab createGlobalLimitingResourcesTab() {
final IComponentCreator componentCreator = new IComponentCreator() {