From daa91bb4a7a58afef23d548398c71fd0206384a1 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Tue, 30 Sep 2014 13:10:49 +0000 Subject: [PATCH] Fixed remove content does not work when radio button are present in the sequence for the VME-DB case git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@100295 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 4 ++-- .settings/com.google.gdt.eclipse.core.prefs | 2 +- distro/changelog.xml | 5 +++++ pom.xml | 2 +- .../client/targets/AttributeMultiSelection.java | 10 ++++++++++ .../targets/AttributeSingleSelection.java | 11 +++++++++++ .../client/targets/SequenceWidget.java | 10 +++++++++- src/main/webapp/ReportGenerator.css | 17 ++++++++++------- 8 files changed, 49 insertions(+), 12 deletions(-) diff --git a/.classpath b/.classpath index 5495a9d..51b1a3e 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -31,5 +31,5 @@ - + diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs index 15b2d83..2d813b3 100644 --- a/.settings/com.google.gdt.eclipse.core.prefs +++ b/.settings/com.google.gdt.eclipse.core.prefs @@ -2,6 +2,6 @@ <<<<<<<=.mine >>>>>>>=.r71295 eclipse.preferences.version=1 -lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.11.0-SNAPSHOT +lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.11.1-SNAPSHOT warSrcDir=src/main/webapp warSrcDirIsOutput=false diff --git a/distro/changelog.xml b/distro/changelog.xml index 8564294..78c2b21 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,9 @@ + + Fixed remove content does not work when radio button are present in the sequence for the VME-DB case + Minor UX Restyle for fixing glitches + Fixed security layer issue for the VME-DB case diff --git a/pom.xml b/pom.xml index 9e1008b..d11d7e5 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.gcube.portlets.user reports war - 4.11.0-SNAPSHOT + 4.11.1-SNAPSHOT gCube Reports Manager gCube Reports Portlet. diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeMultiSelection.java b/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeMultiSelection.java index b99275d..d386914 100644 --- a/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeMultiSelection.java +++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeMultiSelection.java @@ -175,5 +175,15 @@ public class AttributeMultiSelection extends Composite { public void setMetadata(List metas) { this.metas = metas; } + + public void reset() { + for (CheckBox checkbox : boxes) { + if (checkbox.getText().compareTo("Not applicable") == 0) { + checkbox.setValue(true); + } + else + checkbox.setValue(false); + } + } } diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeSingleSelection.java b/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeSingleSelection.java index 597de4c..d373f05 100644 --- a/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeSingleSelection.java +++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/AttributeSingleSelection.java @@ -11,6 +11,7 @@ import org.gcube.portlets.d4sreporting.common.shared.Metadata; import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter; import com.google.gwt.dom.client.Style.Unit; +import com.google.gwt.user.client.ui.CheckBox; import com.google.gwt.user.client.ui.ComplexPanel; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.FlowPanel; @@ -176,5 +177,15 @@ public class AttributeSingleSelection extends Composite { public void setMetadata(List metas) { this.metas = metas; } + + public void reset() { + for (RadioButton radio : boxes) { + if (radio.getText().compareTo("Not applicable") == 0) { + radio.setValue(true); + } + else + radio.setValue(false); + } + } } diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/SequenceWidget.java b/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/SequenceWidget.java index d48071d..d27ef53 100644 --- a/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/SequenceWidget.java +++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/targets/SequenceWidget.java @@ -305,6 +305,14 @@ public class SequenceWidget extends Composite { ClientImage toClear = (ClientImage) myPanel.getWidget(i); toClear.resetImage(); } + else if (myPanel.getWidget(i) instanceof AttributeMultiSelection) { + AttributeMultiSelection toClear = (AttributeMultiSelection) myPanel.getWidget(i); + toClear.reset(); + } + else if (myPanel.getWidget(i) instanceof AttributeSingleSelection) { + AttributeSingleSelection toClear = (AttributeSingleSelection) myPanel.getWidget(i); + toClear.reset(); + } } @@ -315,7 +323,7 @@ public class SequenceWidget extends Composite { BasicComponent sComp = repSequence.getGroupedComponents().get(j); //if is not locked and is of type BODY then put fields to blank if ((!sComp.isLocked()) && (sComp.getType() == ComponentType.BODY || sComp.getType() == ComponentType.BODY_NOT_FORMATTED || - sComp.getType() == ComponentType.DYNA_IMAGE) ) { + sComp.getType() == ComponentType.DYNA_IMAGE) || sComp.getType() == ComponentType.ATTRIBUTE_MULTI || sComp.getType() == ComponentType.ATTRIBUTE_UNIQUE) { sComp.setPossibleContent(""); sComp.setMetadata(setPropertiesForRSG(sComp.getMetadata())); } diff --git a/src/main/webapp/ReportGenerator.css b/src/main/webapp/ReportGenerator.css index 20ea1d9..7d502b9 100644 --- a/src/main/webapp/ReportGenerator.css +++ b/src/main/webapp/ReportGenerator.css @@ -169,25 +169,26 @@ .deleteAssociationButton { background-image: none !important; background-repeat: none !important; - background-color: #12B0FA !important; - color: #FFF !important; + background-color: #d9edf7 !important; + border-color: #AED3E5 !important; + color: #31708f !important; } .deleteAssociationButton:hover { - background-image: none !important; - background-repeat: none !important; - background-color: #12B0FA !important; + background-color: #AED3E5 !important; color: #FFF !important; } .addEntryButton { background-image: none !important; background-repeat: none !important; - background-color: #02990C !important; - color: #FFF !important; + border-color: #B5D49B !important; + background-color: #d6e9c6 !important; + color: #3c763d !important; } .addEntryButton:hover { + background-color: #B5D49B !important; color: #FFF !important; } @@ -468,6 +469,7 @@ tableBorder td { .attributeArea { margin-top: 5px; + margin-left: 5px; padding-left: 0px; border: none; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; @@ -508,6 +510,7 @@ tableBorder td { border-radius: 5px; background-color: white; margin-top: 5px; + margin-left: 5px; } .report-ui-component {