ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #363] Fixed bug. Improved visibility of top level grouping elements
This commit is contained in:
parent
563833675d
commit
25e6ae8aef
5 changed files with 67 additions and 8 deletions
|
|
@ -29,12 +29,23 @@ public class LoadTimeLine {
|
|||
|
||||
private final String conceptName;
|
||||
private final List<LoadPeriod> loadPeriods;
|
||||
private final String type;
|
||||
|
||||
public LoadTimeLine(String conceptName, List<LoadPeriod> loadPeriods) {
|
||||
Validate.notEmpty(conceptName);
|
||||
Validate.notNull(loadPeriods);
|
||||
this.loadPeriods = LoadPeriod.sort(loadPeriods);
|
||||
this.conceptName = conceptName;
|
||||
this.type = "";
|
||||
}
|
||||
|
||||
public LoadTimeLine(String conceptName, List<LoadPeriod> loadPeriods,
|
||||
String type) {
|
||||
Validate.notEmpty(conceptName);
|
||||
Validate.notNull(loadPeriods);
|
||||
this.loadPeriods = LoadPeriod.sort(loadPeriods);
|
||||
this.conceptName = conceptName;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<LoadPeriod> getLoadPeriods() {
|
||||
|
|
@ -70,4 +81,8 @@ public class LoadTimeLine {
|
|||
}
|
||||
return getLast().getEnd();
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,11 @@ public class ResourceLoadComponent extends XulElement {
|
|||
return loadLine.getConceptName();
|
||||
}
|
||||
|
||||
public String getResourceLoadType() {
|
||||
return loadLine.getType();
|
||||
}
|
||||
|
||||
|
||||
private static List<Div> createDivsForPeriods(IDatesMapper datesMapper,
|
||||
List<LoadPeriod> loadPeriods) {
|
||||
List<Div> result = new ArrayList<Div>();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<%@ taglib uri="http://www.zkoss.org/dsp/zk/core" prefix="z" %>
|
||||
|
||||
<c:set var="self" value="${requestScope.arg.self}"/>
|
||||
<div id="${self.uuid}" class="row_resourceload"
|
||||
<div id="${self.uuid}" class="row_resourceload resourceload-${self.resourceLoadType}"
|
||||
z.autoz="true" ${self.outerAttrs}">
|
||||
<span class="resourceload_name">${self.resourceLoadName}</span>
|
||||
<c:forEach var="child" items="${self.children}">
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ public class ResourceLoadModel implements IResourceLoadModel {
|
|||
private LoadTimeLine createPrincipal(Criterion criterion,
|
||||
List<GenericResourceAllocation> orderedAllocations) {
|
||||
return new LoadTimeLine(criterion.getName(), createPeriods(criterion,
|
||||
orderedAllocations));
|
||||
orderedAllocations), "global-generic");
|
||||
}
|
||||
|
||||
private List<LoadPeriod> createPeriods(Criterion criterion,
|
||||
|
|
@ -263,11 +263,13 @@ public class ResourceLoadModel implements IResourceLoadModel {
|
|||
List<LoadTimeLine> secondLevel = new ArrayList<LoadTimeLine>();
|
||||
for (Entry<Task, List<ResourceAllocation<?>>> entry : byTask.entrySet()) {
|
||||
Task task = entry.getKey();
|
||||
LoadTimeLine timeLine = buildTimeLine(resource, getTaskName(task),
|
||||
entry.getValue());
|
||||
LoadTimeLine timeLine = buildTimeLine(resource,
|
||||
getTaskName(task),
|
||||
entry.getValue(), "specific");
|
||||
if (!timeLine.isEmpty()) {
|
||||
secondLevel.add(timeLine);
|
||||
}
|
||||
|
||||
}
|
||||
return secondLevel;
|
||||
}
|
||||
|
|
@ -284,7 +286,8 @@ public class ResourceLoadModel implements IResourceLoadModel {
|
|||
LoadPeriodGeneratorFactory periodGeneratorFactory = LoadPeriodGenerator
|
||||
.onResourceSatisfying(resource, criterions);
|
||||
return new LoadTimeLine(getName(criterions), PeriodsBuilder.build(
|
||||
periodGeneratorFactory, allocationsSortedByStartDate));
|
||||
periodGeneratorFactory, allocationsSortedByStartDate),
|
||||
"generic");
|
||||
}
|
||||
|
||||
public static String getName(Collection<? extends Criterion> criterions) {
|
||||
|
|
@ -302,7 +305,13 @@ public class ResourceLoadModel implements IResourceLoadModel {
|
|||
private LoadTimeLine buildTimeLine(Resource resource, String name,
|
||||
List<ResourceAllocation<?>> sortedByStartDate) {
|
||||
return new LoadTimeLine(name, PeriodsBuilder.build(LoadPeriodGenerator
|
||||
.onResource(resource), sortedByStartDate));
|
||||
.onResource(resource), sortedByStartDate), "resource");
|
||||
}
|
||||
|
||||
private LoadTimeLine buildTimeLine(Resource resource, String name,
|
||||
List<ResourceAllocation<?>> sortedByStartDate, String type) {
|
||||
return new LoadTimeLine(name, PeriodsBuilder.build(LoadPeriodGenerator
|
||||
.onResource(resource), sortedByStartDate), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -482,11 +482,17 @@ tr.z-vbox-sep {
|
|||
height: 10px;
|
||||
border: 1px;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
margin-top: 8px;
|
||||
width: 100%;
|
||||
border-bottom: 1px dotted #CCCCCC;
|
||||
}
|
||||
|
||||
.resourceloadleftpane .z-tree-row .z-label {
|
||||
height:18px;
|
||||
padding-bottom:0;
|
||||
vertical-align:bottom;
|
||||
}
|
||||
|
||||
.resourceload_name {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -565,9 +571,33 @@ tr.z-vbox-sep {
|
|||
}
|
||||
|
||||
.resourceloadlist {
|
||||
margin-top: 15px;
|
||||
margin-top: 13px;
|
||||
}
|
||||
|
||||
.resourceload-resource div {
|
||||
border: solid 1px;
|
||||
}
|
||||
|
||||
.resourceload-global-generic div {
|
||||
border: solid 1px;
|
||||
}
|
||||
|
||||
.row_resourceload.resourceload-global-generic,
|
||||
.row_resourceload.resourceload-resource {
|
||||
margin-bottom: 8px;
|
||||
margin-top: 6px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.resourceloadleftpane .z-tree-ico + .secondlevel span {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.resourceloadleftpane .z-label {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
|
||||
.timetrackergap #zoom_buttons {
|
||||
display:none;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue