restyle of Refs complete and tested ok
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@86661 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f0830ba3be
commit
c59e783d75
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/reports-4.6.10-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/reports-4.6.12-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
@ -31,5 +31,5 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="output" path="target/reports-4.6.10-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/reports-4.6.12-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<<<<<<<=.mine
|
||||
>>>>>>>=.r71295
|
||||
eclipse.preferences.version=1
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.6.10-SNAPSHOT
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.6.12-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>reports</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>4.6.11-SNAPSHOT</version>
|
||||
<version>4.6.12-SNAPSHOT</version>
|
||||
<name>gCube Reports Manager</name>
|
||||
<description>
|
||||
gCube Reports Portlet.
|
||||
|
|
|
@ -30,7 +30,7 @@ public class ClientRepeatableSequence extends Composite implements ClientSequenc
|
|||
this.repSequence = sRS;
|
||||
this.identifier = sRS.getKey();
|
||||
this.originalSequence = extractOriginalSequence(sRS);
|
||||
SequenceWidget seqW = new SequenceWidget(p, this, originalSequence, false, false); //TODO: Now all seq are removable, need to be handled differently
|
||||
SequenceWidget seqW = new SequenceWidget(p, this, originalSequence, true, false);
|
||||
myPanel.add(seqW);
|
||||
|
||||
for (RepeatableSequence repeatSeq : getRepeats()) {
|
||||
|
|
|
@ -52,10 +52,7 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
|||
first.removeAddAnotherButton();
|
||||
myPanel.add(first);
|
||||
} else {
|
||||
SequenceWidget seqW = new SequenceWidget(p, this, seq, false, false);
|
||||
seqW.getElement().getStyle().setMarginLeft(indentationValue, Unit.PX);
|
||||
seqW.getElement().getStyle().setBackgroundColor("#FFF");
|
||||
seqW.alignButtonsLeft();
|
||||
SequenceWidget seqW = getRefSequence(p, this, seq, false, false);
|
||||
myPanel.add(seqW);
|
||||
}
|
||||
}
|
||||
|
@ -76,10 +73,7 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
|||
* the first seq has to behave differently
|
||||
*/
|
||||
private SequenceWidget getMasterSequence(RepeatableSequence seq) {
|
||||
SequenceWidget toReturn = new SequenceWidget(p, this, seq, true, false);
|
||||
toReturn.alignButtonsLeft();
|
||||
toReturn.getElement().getStyle().setMarginLeft(indentationValue, Unit.PX);
|
||||
toReturn.getElement().getStyle().setBackgroundColor("#FFF");
|
||||
SequenceWidget toReturn = getRefSequence(p, this, seq, true, false);
|
||||
|
||||
if (tupleList.size() == 1) {
|
||||
toReturn.enableClear();
|
||||
|
@ -120,13 +114,18 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
|||
|
||||
@Override
|
||||
public boolean add(String id, RepeatableSequence sequence) {
|
||||
//(beacuse the ref is indented
|
||||
for (BasicComponent bc : sequence.getGroupedComponents()) {
|
||||
bc.setWidth(bc.getWidth()-(indentationValue+5));
|
||||
}
|
||||
|
||||
if (first.isSelectNewEnabled()) {
|
||||
first = getMasterSequence(sequence);
|
||||
myPanel.clear();
|
||||
myPanel.add(first);
|
||||
tupleList.clear();
|
||||
} else {
|
||||
SequenceWidget seqW = new SequenceWidget(p, this, sequence, false, true);
|
||||
SequenceWidget seqW = getRefSequence(p, this, sequence, false, true);
|
||||
myPanel.add(seqW);
|
||||
first.hideClearAssociationButton();
|
||||
}
|
||||
|
@ -171,4 +170,16 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
|||
public void clear() {
|
||||
first.clearAssociation();
|
||||
}
|
||||
|
||||
/**
|
||||
* A Ref is a seqeunce with diffrent style (intendedm white background and less wide)
|
||||
*
|
||||
*/
|
||||
private SequenceWidget getRefSequence(Presenter p, ClientSequence owner, RepeatableSequence repSequence, boolean notRemovable, boolean isNew) {
|
||||
SequenceWidget toReturn = new SequenceWidget(p, this, repSequence, notRemovable, isNew);
|
||||
toReturn.getElement().getStyle().setMarginLeft(indentationValue, Unit.PX);
|
||||
toReturn.getElement().getStyle().setBackgroundColor("#FFF");
|
||||
toReturn.alignButtonsLeft();
|
||||
return toReturn;
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue