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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<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>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
@ -31,5 +31,5 @@
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
<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>
|
</classpath>
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
<<<<<<<=.mine
|
<<<<<<<=.mine
|
||||||
>>>>>>>=.r71295
|
>>>>>>>=.r71295
|
||||||
eclipse.preferences.version=1
|
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
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>reports</artifactId>
|
<artifactId>reports</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>4.6.11-SNAPSHOT</version>
|
<version>4.6.12-SNAPSHOT</version>
|
||||||
<name>gCube Reports Manager</name>
|
<name>gCube Reports Manager</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Reports Portlet.
|
gCube Reports Portlet.
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class ClientRepeatableSequence extends Composite implements ClientSequenc
|
||||||
this.repSequence = sRS;
|
this.repSequence = sRS;
|
||||||
this.identifier = sRS.getKey();
|
this.identifier = sRS.getKey();
|
||||||
this.originalSequence = extractOriginalSequence(sRS);
|
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);
|
myPanel.add(seqW);
|
||||||
|
|
||||||
for (RepeatableSequence repeatSeq : getRepeats()) {
|
for (RepeatableSequence repeatSeq : getRepeats()) {
|
||||||
|
|
|
@ -52,10 +52,7 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
||||||
first.removeAddAnotherButton();
|
first.removeAddAnotherButton();
|
||||||
myPanel.add(first);
|
myPanel.add(first);
|
||||||
} else {
|
} else {
|
||||||
SequenceWidget seqW = new SequenceWidget(p, this, seq, false, false);
|
SequenceWidget seqW = getRefSequence(p, this, seq, false, false);
|
||||||
seqW.getElement().getStyle().setMarginLeft(indentationValue, Unit.PX);
|
|
||||||
seqW.getElement().getStyle().setBackgroundColor("#FFF");
|
|
||||||
seqW.alignButtonsLeft();
|
|
||||||
myPanel.add(seqW);
|
myPanel.add(seqW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,10 +73,7 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
||||||
* the first seq has to behave differently
|
* the first seq has to behave differently
|
||||||
*/
|
*/
|
||||||
private SequenceWidget getMasterSequence(RepeatableSequence seq) {
|
private SequenceWidget getMasterSequence(RepeatableSequence seq) {
|
||||||
SequenceWidget toReturn = new SequenceWidget(p, this, seq, true, false);
|
SequenceWidget toReturn = getRefSequence(p, this, seq, true, false);
|
||||||
toReturn.alignButtonsLeft();
|
|
||||||
toReturn.getElement().getStyle().setMarginLeft(indentationValue, Unit.PX);
|
|
||||||
toReturn.getElement().getStyle().setBackgroundColor("#FFF");
|
|
||||||
|
|
||||||
if (tupleList.size() == 1) {
|
if (tupleList.size() == 1) {
|
||||||
toReturn.enableClear();
|
toReturn.enableClear();
|
||||||
|
@ -120,13 +114,18 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean add(String id, RepeatableSequence sequence) {
|
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()) {
|
if (first.isSelectNewEnabled()) {
|
||||||
first = getMasterSequence(sequence);
|
first = getMasterSequence(sequence);
|
||||||
myPanel.clear();
|
myPanel.clear();
|
||||||
myPanel.add(first);
|
myPanel.add(first);
|
||||||
tupleList.clear();
|
tupleList.clear();
|
||||||
} else {
|
} else {
|
||||||
SequenceWidget seqW = new SequenceWidget(p, this, sequence, false, true);
|
SequenceWidget seqW = getRefSequence(p, this, sequence, false, true);
|
||||||
myPanel.add(seqW);
|
myPanel.add(seqW);
|
||||||
first.hideClearAssociationButton();
|
first.hideClearAssociationButton();
|
||||||
}
|
}
|
||||||
|
@ -171,4 +170,16 @@ public class ClientReportReference extends Composite implements ClientSequence {
|
||||||
public void clear() {
|
public void clear() {
|
||||||
first.clearAssociation();
|
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