merged with patches performed on branch
This commit is contained in:
parent
239114c148
commit
7cbd9ff62a
|
@ -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-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/geoportal-data-entry-app-1.0.1-SNAPSHOT/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-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/geoportal-data-entry-app-1.0.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -27,7 +27,6 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
|
@ -35,5 +34,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-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/geoportal-data-entry-app-1.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
jarsExcludedFromWebInfLib=
|
jarsExcludedFromWebInfLib=
|
||||||
lastWarOutDir=/home/francesco/git/geoportal-data-entry-app/target/geoportal-data-entry-app-1.0.0-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-entry-app/target/geoportal-data-entry-app-1.0.1-SNAPSHOT
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -77,9 +77,6 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
<dependent-module archiveName="metadata-profile-form-builder-widget-1.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/metadata-profile-form-builder-widget/metadata-profile-form-builder-widget">
|
|
||||||
<dependency-type>uses</dependency-type>
|
|
||||||
</dependent-module>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,13 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [v1.0.1-SNAPSHOT] - 2020-11-04
|
||||||
|
|
||||||
|
#### Bug fixes
|
||||||
|
|
||||||
|
[#20063] Fixes for data-entry components
|
||||||
|
|
||||||
|
|
||||||
## [v1.0.0] - 2020-10-07
|
## [v1.0.0] - 2020-10-07
|
||||||
|
|
||||||
[#19916] First release
|
[#19916] First release
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -14,7 +14,7 @@
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>geoportal-data-entry-app</artifactId>
|
<artifactId>geoportal-data-entry-app</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>1.0.0</version>
|
<version>1.0.1-SNAPSHOT</version>
|
||||||
<name>GeoPortal Data Entry App</name>
|
<name>GeoPortal Data Entry App</name>
|
||||||
<description>The GeoPortal Data Entry App is an application to build the web forms for data entries needed to GeoNa project</description>
|
<description>The GeoPortal Data Entry App is an application to build the web forms for data entries needed to GeoNa project</description>
|
||||||
<scm>
|
<scm>
|
||||||
|
|
|
@ -30,6 +30,7 @@ import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.event.shared.HandlerManager;
|
import com.google.gwt.event.shared.HandlerManager;
|
||||||
import com.google.gwt.user.client.Window;
|
import com.google.gwt.user.client.Window;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||||
import com.google.gwt.user.client.ui.RootPanel;
|
import com.google.gwt.user.client.ui.RootPanel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,7 +65,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
private LinkedHashMap<Long, List<GeoNaFormDataObject>> savedMap = new LinkedHashMap<Long, List<GeoNaFormDataObject>>();
|
private LinkedHashMap<Long, List<GeoNaFormDataObject>> savedMap = new LinkedHashMap<Long, List<GeoNaFormDataObject>>();
|
||||||
|
|
||||||
//private List<MetaDataProfileBean> orderedListMetadataProfilesForGeona = null;
|
private boolean projectSavedWithSuccess;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the entry point method.
|
* This is the entry point method.
|
||||||
|
@ -119,6 +120,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildNewCards(Collection<GeoNaFormCardModel> orderedCards) {
|
private void buildNewCards(Collection<GeoNaFormCardModel> orderedCards) {
|
||||||
|
projectSavedWithSuccess = false; //resetting state of saving
|
||||||
mainPanel.setLoaderVisible("Loading...", true);
|
mainPanel.setLoaderVisible("Loading...", true);
|
||||||
resetUI();
|
resetUI();
|
||||||
//ordered values
|
//ordered values
|
||||||
|
@ -204,14 +206,20 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
final Modal modal = new Modal(true);
|
final Modal modal = new Modal(true);
|
||||||
modal.setCloseVisible(false);
|
modal.setCloseVisible(false);
|
||||||
|
modal.setTitle("Saving project...");
|
||||||
|
modal.hide(false);
|
||||||
|
final HorizontalPanel modalContainerPanel = new HorizontalPanel();
|
||||||
final LoaderIcon loader = new LoaderIcon();
|
final LoaderIcon loader = new LoaderIcon();
|
||||||
loader.setText("Trying to save the data, please wait...");
|
loader.setText("Trying to save the data, please wait...");
|
||||||
modal.add(loader);
|
modalContainerPanel.add(loader);
|
||||||
|
modal.add(modalContainerPanel);
|
||||||
|
|
||||||
GeoportalDataEntryServiceAsync.Util.getInstance().saveGeonaDataForms(saveGeonaDataFormsEvent.getListGeonaDataForms(), new AsyncCallback<CommitReport>() {
|
GeoportalDataEntryServiceAsync.Util.getInstance().saveGeonaDataForms(saveGeonaDataFormsEvent.getListGeonaDataForms(), new AsyncCallback<CommitReport>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
|
modalContainerPanel.clear();
|
||||||
|
modal.setCloseVisible(true);
|
||||||
try {
|
try {
|
||||||
modal.remove(loader);
|
modal.remove(loader);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
@ -220,7 +228,6 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
alert.setType(AlertType.ERROR);
|
alert.setType(AlertType.ERROR);
|
||||||
alert.setClose(false);
|
alert.setClose(false);
|
||||||
modal.add(alert);
|
modal.add(alert);
|
||||||
modal.setCloseVisible(true);
|
|
||||||
//resetUI();
|
//resetUI();
|
||||||
geoNaMainForm.enableButtonSave(true);
|
geoNaMainForm.enableButtonSave(true);
|
||||||
}
|
}
|
||||||
|
@ -235,6 +242,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
switch (result.getState()) {
|
switch (result.getState()) {
|
||||||
case OK:
|
case OK:
|
||||||
alert.setType(AlertType.SUCCESS);
|
alert.setType(AlertType.SUCCESS);
|
||||||
|
projectSavedWithSuccess = true;
|
||||||
purgeFileUploaded();
|
purgeFileUploaded();
|
||||||
break;
|
break;
|
||||||
case WARN:
|
case WARN:
|
||||||
|
@ -250,7 +258,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
}
|
}
|
||||||
alert.setClose(false);
|
alert.setClose(false);
|
||||||
modal.add(alert);
|
modal.add(alert);
|
||||||
modal.setCloseVisible(true);
|
|
||||||
try {
|
try {
|
||||||
savedMap.put(result.getRecordId(), saveGeonaDataFormsEvent.getListGeonaDataForms());
|
savedMap.put(result.getRecordId(), saveGeonaDataFormsEvent.getListGeonaDataForms());
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
@ -274,17 +282,22 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void onCreateNewProject(CreateNewProjectEvent newProjectEvent) {
|
public void onCreateNewProject(CreateNewProjectEvent newProjectEvent) {
|
||||||
|
|
||||||
//means the form was not submitted
|
// means the form was not submitted
|
||||||
if(savedMap.size()==0) {
|
if (savedMap.size() == 0) {
|
||||||
boolean confirm = Window.confirm("Creating a new project, the current project (is not saved) and will be lost, Confirm?");
|
boolean confirm = Window.confirm(
|
||||||
if(confirm)
|
"Creating a new project, the current project (is not saved) and will be lost, Confirm?");
|
||||||
|
if (confirm)
|
||||||
buildNewCards(orderedCards);
|
buildNewCards(orderedCards);
|
||||||
}else {
|
} else if (projectSavedWithSuccess) {
|
||||||
|
//means the project has been saved
|
||||||
|
buildNewCards(orderedCards);
|
||||||
|
} else {
|
||||||
|
//means the project reported one ore more errors after the submit
|
||||||
boolean confirm = Window.confirm("Creating a new project, the web-forms will be cleaned, Confirm?");
|
boolean confirm = Window.confirm("Creating a new project, the web-forms will be cleaned, Confirm?");
|
||||||
if(confirm)
|
if (confirm)
|
||||||
buildNewCards(orderedCards);
|
buildNewCards(orderedCards);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,6 +205,7 @@ public class MetadataFormCard {
|
||||||
if(bool) {
|
if(bool) {
|
||||||
tab.setIcon(IconType.OK_SIGN);
|
tab.setIcon(IconType.OK_SIGN);
|
||||||
tab.asWidget().getElement().removeClassName("red-text");
|
tab.asWidget().getElement().removeClassName("red-text");
|
||||||
|
tab.asWidget().getElement().addClassName("green-text");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tab.setIcon(IconType.MINUS_SIGN);
|
tab.setIcon(IconType.MINUS_SIGN);
|
||||||
|
|
Loading…
Reference in New Issue