ItEr46S20CUAsignacionGrupoRecursosAPlanificacionItEr32S12: Added tooltiptext and resolved alignment problems in advanced allocation window details

This commit is contained in:
Lorenzo Tilve 2010-02-11 12:34:57 +01:00 committed by Javier Moran Rua
parent 1150b02438
commit 15fcefa907
3 changed files with 97 additions and 26 deletions

View file

@ -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<Row> 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<? extends ResourceAllocation<?>> allocations) {
List<? extends ResourceAllocation<?>> 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<? extends ResourceAllocation<?>> 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<ResourceAllocation<?>>(allocations));
@ -1059,4 +1074,12 @@ class Row {
return level == 0;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View file

@ -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;

View file

@ -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;