From 68c44d09942d3a72911df7f1c84d9b7910ad4bba Mon Sep 17 00:00:00 2001 From: Lorenzo Tilve Date: Mon, 17 May 2010 10:32:53 +0200 Subject: [PATCH 001/183] ItEr58S04ValidacionEProbasFuncionaisItEr57S04: Fixing bug. Timetracker headers were not moving on horizontal scroll --- .../resources/web/js/ganttz/resourceload/resourcesloadlist.js | 1 + 1 file changed, 1 insertion(+) 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 aa11002fa..e548e544a 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js +++ b/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js @@ -80,6 +80,7 @@ function addResourcesLoadListMethods(object) { var onScroll = function() { var timeplotcontainer_ = YAHOO.util.Selector.query('canvas.timeplot-canvas')[0]; timeplotcontainer_.style["left"] = "-" + scrolledpannel_.scrollLeft + "px"; + timetrackergap_.style["left"] = "-" + scrolledpannel_.scrollLeft + "px"; leftpanel_.style["top"] = "-" + scrolledpannel_.scrollTop + "px"; resourcesloadgraph_.scrollLeft = scrolledpannel_.scrollLeft; }; From ff0be4735867942dd97508c882325b89ebf4912a Mon Sep 17 00:00:00 2001 From: Lorenzo Tilve Date: Mon, 17 May 2010 10:32:54 +0200 Subject: [PATCH 002/183] ItEr58S04ValidacionEProbasFuncionaisItEr57S04: Fixing bug. Day detail in resourcesload list used a wrong javascript to relocate scroll --- .../navalplanner/web/resourceload/ResourceLoadController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadController.java index ee33563f0..f86e58dd8 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadController.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadController.java @@ -73,7 +73,6 @@ import org.zkoss.ganttz.util.Interval; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; -import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.Composer; import org.zkoss.zul.Button; import org.zkoss.zul.Datebox; @@ -496,9 +495,6 @@ public class ResourceLoadController implements Composer { chart.getChildren().clear(); chart.invalidate(); - String javascript = "zkTasklist.timeplotcontainer_rescroll();"; - Clients.evalJavaScript(javascript); - resetMinimumAndMaximumValueForChart(); Plotinfo plotInfoLoad = createPlotinfo(getLoad(interval.getStart(), From 5fa194ebb680e5d813aa8ec9dd46ac16c0499fba Mon Sep 17 00:00:00 2001 From: Lorenzo Tilve Date: Mon, 17 May 2010 10:32:55 +0200 Subject: [PATCH 003/183] ItEr58S04ValidacionEProbasFuncionaisItEr57S04: Fixing bug. Vertical resize of watermarks in resourcesload list --- .../ganttz/resourceload/ResourceLoadList.java | 6 +++- .../web/ganttz/zul/resourcesLoadLayout.zul | 4 +-- .../ganttz/resourceload/resourcesloadlist.js | 29 ++++++++++++++----- .../limitingResourcesLayout.zul | 4 +-- .../src/main/webapp/planner/order.zul | 2 +- 5 files changed, 31 insertions(+), 14 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 34ba35504..c373d8f01 100644 --- a/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourceLoadList.java +++ b/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourceLoadList.java @@ -36,6 +36,7 @@ import org.zkoss.zk.au.out.AuInvoke; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.HtmlMacroComponent; import org.zkoss.zk.ui.ext.AfterCompose; +import org.zkoss.zk.ui.util.Clients; /** * Component to include a list of ResourceLoads inside the ResourcesLoadPanel. @@ -98,6 +99,8 @@ public class ResourceLoadList extends HtmlMacroComponent implements for (LoadTimeLine l : line.getAllChildren()) { getComponentFor(l).detach(); } + Clients + .evalJavaScript("zkResourcesLoadList.recalculateTimetrackerHeight();"); } private ResourceLoadComponent getComponentFor(LoadTimeLine l) { @@ -118,7 +121,8 @@ public class ResourceLoadList extends HtmlMacroComponent implements insertBefore(child, nextSibling); nextSibling = child; } - + Clients + .evalJavaScript("zkResourcesLoadList.recalculateTimetrackerHeight();"); } private List getChildrenReverseOrderFor(LoadTimeLine line) { diff --git a/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul b/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul index 6b36e72a0..9aa535a8e 100644 --- a/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul +++ b/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul @@ -60,7 +60,7 @@ resourcesLoadPanel = self; splittable="true" autoscroll="true"> - + @@ -78,7 +78,7 @@ resourcesLoadPanel = self;
-
+
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 e548e544a..ce82e9133 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js +++ b/ganttzk/src/main/resources/web/js/ganttz/resourceload/resourcesloadlist.js @@ -20,6 +20,24 @@ zkResourcesLoadList = addResourcesLoadListMethods( {}); +zkResourcesLoadList.WATERMARK_MIN_HEIGHT = 450; +zkResourcesLoadList.WATERMARK_MARGIN_BOTTOM = 40; + +function resourceloadlist() { + return YAHOO.util.Selector.query('.resourceloadlist')[0]; +} + +function firstWatermarkColumn() { + return YAHOO.util.Selector.query('.rightpanellayout tr#watermark td')[0]; +} + +zkResourcesLoadList.recalculateTimetrackerHeight = function (cmp) { + var height = Math.max( + resourceloadlist().clientHeight + zkResourcesLoadList.WATERMARK_MARGIN_BOTTOM, + zkResourcesLoadList.WATERMARK_MIN_HEIGHT); + firstWatermarkColumn().style.height = height + "px"; +} + function addResourcesLoadListMethods(object) { var scrollSync; @@ -65,12 +83,10 @@ function addResourcesLoadListMethods(object) { zkResourcesLoadList.adjustTimeTrackerSize, cmp); scrollSync = new ScrollSync(cmp); scrollSync.synchXChangeTo(timetracker); - listenToScroll(); }; function listenToScroll() { - var timetrackergap_ = timetrackergap(); var scrolledpannel_ = scrolledpannel(); var resourcesloadgraph_ = resourcesloadgraph(); @@ -88,17 +104,14 @@ function addResourcesLoadListMethods(object) { rightpanel_.onscroll = onScroll; } + object.adjustTimeTrackerSize = function(cmp) { + zkResourcesLoadList.recalculateTimetrackerHeight(); 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"; + .query('.second_level_')[0].clientWidth + "px"; }; object.adjustResourceLoadRows = function(cmp) { diff --git a/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul b/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul index 883d01600..5fc3a8daa 100644 --- a/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul +++ b/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul @@ -78,7 +78,7 @@ resourcesLoadPanel = self; splittable="true" autoscroll="true"> - + @@ -96,7 +96,7 @@ resourcesLoadPanel = self;
-
+
diff --git a/navalplanner-webapp/src/main/webapp/planner/order.zul b/navalplanner-webapp/src/main/webapp/planner/order.zul index 780862710..2f10e974f 100644 --- a/navalplanner-webapp/src/main/webapp/planner/order.zul +++ b/navalplanner-webapp/src/main/webapp/planner/order.zul @@ -62,7 +62,7 @@ + width="870px" visible="false" > From 1a83d1cf1a4ffcdee37f4da2519661738aa7b352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Mon, 17 May 2010 13:55:37 +0200 Subject: [PATCH 004/183] ItEr58S05DocumentacionFormacionItEr57S05: Corrected some typos and added i18n to some strings directly on the source code. --- .../zkoss/ganttz/resourceload/ResourcesLoadPanel.java | 6 +++--- .../main/resources/web/ganttz/zul/leftTasksTree.zul | 10 +++++++--- .../resources/web/ganttz/zul/resourcesLoadLayout.zul | 6 +++--- .../web/limitingresources/LimitingResourcesPanel.java | 2 +- .../web/resourceload/ResourceLoadModel.java | 6 +++--- .../ws/resources/impl/ResourceConverter.java | 2 +- .../ws/workreports/impl/WorkReportConverter.java | 6 +++--- .../src/main/webapp/calendars/calendars.zul | 2 +- .../src/main/webapp/common/concurrent_modification.zul | 2 +- .../src/main/webapp/common/layout/timeout.zul | 2 +- .../src/main/webapp/resources/machine/_editMachine.zul | 2 +- 11 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java b/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java index 9f8d7db24..d4ad76b6e 100644 --- a/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java +++ b/ganttzk/src/main/java/org/zkoss/ganttz/resourceload/ResourcesLoadPanel.java @@ -82,7 +82,7 @@ public class ResourcesLoadPanel extends HtmlMacroComponent { private Listbox listZoomLevels; private static final String filterResources = _("by resources"); - private static final String filterCriterions = _("by criterions"); + private static final String filterCriteria = _("by criteria"); private String feedBackMessage; private Boolean filterbyResources; @@ -122,7 +122,7 @@ public class ResourcesLoadPanel extends HtmlMacroComponent { } public ListModel getFilters() { - String[] filters = new String[] { filterResources, filterCriterions }; + String[] filters = new String[] { filterResources, filterCriteria }; return new SimpleListModel(filters); } @@ -132,7 +132,7 @@ public class ResourcesLoadPanel extends HtmlMacroComponent { this.feedBackMessage = _("showing resources"); } else { this.filterbyResources = false; - this.feedBackMessage = _("showing criterions"); + this.feedBackMessage = _("showing criteria"); } refreshNameFilter = true; filterByNamePosition = 0; diff --git a/ganttzk/src/main/resources/web/ganttz/zul/leftTasksTree.zul b/ganttzk/src/main/resources/web/ganttz/zul/leftTasksTree.zul index 2d7b955ae..b059827cf 100644 --- a/ganttzk/src/main/resources/web/ganttz/zul/leftTasksTree.zul +++ b/ganttzk/src/main/resources/web/ganttz/zul/leftTasksTree.zul @@ -17,12 +17,16 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> + + +
- - - + + +
\ No newline at end of file diff --git a/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul b/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul index 9aa535a8e..b31211410 100644 --- a/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul +++ b/ganttzk/src/main/resources/web/ganttz/zul/resourcesLoadLayout.zul @@ -40,7 +40,7 @@ resourcesLoadPanel = self; - Filter: + ${i18n:_('Filter')}: @@ -64,7 +64,7 @@ resourcesLoadPanel = self; - + @@ -87,7 +87,7 @@ resourcesLoadPanel = self;
-
diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesPanel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesPanel.java index 5c8f6e79b..0cfd8ca75 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesPanel.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourcesPanel.java @@ -78,7 +78,7 @@ public class LimitingResourcesPanel extends HtmlMacroComponent { IResourceDAO resourcesDAO; private static final String filterResources = _("Filter by resources"); - private static final String filterCriterions = _("Filter by criterions"); + private static final String filterCriterions = _("Filter by criteria"); private boolean filterbyResources = true; private LimitingDependencyList dependencyList = new LimitingDependencyList(this); diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadModel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadModel.java index 9c1e5e8ce..9a7bc98b7 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadModel.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/resourceload/ResourceLoadModel.java @@ -327,7 +327,7 @@ public class ResourceLoadModel implements IResourceLoadModel { } LoadTimeLine group = new LoadTimeLine(buildTimeLine(criterion, - "Others ordes", "global-generic", allocations, + "Other orders", "global-generic", allocations, getCurrentTimeLineRole(null)), buildTimeLinesGroupForOrder( criterion, byOrder)); @@ -408,7 +408,7 @@ public class ResourceLoadModel implements IResourceLoadModel { private String getCriterionSatisfactionDescription( Set satisfactions) { if (satisfactions.isEmpty()) { - return _(""); + return ""; } List criterions = new ArrayList(); for (CriterionSatisfaction satisfaction : satisfactions) { @@ -490,7 +490,7 @@ public class ResourceLoadModel implements IResourceLoadModel { } TimeLineRole role = getCurrentTimeLineRole(null); LoadTimeLine group = new LoadTimeLine(buildTimeLine(resource, - _("Others ordes"), resourceAllocations, "resource", role), + _("Other orders"), resourceAllocations, "resource", role), buildTimeLinesGroupForOrder(resource, byOrder)); return group; } diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/ws/resources/impl/ResourceConverter.java b/navalplanner-webapp/src/main/java/org/navalplanner/ws/resources/impl/ResourceConverter.java index 451a8b520..d200f7558 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/ws/resources/impl/ResourceConverter.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/ws/resources/impl/ResourceConverter.java @@ -202,7 +202,7 @@ public class ResourceConverter { RESOURCE_CALENDAR_ENTITY_TYPE, e.getKey().toString()); } catch (MultipleInstancesException e) { throw new ValidationException(_( - "there exist multiple resource calendars with name {0}", + "there exist multiple resource calendars with name {0}", calendarCode)); } } diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/ws/workreports/impl/WorkReportConverter.java b/navalplanner-webapp/src/main/java/org/navalplanner/ws/workreports/impl/WorkReportConverter.java index 96f3e8270..69119e44c 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/ws/workreports/impl/WorkReportConverter.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/ws/workreports/impl/WorkReportConverter.java @@ -369,7 +369,7 @@ public final class WorkReportConverter { updateLabel(labelDTO, labels); } catch (InstanceNotFoundException e) { throw new ValidationException( - _("work report have not this label type assigned")); + _("work report has not this label type assigned")); } } @@ -390,7 +390,7 @@ public final class WorkReportConverter { value.setValue(StringUtils.trim(valueDTO.value)); } catch (InstanceNotFoundException e) { throw new ValidationException( - _("work report have not any description value with this field name")); + _("work report has not any description value with this field name")); } } @@ -448,7 +448,7 @@ public final class WorkReportConverter { updateLabel(labelDTO, labels); } catch (InstanceNotFoundException e) { throw new ValidationException( - _("work report line have not this label type assigned")); + _("a work report line has not this label type assigned")); } } diff --git a/navalplanner-webapp/src/main/webapp/calendars/calendars.zul b/navalplanner-webapp/src/main/webapp/calendars/calendars.zul index dc54dc9c7..3ed1c154d 100644 --- a/navalplanner-webapp/src/main/webapp/calendars/calendars.zul +++ b/navalplanner-webapp/src/main/webapp/calendars/calendars.zul @@ -49,7 +49,7 @@ position="center"> - diff --git a/navalplanner-webapp/src/main/webapp/common/concurrent_modification.zul b/navalplanner-webapp/src/main/webapp/common/concurrent_modification.zul index 7613d4752..af4172735 100644 --- a/navalplanner-webapp/src/main/webapp/common/concurrent_modification.zul +++ b/navalplanner-webapp/src/main/webapp/common/concurrent_modification.zul @@ -29,7 +29,7 @@ -
+
+
From 7bfbe86c3689ff904d0934875a0d15a9a8e69260 Mon Sep 17 00:00:00 2001 From: Diego Pino Garcia Date: Thu, 3 Jun 2010 18:32:18 +0200 Subject: [PATCH 114/183] ItEr59S08CUAsignacionRecursosLimitantesItEr58S10: Add 'allocation type' checkbox for selecting between appropriative or non-appropriative manual allocation --- .../DirectInsertAllocationController.java | 2 +- .../ILimitingResourceQueueModel.java | 6 +- .../LimitingResourceQueueModel.java | 23 ++- .../LimitingResourcesController.java | 19 ++- .../ManualAllocationController.java | 154 +++++++++++++++--- .../limitingResourcesLayout.zul | 65 ++++---- .../limitingresources/manualAllocation.zul | 19 ++- 7 files changed, 203 insertions(+), 85 deletions(-) diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java index 853b64ca4..29e28b554 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java @@ -98,7 +98,7 @@ public class DirectInsertAllocationController extends GenericForwardComposer { final LimitingResourceQueueElement element = getLimitingResourceQueueModel().getLimitingResourceQueueElement(); final LimitingResourceQueue queue = getSelectedQueue(); final DateAndHour allocationTime = getSelectedAllocationTime(); - getLimitingResourceQueueModel().insertQueueElementIntoQueueAt(element, queue, allocationTime); + getLimitingResourceQueueModel().appropriativeAllocation(element, queue, allocationTime); limitingResourcesController.reloadUnassignedLimitingResourceQueueElements(); limitingResourcesPanel.refreshQueue(queue); close(e); diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ILimitingResourceQueueModel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ILimitingResourceQueueModel.java index db72e908f..a31238f88 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ILimitingResourceQueueModel.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ILimitingResourceQueueModel.java @@ -55,8 +55,8 @@ import org.zkoss.ganttz.util.Interval; */ public interface ILimitingResourceQueueModel { - boolean assignEditingLimitingResourceQueueElementToQueueAt( - LimitingResourceQueue queue, DateAndHour time); + boolean nonAppropriativeAllocation( + LimitingResourceQueueElement element, LimitingResourceQueue queue, DateAndHour time); /** * Assigns a {@link LimitingResourceQueueElement} to its corresponding @@ -135,7 +135,7 @@ public interface ILimitingResourceQueueModel { * @param queue * @param allocationTime */ - void insertQueueElementIntoQueueAt(LimitingResourceQueueElement element, LimitingResourceQueue queue, + void appropriativeAllocation(LimitingResourceQueueElement element, LimitingResourceQueue queue, DateAndHour allocationTime); void removeUnassignedLimitingResourceQueueElement( diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourceQueueModel.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourceQueueModel.java index 09c02e3b5..96d27a0e6 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourceQueueModel.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/LimitingResourceQueueModel.java @@ -749,18 +749,21 @@ public class LimitingResourceQueueModel implements ILimitingResourceQueueModel { } @Override - public boolean assignEditingLimitingResourceQueueElementToQueueAt( - LimitingResourceQueue queue, DateAndHour startTime) { - Validate.notNull(beingEdited); + public boolean nonAppropriativeAllocation( + LimitingResourceQueueElement element, + LimitingResourceQueue queue, + DateAndHour startTime) { + + Validate.notNull(element); Validate.notNull(queue); Validate.notNull(startTime); - LimitingResourceQueue currentQueue = beingEdited.getLimitingResourceQueue(); + LimitingResourceQueue currentQueue = element.getLimitingResourceQueue(); if (currentQueue != null) { - removeDayAssignments(beingEdited); - removeFromQueue(currentQueue, beingEdited); + removeDayAssignments(element); + removeFromQueue(currentQueue, element); } - return assignLimitingResourceQueueElementToQueueAt(beingEdited, queue, startTime); + return assignLimitingResourceQueueElementToQueueAt(element, queue, startTime); } private void removeDayAssignments(LimitingResourceQueueElement element) { @@ -784,12 +787,16 @@ public class LimitingResourceQueueModel implements ILimitingResourceQueueModel { } @Override - public void insertQueueElementIntoQueueAt(LimitingResourceQueueElement _element, LimitingResourceQueue _queue, + public void appropriativeAllocation(LimitingResourceQueueElement _element, LimitingResourceQueue _queue, DateAndHour allocationTime) { LimitingResourceQueue queue = retrieveQueueFromModel(_queue); LimitingResourceQueueElement element = retrieveQueueElementFromModel(_element); + if (element.getLimitingResourceQueue() != null) { + unschedule(element); + } + List unscheduledElements = new ArrayList(); LimitingResourceQueueElementGap gap; 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 b42367798..1df264f0a 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 @@ -358,10 +358,10 @@ public class LimitingResourcesController extends GenericForwardComposer { private Hbox operations(LimitingResourceQueueElementDTO element) { Hbox hbox = new Hbox(); - hbox.appendChild(assignButton(element)); - hbox.appendChild(removeButton(element)); + hbox.appendChild(automaticButton(element)); hbox.appendChild(manualButton(element)); - hbox.appendChild(directInsertButton(element)); +// hbox.appendChild(directInsertButton(element)); + hbox.appendChild(removeButton(element)); return hbox; } @@ -382,7 +382,7 @@ public class LimitingResourcesController extends GenericForwardComposer { private Button manualButton(final LimitingResourceQueueElementDTO element) { Button result = new Button(); result.setLabel(_("Manual")); - result.setTooltiptext(_("Manual allocation")); + result.setTooltiptext(_("Assign elemento to queue manually")); result.addEventListener(Events.ON_CLICK, new EventListener() { @Override @@ -394,8 +394,9 @@ public class LimitingResourcesController extends GenericForwardComposer { } private Button removeButton(final LimitingResourceQueueElementDTO element) { - Button result = new Button(); - result.setLabel(_("Remove")); + Button result = new Button("", "/common/img/ico_borrar1.png"); + result.setHoverImage("/common/img/ico_borrar.png"); + result.setSclass("icono"); result.setTooltiptext(_("Remove limiting resource element")); result.addEventListener(Events.ON_CLICK, new EventListener() { @@ -416,11 +417,11 @@ public class LimitingResourcesController extends GenericForwardComposer { Util.reloadBindings(gridUnassignedLimitingResourceQueueElements); } - private Button assignButton( + private Button automaticButton( final LimitingResourceQueueElementDTO element) { Button result = new Button(); - result.setLabel(_("Assign")); - result.setTooltiptext(_("Assign to queue")); + result.setLabel(_("Automatic")); + result.setTooltiptext(_("Assign element to queue automatically")); result.addEventListener(Events.ON_CLICK, new EventListener() { @Override diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ManualAllocationController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ManualAllocationController.java index fed5769eb..3158d23bd 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ManualAllocationController.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/ManualAllocationController.java @@ -47,6 +47,7 @@ import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.SelectEvent; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zk.ui.util.GenericForwardComposer; +import org.zkoss.zul.Checkbox; import org.zkoss.zul.Datebox; import org.zkoss.zul.Listbox; import org.zkoss.zul.Listcell; @@ -73,12 +74,16 @@ public class ManualAllocationController extends GenericForwardComposer { private Radiogroup radioAllocationDate; + private Radio earliestDate, latestDate, selectStartDate; + private Datebox startAllocationDate; private Listbox listAssignableQueues; private Listbox listCandidateGaps; + private Checkbox cbAllocationType; + private Map endAllocationDates = new HashMap(); private final QueueRenderer queueRenderer = new QueueRenderer(); @@ -95,8 +100,14 @@ public class ManualAllocationController extends GenericForwardComposer { self.setVariable("manualAllocationController", this, true); listAssignableQueues = (Listbox) self.getFellowIfAny("listAssignableQueues"); listCandidateGaps = (Listbox) self.getFellowIfAny("listCandidateGaps"); + radioAllocationDate = (Radiogroup) self.getFellowIfAny("radioAllocationDate"); + earliestDate = (Radio) self.getFellowIfAny("earliestDate"); + latestDate = (Radio) self.getFellowIfAny("latestDate"); + selectStartDate = (Radio) self.getFellowIfAny("selectStartDate"); + startAllocationDate = (Datebox) self.getFellowIfAny("startAllocationDate"); + cbAllocationType = (Checkbox) self.getFellowIfAny("cbAllocationType"); } public void setLimitingResourcesPanel(LimitingResourcesPanel limitingResourcesPanel) { @@ -123,15 +134,46 @@ public class ManualAllocationController extends GenericForwardComposer { List gaps = LimitingResourceAllocator.getValidGapsForElementSince(element, queue, since); endAllocationDates = calculateEndAllocationDates(element.getResourceAllocation(), queue.getResource(), gaps); listCandidateGaps.setModel(new SimpleListModel(gaps)); - if (!gaps.isEmpty()) { - listCandidateGaps.setSelectedIndex(0); - setStartAllocationDate(gaps.get(0).getStartTime()); - startAllocationDate.setDisabled(true); - disable(radioAllocationDate, false); - } else { - disable(radioAllocationDate, true); + + if (!isAppropriative()) { + if (gaps.isEmpty()) { + disable(radioAllocationDate, true); + } else { + listCandidateGaps.setSelectedIndex(0); + setStartAllocationDate(gaps.get(0).getStartTime()); + } + radioAllocationDate.setSelectedIndex(0); + } + enableRadiobuttons(isAppropriative()); + listCandidateGaps.setSelectedIndex(0); + } + + private boolean isAppropriative() { + return cbAllocationType.isChecked(); + } + + private void enableRadiobuttons(boolean isAppropriative) { + final LimitingResourceQueueElement beingEdited = getBeingEditedElement(); + if (isAppropriative) { + listCandidateGaps.setDisabled(true); + + earliestDate.setDisabled(true); + latestDate.setDisabled(true); + selectStartDate.setDisabled(false); + selectStartDate.setSelected(true); + + startAllocationDate.setDisabled(false); + startAllocationDate.setValue(beingEdited.getEarlierStartDateBecauseOfGantt()); + } else { + listCandidateGaps.setDisabled(false); + + earliestDate.setDisabled(false); + earliestDate.setSelected(true); + latestDate.setDisabled(false); + selectStartDate.setDisabled(false); + + startAllocationDate.setDisabled(true); } - radioAllocationDate.setSelectedIndex(0); } private void setStartAllocationDate(DateAndHour time) { @@ -208,18 +250,32 @@ public class ManualAllocationController extends GenericForwardComposer { } public void accept(Event e) { - final LimitingResourceQueue queue = getSelectedQueue(); - final DateAndHour time = getSelectedAllocationTime(); + LimitingResourceQueueElement element = getBeingEditedElement(); + LimitingResourceQueue queue = getSelectedQueue(); + DateAndHour time = getSelectedAllocationTime(); + + if (isAppropriative()) { + appropriativeAllocation(element, queue, time); + } else { + nonAppropriativeAllocation(element, queue, time); + } + + limitingResourcesController.reloadUnassignedLimitingResourceQueueElements(); + setStatus(Messagebox.OK); + close(e); + } + + private void nonAppropriativeAllocation(LimitingResourceQueueElement element, LimitingResourceQueue queue, DateAndHour time) { Validate.notNull(time); getLimitingResourceQueueModel() - .assignEditingLimitingResourceQueueElementToQueueAt(queue, time); - limitingResourcesController.reloadUnassignedLimitingResourceQueueElements(); - - LimitingResourceQueueElement element = getLimitingResourceQueueModel() - .getLimitingResourceQueueElement(); + .nonAppropriativeAllocation(element, queue, time); limitingResourcesPanel.appendQueueElementToQueue(element); - setStatus(Messagebox.OK); - closeManualAllocationWindow(e); + } + + private void appropriativeAllocation(LimitingResourceQueueElement element, LimitingResourceQueue queue, DateAndHour time) { + Validate.notNull(time); + getLimitingResourceQueueModel().appropriativeAllocation(element, queue, time); + limitingResourcesPanel.refreshQueue(queue); } private DateAndHour getSelectedAllocationTime() { @@ -234,12 +290,20 @@ public class ManualAllocationController extends GenericForwardComposer { return getLatestTime(selectedGap); // Select start date } else if (index == 2) { - LocalDate selectedDay = new LocalDate(startAllocationDate.getValue()); - DateAndHour allocationTime = getValidDayInGap(selectedDay, getSelectedGap()); - if (allocationTime == null) { - throw new WrongValueException(startAllocationDate, _("Day is not valid within selected gap")); + final LocalDate selectedDay = new LocalDate(startAllocationDate.getValue()); + if (isAppropriative()) { + LimitingResourceQueueElement beingEdited = getBeingEditedElement(); + if (selectedDay.compareTo(new LocalDate(beingEdited.getEarlierStartDateBecauseOfGantt())) < 0) { + throw new WrongValueException(startAllocationDate, _("Day is not valid")); + } + return new DateAndHour(selectedDay, 0); + } else { + DateAndHour allocationTime = getValidDayInGap(selectedDay, getSelectedGap()); + if (allocationTime == null) { + throw new WrongValueException(startAllocationDate, _("Day is not valid")); + } + return allocationTime; } - return allocationTime; } return null; } @@ -300,7 +364,7 @@ public class ManualAllocationController extends GenericForwardComposer { setStatus(Messagebox.CANCEL); } - public void closeManualAllocationWindow(Event e) { + public void close(Event e) { self.setVisible(false); e.stopPropagation(); } @@ -315,13 +379,29 @@ public class ManualAllocationController extends GenericForwardComposer { final LocalDate startDate = getSelectedGap().getStartTime().getDate(); datebox.setValue(toDate(startDate)); } - highlightDaysInGap(datebox.getUuid(), getSelectedGap()); + + if (isAppropriative()) { + final LimitingResourceQueueElement beingEdited = getBeingEditedElement(); + highlightDaysFromDate(datebox.getUuid(), new LocalDate(beingEdited.getEarlierStartDateBecauseOfGantt())); + } else { + highlightDaysInGap(datebox.getUuid(), getSelectedGap()); + } + } + + private LimitingResourceQueueElement getBeingEditedElement() { + return getLimitingResourceQueueModel().getLimitingResourceQueueElement(); } private Date toDate(LocalDate date) { return date.toDateTimeAtStartOfDay().toDate(); } + /** + * Highlight calendar days within gap + * + * @param uuid + * @param gap + */ public void highlightDaysInGap(String uuid, LimitingResourceQueueElementGap gap) { final LocalDate start = gap.getStartTime().getDate(); final LocalDate end = getEndAllocationDate(gap); @@ -333,6 +413,20 @@ public class ManualAllocationController extends GenericForwardComposer { Clients.evalJavaScript(jsCall); } + /** + * Highlight calendar days starting from start + * + * @param uuid + * @param start + */ + public void highlightDaysFromDate(String uuid, LocalDate start) { + final String jsCall = "highlightDaysInInterval('" + + uuid + "', '" + + jsonInterval(formatDate(start), null) + "', '" + + jsonHighlightColor() + "');"; + Clients.evalJavaScript(jsCall); + } + private LocalDate getEndAllocationDate(LimitingResourceQueueElementGap gap) { final DateAndHour endTime = endAllocationDates.get(gap); return endTime != null ? endTime.getDate() : null; @@ -385,7 +479,7 @@ public class ManualAllocationController extends GenericForwardComposer { public void show(LimitingResourceQueueElement element) { try { - setStatus(Messagebox.CANCEL); + clear(); setAssignableQueues(element); getLimitingResourceQueueModel().init(element); ((Window) self).doModal(); @@ -398,6 +492,11 @@ public class ManualAllocationController extends GenericForwardComposer { } } + private void clear() { + setStatus(Messagebox.CANCEL); + cbAllocationType.setChecked(false); + } + public ListitemRenderer getQueueRenderer() { return queueRenderer; } @@ -427,4 +526,9 @@ public class ManualAllocationController extends GenericForwardComposer { } + public void onCheckAllocationType(Event e) { + Checkbox checkbox = (Checkbox) e.getTarget(); + enableRadiobuttons(checkbox.isChecked()); + } + } diff --git a/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul b/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul index 4b0ae943c..a09cfda6a 100644 --- a/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul +++ b/navalplanner-webapp/src/main/webapp/limitingresources/limitingResourcesLayout.zul @@ -95,42 +95,37 @@ - - - -
+ +
+ + +
-
- + + + + + + + + + + + + + + + + +
diff --git a/navalplanner-webapp/src/main/webapp/limitingresources/manualAllocation.zul b/navalplanner-webapp/src/main/webapp/limitingresources/manualAllocation.zul index f9715e94e..21b5f9681 100644 --- a/navalplanner-webapp/src/main/webapp/limitingresources/manualAllocation.zul +++ b/navalplanner-webapp/src/main/webapp/limitingresources/manualAllocation.zul @@ -5,7 +5,7 @@ width="500px" left="50px" top="50px" visible="false" closable="true" - onClose="manualAllocationController.closeManualAllocationWindow(event)"> + onClose="manualAllocationController.close(event)"> @@ -41,9 +41,9 @@ - - - + + + @@ -51,6 +51,17 @@ + + + + + + + + + From 92c281ff6454bebe0ee58aa9e8bde525e2d18e83 Mon Sep 17 00:00:00 2001 From: Diego Pino Garcia Date: Thu, 3 Jun 2010 18:32:19 +0200 Subject: [PATCH 115/183] ItEr59S08CUAsignacionRecursosLimitantesItEr58S10: Remove direct insert allocation window --- .../DirectInsertAllocationController.java | 216 ------------------ .../LimitingResourcesController.java | 39 ---- .../directInsertAllocationWindow.zul | 41 ---- .../limitingResourcesLayout.zul | 6 - 4 files changed, 302 deletions(-) delete mode 100644 navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java delete mode 100644 navalplanner-webapp/src/main/webapp/limitingresources/directInsertAllocationWindow.zul diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java deleted file mode 100644 index 29e28b554..000000000 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/limitingresources/DirectInsertAllocationController.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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 . - */ - -package org.navalplanner.web.limitingresources; - -import java.util.Date; -import java.util.List; - -import org.joda.time.LocalDate; -import org.navalplanner.business.planner.entities.DateAndHour; -import org.navalplanner.business.planner.entities.LimitingResourceQueueElement; -import org.navalplanner.business.resources.entities.LimitingResourceQueue; -import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Component; -import org.zkoss.zk.ui.SuspendNotAllowedException; -import org.zkoss.zk.ui.WrongValueException; -import org.zkoss.zk.ui.event.Event; -import org.zkoss.zk.ui.util.Clients; -import org.zkoss.zk.ui.util.GenericForwardComposer; -import org.zkoss.zul.Datebox; -import org.zkoss.zul.Listbox; -import org.zkoss.zul.Listcell; -import org.zkoss.zul.Listitem; -import org.zkoss.zul.ListitemRenderer; -import org.zkoss.zul.Messagebox; -import org.zkoss.zul.SimpleListModel; -import org.zkoss.zul.Window; - -/** - * Controller for manual allocation of queue elements - * - * @author Diego Pino García - */ -@Component -@Scope(BeanDefinition.SCOPE_PROTOTYPE) -public class DirectInsertAllocationController extends GenericForwardComposer { - - private LimitingResourcesController limitingResourcesController; - - private LimitingResourcesPanel limitingResourcesPanel; - - private Listbox listAssignableQueues; - - private Datebox startAllocationDate; - - private final QueueRenderer queueRenderer = new QueueRenderer(); - - public DirectInsertAllocationController() { - - } - - @Override - public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception { - this.self = comp; - self.setVariable("directInsertAllocationController", this, true); - listAssignableQueues = (Listbox) self.getFellowIfAny("listAssignableQueues"); - startAllocationDate = (Datebox) self.getFellowIfAny("startAllocationDate"); - } - - private void setAssignableQueues(final LimitingResourceQueueElement element) { - List queues = getLimitingResourceQueueModel().getAssignableQueues(element); - listAssignableQueues.setModel(new SimpleListModel(queues)); - listAssignableQueues.setSelectedIndex(0); - } - - public void setLimitingResourcesPanel(LimitingResourcesPanel limitingResourcesPanel) { - this.limitingResourcesPanel = limitingResourcesPanel; - } - - public void setLimitingResourcesController(LimitingResourcesController limitingResourcesController) { - this.limitingResourcesController = limitingResourcesController; - } - - public ILimitingResourceQueueModel getLimitingResourceQueueModel() { - return limitingResourcesController.getLimitingResourceQueueModel(); - } - - public void accept(Event e) { - setStatus(Messagebox.OK); - final LimitingResourceQueueElement element = getLimitingResourceQueueModel().getLimitingResourceQueueElement(); - final LimitingResourceQueue queue = getSelectedQueue(); - final DateAndHour allocationTime = getSelectedAllocationTime(); - getLimitingResourceQueueModel().appropriativeAllocation(element, queue, allocationTime); - limitingResourcesController.reloadUnassignedLimitingResourceQueueElements(); - limitingResourcesPanel.refreshQueue(queue); - close(e); - } - - private DateAndHour getSelectedAllocationTime() { - Date selectedDay = startAllocationDate.getValue(); - return new DateAndHour(new LocalDate(selectedDay), 0); - } - - private LimitingResourceQueue getSelectedQueue() { - LimitingResourceQueue result = null; - - final Listitem item = listAssignableQueues.getSelectedItem(); - if (item != null) { - result = (LimitingResourceQueue) item.getValue(); - } - return result; - } - - public void cancel() { - self.setVisible(false); - setStatus(Messagebox.CANCEL); - } - - public void close(Event e) { - self.setVisible(false); - e.stopPropagation(); - } - - private LimitingResourceQueueElement getEditingElement() { - return getLimitingResourceQueueModel().getLimitingResourceQueueElement(); - } - - public void highlightCalendar(Event event) { - final LimitingResourceQueueElement element = getEditingElement(); - Datebox datebox = (Datebox) event.getTarget(); - highlightDaysFromDate(datebox.getUuid(), new LocalDate(element.getEarlierStartDateBecauseOfGantt())); - } - - public void highlightDaysFromDate(String uuid, LocalDate start) { - final String jsCall = "highlightDaysInInterval('" - + uuid + "', '" - + jsonInterval(formatDate(start), null) + "', '" - + jsonHighlightColor() + "');"; - Clients.evalJavaScript(jsCall); - } - - public String formatDate(LocalDate date) { - return (date != null) ? date.toString() : null; - } - - private String jsonInterval(String start, String end) { - StringBuilder result = new StringBuilder(); - - result.append("{\"start\": \"" + start + "\", "); - if (end != null) { - result.append("\"end\": \"" + end + "\""); - } - result.append("}"); - - return result.toString(); - } - - private String jsonHighlightColor() { - return "{\"color\": \"blue\", \"bgcolor\": \"white\"}"; - } - - public void show(LimitingResourceQueueElement element) { - try { - setStatus(Messagebox.CANCEL); - startAllocationDate.setValue(element.getEarlierStartDateBecauseOfGantt()); - setAssignableQueues(element); - getLimitingResourceQueueModel().init(element); - ((Window) self).doModal(); - } catch (SuspendNotAllowedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - public Integer getStatus() { - return (Integer) self.getVariable("status", true); - } - - public void setStatus(int status) { - self.setVariable("status", new Integer(status), true); - } - - - public ListitemRenderer getQueueRenderer() { - return queueRenderer; - } - - private class QueueRenderer implements ListitemRenderer { - - @Override - public void render(Listitem item, Object data) throws Exception { - final LimitingResourceQueue queue = (LimitingResourceQueue) data; - item.setValue(queue); - item.appendChild(cell(queue)); - } - - private Listcell cell(LimitingResourceQueue queue) { - Listcell result = new Listcell(); - result.setLabel(queue.getResource().getName()); - return result; - } - - } - -} 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 1df264f0a..a42f8cf9c 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,8 +93,6 @@ public class LimitingResourcesController extends GenericForwardComposer { private Window manualAllocationWindow; - private Window directInsertAllocationWindow; - private final LimitingResourceQueueElementsRenderer limitingResourceQueueElementsRenderer = new LimitingResourceQueueElementsRenderer(); @@ -147,7 +145,6 @@ public class LimitingResourcesController extends GenericForwardComposer { cbSelectAll = (Checkbox) limitingResourcesPanel.getFellowIfAny("cbSelectAll"); initManualAllocationWindow(); - initDirectInsertAllocationWindow(); addCommands(limitingResourcesPanel); } catch (IllegalArgumentException e) { @@ -173,18 +170,6 @@ public class LimitingResourcesController extends GenericForwardComposer { "manualAllocationController", true); } - private void initDirectInsertAllocationWindow() { - directInsertAllocationWindow = (Window) limitingResourcesPanel.getFellowIfAny("directInsertAllocationWindow"); - DirectInsertAllocationController directInsertAllocationController = getDirectInsertAllocationController(); - directInsertAllocationController.setLimitingResourcesController(this); - directInsertAllocationController.setLimitingResourcesPanel(limitingResourcesPanel); - } - - private DirectInsertAllocationController getDirectInsertAllocationController() { - return (DirectInsertAllocationController) directInsertAllocationWindow.getVariable( - "directInsertAllocationController", true); - } - public ILimitingResourceQueueModel getLimitingResourceQueueModel() { return limitingResourceQueueModel; } @@ -360,25 +345,10 @@ public class LimitingResourcesController extends GenericForwardComposer { Hbox hbox = new Hbox(); hbox.appendChild(automaticButton(element)); hbox.appendChild(manualButton(element)); -// hbox.appendChild(directInsertButton(element)); hbox.appendChild(removeButton(element)); return hbox; } - private Button directInsertButton(final LimitingResourceQueueElementDTO element) { - Button result = new Button(); - result.setLabel(_("Insertion")); - result.setTooltiptext(_("Direct insert allocation")); - result.addEventListener(Events.ON_CLICK, new EventListener() { - - @Override - public void onEvent(Event event) throws Exception { - showDirectInsertAllocationWindow(element.getOriginal()); - } - }); - return result; - } - private Button manualButton(final LimitingResourceQueueElementDTO element) { Button result = new Button(); result.setLabel(_("Manual")); @@ -490,15 +460,6 @@ public class LimitingResourcesController extends GenericForwardComposer { return (status != null) ? status.intValue() : -1; } - private void showDirectInsertAllocationWindow(LimitingResourceQueueElement element) { - getDirectInsertAllocationController().show(element); - } - - public int getDirectInsertAllocationWindowStatus() { - Integer status = getDirectInsertAllocationController().getStatus(); - return (status != null) ? status.intValue() : -1; - } - public void reloadUnassignedLimitingResourceQueueElements() { Util.reloadBindings(gridUnassignedLimitingResourceQueueElements); } diff --git a/navalplanner-webapp/src/main/webapp/limitingresources/directInsertAllocationWindow.zul b/navalplanner-webapp/src/main/webapp/limitingresources/directInsertAllocationWindow.zul deleted file mode 100644 index ed01c4cd1..000000000 --- a/navalplanner-webapp/src/main/webapp/limitingresources/directInsertAllocationWindow.zul +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -