Edit mode: showing the field "didascalia" instead of "titolo" in case of

immagini
backup_master_concessioni r5.5.0
Francesco Mangiacrapa 2 years ago
parent 17f2c9093d
commit eb8dceb8ff

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/geoportal-data-entry-app-2.0.0/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/geoportal-data-entry-app-2.0.0/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -35,5 +35,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/geoportal-data-entry-app-2.0.0/WEB-INF/classes"/>
</classpath>

@ -1,5 +1,5 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

@ -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

@ -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++;
}

@ -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) + "...";
}
}
Loading…
Cancel
Save