minor fixes

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/catalogue-sharing-widget@146519 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-04-03 14:27:51 +00:00
parent 6d75e2931f
commit 87869bc296
7 changed files with 18 additions and 16 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="${webappDirectory}/WEB-INF/classes" path="src/main/java"> <classpathentry including="**/*.java" kind="src" output="${webappDirectory}/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"/>
@ -44,11 +44,11 @@
</classpathentry> </classpathentry>
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA-sources.jar"/> <classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA.jar" sourcepath="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA-sources.jar"/> <classpathentry kind="lib" path="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA.jar" sourcepath="/home/costantino/Downloads/gwt-2.7.0/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="src" output="${webappDirectory}/WEB-INF/classes" path="src/main/resources"> <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry excluding="**" kind="src" output="${webappDirectory}/WEB-INF/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="output" path="${webappDirectory}/WEB-INF/classes"/> <classpathentry kind="output" path="${webappDirectory}/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -3,5 +3,4 @@ encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8 encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8 encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8 encoding//src/test/resources=UTF-8
encoding//target/generated-sources/gwt=UTF-8
encoding/<project>=UTF-8 encoding/<project>=UTF-8

View File

@ -22,11 +22,8 @@
<properties> <properties>
<!-- Convenience property to set the GWT version --> <!-- Convenience property to set the GWT version -->
<gwtVersion>2.7.0</gwtVersion> <gwtVersion>2.7.0</gwtVersion>
<!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
@ -54,11 +51,13 @@
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId> <artifactId>gwt-servlet</artifactId>
<scope>provided</scope> <scope>provided</scope>
<version>${gwtVersion}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId> <artifactId>gwt-user</artifactId>
<scope>provided</scope> <scope>provided</scope>
<version>${gwtVersion}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.dvos</groupId> <groupId>org.gcube.dvos</groupId>
@ -70,11 +69,11 @@
<groupId>org.gcube.core</groupId> <groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId> <artifactId>common-scope-maps</artifactId>
<scope>provided</scope> <scope>provided</scope>
<!-- put at provided for deploying -->
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId> <artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -107,7 +106,7 @@
<groupId>org.gcube.data-catalogue</groupId> <groupId>org.gcube.data-catalogue</groupId>
<artifactId>ckan-util-library</artifactId> <artifactId>ckan-util-library</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version> <version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
<scope>compile</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>

View File

@ -4,8 +4,9 @@ import org.gcube.portlets_widgets.catalogue_sharing_widget.shared.ItemUrls;
import com.github.gwtbootstrap.client.ui.AlertBlock; import com.github.gwtbootstrap.client.ui.AlertBlock;
import com.github.gwtbootstrap.client.ui.Form; import com.github.gwtbootstrap.client.ui.Form;
import com.github.gwtbootstrap.client.ui.Modal;
import com.github.gwtbootstrap.client.ui.TextBox;
import com.github.gwtbootstrap.client.ui.Well; import com.github.gwtbootstrap.client.ui.Well;
import com.github.gwtbootstrap.client.ui.base.TextBox;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiField;
@ -46,10 +47,13 @@ public class ShareCatalogueWidget extends Composite {
@UiField @UiField
TextBox itemLongUrl; TextBox itemLongUrl;
@UiField
Modal modalShareLink;
public ShareCatalogueWidget(String itemUUID) { public ShareCatalogueWidget(String itemUUID) {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
modalShareLink.show();
ckanServices.getPackageUrl(itemUUID, new AsyncCallback<ItemUrls>() { ckanServices.getPackageUrl(itemUUID, new AsyncCallback<ItemUrls>() {
@ -68,6 +72,7 @@ public class ShareCatalogueWidget extends Composite {
itemLongUrl.setText(result.getUrl() == null ? "" : result.getUrl()); itemLongUrl.setText(result.getUrl() == null ? "" : result.getUrl());
itemTitle.setText(result.getProductTitle() == null ? "" : result.getProductTitle()); itemTitle.setText(result.getProductTitle() == null ? "" : result.getProductTitle());
itemName.setText(result.getProductName() == null ? "" : result.getProductName()); itemName.setText(result.getProductName() == null ? "" : result.getProductName());
} }
} }

View File

@ -4,10 +4,9 @@
<g:HTMLPanel> <g:HTMLPanel>
<b:Modal ui:field="modalShareLink" title="Item's information" <b:Modal ui:field="modalShareLink" title="Item's information"
backdrop="STATIC" keyboard="true" animation="true"> backdrop="STATIC" keyboard="true" animation="true">
<div> <g:VerticalPanel>
<b:Well size="LARGE" visible="true" ui:field="loadingIcon"> <b:Well size="LARGE" visible="true" ui:field="loadingIcon">
<b:Icon type="COG" size="FOUR_TIMES" aria-hidden="true" <b:Icon type="COG" size="FOUR_TIMES" spin="true" />
alignment="CENTER" spin="true" />
</b:Well> </b:Well>
<!-- Alert blocks for info/errors --> <!-- Alert blocks for info/errors -->
@ -47,7 +46,7 @@
</b:ControlGroup> </b:ControlGroup>
</b:Fieldset> </b:Fieldset>
</b:Form> </b:Form>
</div> </g:VerticalPanel>
</b:Modal> </b:Modal>
</g:HTMLPanel> </g:HTMLPanel>
</ui:UiBinder> </ui:UiBinder>

View File

@ -3,6 +3,7 @@ package org.gcube.portlets_widgets.catalogue_sharing_widget.server;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.gcube.common.portal.PortalContext;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.server.ApplicationProfileScopePerUrlReader; import org.gcube.datacatalogue.ckanutillibrary.server.ApplicationProfileScopePerUrlReader;

View File

@ -21,7 +21,6 @@ public class ItemUrls implements Serializable {
*/ */
public ItemUrls() { public ItemUrls() {
super(); super();
// TODO Auto-generated constructor stub
} }
/** /**