diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/AdvancedAllocationController.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/AdvancedAllocationController.java index 2aefb66d9..43ce16348 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/AdvancedAllocationController.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/AdvancedAllocationController.java @@ -35,6 +35,7 @@ import java.util.WeakHashMap; import java.util.Map.Entry; import java.util.concurrent.Callable; +import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; import org.joda.time.DateTime; import org.joda.time.LocalDate; @@ -515,8 +516,9 @@ public class AdvancedAllocationController extends GenericForwardComposer { Restriction restriction) { return Row.createRow(messages, restriction, specificResourceAllocation.getResource() - .getShortDescription(), 1, Arrays - .asList(specificResourceAllocation)); + .getName(), 1, Arrays + .asList(specificResourceAllocation), specificResourceAllocation + .getResource().getShortDescription()); } private List genericRows(AllocationInput allocationInput) { @@ -541,7 +543,7 @@ public class AdvancedAllocationController extends GenericForwardComposer { private Row buildGroupingRow(AllocationInput allocationInput) { Restriction restriction = allocationInput.getResultReceiver() .createRestriction(); - String taskName = _("{0} (task)", allocationInput.getTaskName()); + String taskName = _("{0}", allocationInput.getTaskName()); Row groupingRow = Row.createRow(messages, restriction, taskName, 0, allocationInput.getAllocationsSortedByStartDate()); return groupingRow; @@ -650,12 +652,19 @@ interface CellChangedListener { class Row { - - static Row createRow(IMessagesForUser messages, AdvancedAllocationController.Restriction restriction, String name, int level, - List> allocations) { + List> allocations, + String description) { + Row newRow = new Row(messages, restriction, name, level, allocations); + newRow.setDescription(description); + return newRow; + } + + static Row createRow(IMessagesForUser messages, + AdvancedAllocationController.Restriction restriction, String name, + int level, List> allocations) { return new Row(messages, restriction, name, level, allocations); } @@ -673,6 +682,8 @@ class Row { private String name; + private String description; + private int level; private final AggregateOfResourceAllocations aggregate; @@ -967,6 +978,13 @@ class Row { if (nameLabel == null) { nameLabel = new Label(); nameLabel.setValue(name); + if (!StringUtils.isBlank(description)) { + nameLabel.setTooltiptext(description); + } else { + nameLabel.setTooltiptext(name); + } + + nameLabel.setSclass("level" + level); } return nameLabel; } @@ -978,9 +996,6 @@ class Row { this.messages = messages; this.restriction = restriction; this.name = name; - if (level != 0) { - this.name = " ยท " + this.name; - } this.level = level; this.aggregate = new AggregateOfResourceAllocations( new ArrayList>(allocations)); @@ -1059,4 +1074,12 @@ class Row { return level == 0; } + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + } diff --git a/navalplanner-webapp/src/main/webapp/common/css/navalpro_zk.css b/navalplanner-webapp/src/main/webapp/common/css/navalpro_zk.css index 46cc6c528..f4e12f1ad 100644 --- a/navalplanner-webapp/src/main/webapp/common/css/navalpro_zk.css +++ b/navalplanner-webapp/src/main/webapp/common/css/navalpro_zk.css @@ -1131,14 +1131,6 @@ tr.z-tree-row-seld, tr.z-list-item-seld, font-weight:bold; } -.advancedassignmentdetails .hours { - min-width: 30px; -} - -.function { - min-width: 90px; -} - .migas_linea .scheduling-state { -moz-border-radius-bottomleft: 6px; -moz-border-radius-bottomright: 1px; diff --git a/navalplanner-webapp/src/main/webapp/planner/css/ganttzk.css b/navalplanner-webapp/src/main/webapp/planner/css/ganttzk.css index b6d475f4c..9b86cf7fe 100644 --- a/navalplanner-webapp/src/main/webapp/planner/css/ganttzk.css +++ b/navalplanner-webapp/src/main/webapp/planner/css/ganttzk.css @@ -668,19 +668,63 @@ div.z-tree { padding:0 !important; } .advancedallocationlayout .taskspanelgap td.z-row-inner input { - padding-top:2px; - padding-bottom:2px; + padding-top: 1px; + padding-bottom:1px; } +.advancedallocationlayout .taskspanelgap .z-label { + margin-left:3px; +} + +.advancedallocationlayout .taskspanelgap .level1 { + margin-left:8px; +} + + .taskspanelgap table { border-collapse: collapse; } +.advancedallocationlayout .taskspanelgap input { + width: 100%; + heigth: 21px; +} + +.advancedallocationlayout .taskspanelgap tr.z-grid-odd td.z-row-inner, tr.z-grid-odd, +.advancedallocationlayout .taskspanelgap tr.z-row { + background: #E8E8E8; +} + +.advancedallocationlayout .taskspanelgap input { + widht: 100%; +} + + .taskspanelgap input { border: 0; height: 19px; + } +.advancedassignmentdetails tr.z-row, +.taskspanelgap tr.z-row { + height: 23px; +} + +.advancedassignmentdetails td { + overflow:hidden; + white-space: nowrap; +} + +.advancedassignmentdetails .level1 { + margin-left:12px; +} + +.advancedassignmentdetails .level0 { + font-weight:bold; +} + + .advancedallocationlayout .leftpanelgap .z-grid-header { /* padding-bottom: 3px; */ border-bottom: solid 1px #DDDDDD; @@ -696,19 +740,30 @@ div.z-tree { padding-bottom:0; } -.advancedallocationlayout .leftpanelgap input { - height:19px; - width: 52px; +.advancedassignmentdetails .z-intbox { + width: 50px; } - -.advancedallocationlayout .leftpanelgap .hours { +.advancedassignmentdetails .z-combobox-inp { width: 60px; } .advancedallocationlayout .leftpanelgap .name { - min-width: 200px; } +.advancedassignmentdetails .hours { + width: 60px; +} + +.advancedassignmentdetails .function { + width: 110px; +} + +.advancedassignmentdetails .z-combobox { + margin-top: 2px; +} +.advancedassignmentdetails .z-intbox { + padding-left: 0px; +} #tasksTree div.z-tree-header, #tasksTree div.z-tree-header tr, #tasksTree div.z-tree-footer { overflow:visible; @@ -771,9 +826,10 @@ div.z-tree { display:none; } +/* .advancedassignmentdetails .z-row, .advancedallocationlayout .taskspanelgap .z-row { height: 20px; -} +} */ .advancedallocationlayout .taskspanelgap td.z-row-inner { padding:1px;