merged with commit eb8dceb8ff on master

This commit is contained in:
Francesco Mangiacrapa 2021-10-12 17:26:30 +02:00
parent 0939a871bb
commit 99bc870ab7
4 changed files with 58 additions and 14 deletions

View File

@ -13,6 +13,7 @@
<wb-module deploy-name="geoportal-data-entry-app-2.0.0-SNAPSHOT">
@ -28,6 +29,7 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -43,6 +45,7 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -58,6 +61,7 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -73,8 +77,9 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="geoportal-data-common-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
<dependent-module archiveName="geoportal-data-common-1.2.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -91,6 +96,7 @@
<property name="context-root" value="geoportal-data-entry-app"/>
@ -106,6 +112,7 @@
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
@ -121,6 +128,7 @@
</wb-module>
@ -136,4 +144,5 @@
</project-modules>

View File

@ -24,9 +24,9 @@
<b:Tab icon="PENCIL" active="true" heading="Edit the Project"
ui:field="tabRawUpdate">
<b:Heading size="3">Source Project Editor</b:Heading>
<b:Label type="INFO">You can update the Source Project by editing
its model
data displayed in the following Editor.</b:Label>
<b:Label type="INFO">You can update the project by editing
the
model data displayed in the following editor.</b:Label>
<g:HTML addStyleNames="{style.info-panel}">
<p style='color: #585858'>
Be careful not to change the

View File

@ -21,6 +21,7 @@ import org.gcube.portlets.user.geoportaldataentry.client.GeoportalDataEntryServi
import org.gcube.portlets.user.geoportaldataentry.client.events.ActionOnItemEvent;
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.DialogConfirm;
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.DialogInform;
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.StringUtil;
import org.gcube.portlets.widgets.mpformbuilder.client.form.MetaDataField;
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.MetaDataFieldSkeleton;
import org.gcube.portlets.widgets.mpformbuilder.client.ui.upload.DialogUpload;
@ -326,7 +327,7 @@ public class UpdateFileset extends Composite {
}
for (UploadedImageDV uploadedImageDV : listImmagini) {
fillListBoxToBeReplaced(listBoxContentIndex, section, posizIndex, uploadedImageDV.getTitolo(),
fillListBoxToBeReplaced(listBoxContentIndex, section, posizIndex, StringUtil.ellipsize(uploadedImageDV.getDidascalia(),30),
uploadedImageDV.getListWsContent());
posizIndex++;
}

View File

@ -0,0 +1,34 @@
/**
*
*/
package org.gcube.portlets.user.geoportaldataentry.client.ui.utils;
/**
* The Class StringUtil.
*
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
*
* Oct 12, 2021
*/
public class StringUtil {
/**
* Ellipsize.
*
* @param input the input string that may be subjected to shortening
* @param maxCharacters the maximum characters that must be returned for the
* input string
* @return the string
*/
public static String ellipsize(String input, int maxCharacters) {
if (input == null)
return "";
if (input.length() < maxCharacters)
return input;
return input.substring(0, maxCharacters) + "...";
}
}