Edit mode: showing the field "didascalia" instead of "titolo" in case of
immagini
This commit is contained in:
parent
17f2c9093d
commit
eb8dceb8ff
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<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>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</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>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -35,5 +35,5 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</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>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
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
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
<b:Tab icon="PENCIL" active="true" heading="Edit the Project"
|
<b:Tab icon="PENCIL" active="true" heading="Edit the Project"
|
||||||
ui:field="tabRawUpdate">
|
ui:field="tabRawUpdate">
|
||||||
<b:Heading size="3">Source Project Editor</b:Heading>
|
<b:Heading size="3">Source Project Editor</b:Heading>
|
||||||
<b:Label type="INFO">You can update the Source Project by editing
|
<b:Label type="INFO">You can update the project by editing
|
||||||
its model
|
the
|
||||||
data displayed in the following Editor.</b:Label>
|
model data displayed in the following editor.</b:Label>
|
||||||
<g:HTML addStyleNames="{style.info-panel}">
|
<g:HTML addStyleNames="{style.info-panel}">
|
||||||
<p style='color: #585858'>
|
<p style='color: #585858'>
|
||||||
Be careful not to change the
|
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.events.ActionOnItemEvent;
|
||||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.DialogConfirm;
|
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.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.form.MetaDataField;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.MetaDataFieldSkeleton;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.metadata.MetaDataFieldSkeleton;
|
||||||
import org.gcube.portlets.widgets.mpformbuilder.client.ui.upload.DialogUpload;
|
import org.gcube.portlets.widgets.mpformbuilder.client.ui.upload.DialogUpload;
|
||||||
|
@ -326,7 +327,7 @@ public class UpdateFileset extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (UploadedImageDV uploadedImageDV : listImmagini) {
|
for (UploadedImageDV uploadedImageDV : listImmagini) {
|
||||||
fillListBoxToBeReplaced(listBoxContentIndex, section, posizIndex, uploadedImageDV.getTitolo(),
|
fillListBoxToBeReplaced(listBoxContentIndex, section, posizIndex, StringUtil.ellipsize(uploadedImageDV.getDidascalia(),30),
|
||||||
uploadedImageDV.getListWsContent());
|
uploadedImageDV.getListWsContent());
|
||||||
posizIndex++;
|
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…
Reference in New Issue