task_24166 #11
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -77,7 +78,8 @@
|
|||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-entry-app-3.1.0-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -155,7 +157,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -233,7 +236,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -311,7 +315,8 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -341,7 +346,11 @@
|
|||
|
||||
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
|
||||
<dependent-module archiveName="geoportal-data-mapper-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-mapper/geoportal-data-mapper">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -419,7 +428,8 @@
|
|||
|
||||
|
||||
<property name="context-root" value="geoportal-data-entry-app"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -497,7 +507,8 @@
|
|||
|
||||
|
||||
<property name="java-output-path" value="/geoportal-data-entry-app/target/geoportal-data-entry-app-2.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -575,7 +586,8 @@
|
|||
|
||||
|
||||
</wb-module>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
- [#24166] Implemented the Update facility
|
||||
- [#24244] Integrated with the geoportal-data-mapper library
|
||||
|
||||
## [v3.0.1-SNAPSHOT] - 2022-12-13
|
||||
|
||||
#### Fixes
|
||||
|
||||
- [#24281] Fixed filtering selection label
|
||||
- [#24049] Fixed "Show on Map" facility vs Chrome browser
|
||||
|
||||
## [v3.0.0] - 2022-11-09
|
||||
|
||||
#### Enhancements
|
||||
|
|
|
@ -61,7 +61,6 @@ import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.HTMLUtil;
|
|||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.HTMLUtil.HTML_TAG;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.LoaderIcon;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.ModalConfirm;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.NewBrowserWindow;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.CommitReport;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.GNADataEntryExtendedConfigProfile;
|
||||
import org.gcube.portlets.user.geoportaldataentry.shared.GeoNaFormDataObject;
|
||||
|
@ -78,6 +77,7 @@ import com.github.gwtbootstrap.client.ui.Button;
|
|||
import com.github.gwtbootstrap.client.ui.Modal;
|
||||
import com.github.gwtbootstrap.client.ui.constants.AlertType;
|
||||
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
|
||||
import com.github.gwtbootstrap.client.ui.constants.LabelType;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
|
@ -91,6 +91,7 @@ import com.google.gwt.event.logical.shared.ResizeHandler;
|
|||
import com.google.gwt.event.shared.HandlerManager;
|
||||
import com.google.gwt.user.client.Window;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.Anchor;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
|
@ -1381,32 +1382,58 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
case VIEW_ON_MAP: {
|
||||
|
||||
final Modal modal = new Modal(true, true);
|
||||
modal.setTitle("Show on Map the Project...");
|
||||
modal.setCloseVisible(true);
|
||||
final HorizontalPanel hpGetLink = new HorizontalPanel();
|
||||
final LoaderIcon lc = new LoaderIcon("Just moment getting link...");
|
||||
hpGetLink.add(lc);
|
||||
modal.add(hpGetLink);
|
||||
|
||||
final NewBrowserWindow newBrowserWindow = NewBrowserWindow.open("", "_blank", "");
|
||||
// final NewBrowserWindow newBrowserWindow = NewBrowserWindow.open("", "_blank",
|
||||
// "");
|
||||
|
||||
GeoportalDataEntryServiceAsync.Util.getInstance().getLinksFor(resultDocumentDV.getId(),
|
||||
resultDocumentDV.getProfileID(), new AsyncCallback<GeoportalItemReferences>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
hpGetLink.clear();
|
||||
try {
|
||||
hpGetLink.setVisible(false);
|
||||
modal.remove(hpGetLink);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
Alert alert = new Alert(caught.getMessage(), AlertType.ERROR);
|
||||
alert.setClose(false);
|
||||
hpGetLink.add(alert);
|
||||
newBrowserWindow.close();
|
||||
// newBrowserWindow.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(GeoportalItemReferences result) {
|
||||
try {
|
||||
hpGetLink.setVisible(false);
|
||||
modal.remove(hpGetLink);
|
||||
} catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
}
|
||||
String theURL = result.getRestrictedLink().getShortURL() != null
|
||||
? result.getRestrictedLink().getShortURL()
|
||||
: result.getRestrictedLink().getCompleteURL();
|
||||
newBrowserWindow.setUrl(theURL);
|
||||
modal.hide();
|
||||
// newBrowserWindow.setUrl(theURL);
|
||||
|
||||
Anchor anchor = new Anchor(theURL);
|
||||
anchor.setHref(theURL);
|
||||
anchor.setTarget("_blank");
|
||||
anchor.setTitle(
|
||||
"Show on Map the project with id: " + resultDocumentDV.getId());
|
||||
com.github.gwtbootstrap.client.ui.Label label = new com.github.gwtbootstrap.client.ui.Label(
|
||||
"Go to Map by clicking the link");
|
||||
label.setType(LabelType.SUCCESS);
|
||||
|
||||
modal.add(label);
|
||||
modal.add(new HTML("<br>"));
|
||||
modal.add(anchor);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.gcube.application.geoportalcommon.shared.guipresentation.Header;
|
|||
import org.gcube.portlets.user.geoportaldataentry.client.ConstantsGeoPortalDataEntryApp;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.GeoPortalClientCaches.CacheSearchingFilterParametersFromConfig;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.events.CreateNewProjectEvent;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.events.GetListOfRecordsEvent;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.events.OperationOnItemEvent;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.form.GeonaDataEntryMainForm;
|
||||
import org.gcube.portlets.user.geoportaldataentry.client.ui.projects.ListOfProjectTablePanel;
|
||||
|
@ -458,19 +457,21 @@ public class GeonaMainTabPanel extends Composite {
|
|||
|
||||
if (dataListHandler != null) {
|
||||
|
||||
NavLink link = new NavLink(ucd.getName());
|
||||
link.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
|
||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(false, ucd.getProfileID(),
|
||||
getCurrentProjectsSearchingFilter(), true));
|
||||
}
|
||||
});
|
||||
// NavLink link = new NavLink(ucd.getName());
|
||||
// link.addClickHandler(new ClickHandler() {
|
||||
//
|
||||
// @Override
|
||||
// public void onClick(ClickEvent event) {
|
||||
//
|
||||
// appManagerBus.fireEvent(new GetListOfRecordsEvent(false, ucd.getProfileID(),
|
||||
// getCurrentProjectsSearchingFilter(), true));
|
||||
// }
|
||||
// });
|
||||
ucdProjectTypesForListingDataView.add(ucd);
|
||||
|
||||
listOfProjectTablePanel.addProjectType(link);
|
||||
// listOfProjectTablePanel.addProjectType(link);
|
||||
|
||||
listOfProjectTablePanel.addProjectType(ucd);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -203,15 +203,16 @@ public class ListOfProjectTablePanel extends Composite {
|
|||
alertSearchFor.setText(searchForFields.get(0).getDisplayName());
|
||||
alertSortBy.setText(toLabelFilter((sortByFields.get(0)), SearchingFilter.ORDER.ASC));
|
||||
|
||||
for (ItemFieldDV record_FIELD : searchForFields) {
|
||||
for (final ItemFieldDV record_FIELD : searchForFields) {
|
||||
|
||||
NavLink nav = new NavLink(record_FIELD.getDisplayName());
|
||||
dropdownSearchFor.add(nav);
|
||||
final NavLink navSearch = new NavLink(record_FIELD.getDisplayName());
|
||||
dropdownSearchFor.add(navSearch);
|
||||
|
||||
nav.addClickHandler(new ClickHandler() {
|
||||
navSearch.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
GWT.log("Search for: " + record_FIELD.getDisplayName());
|
||||
alertSearchFor.setText(record_FIELD.getDisplayName());
|
||||
|
||||
if (searchField.getText().length() >= MIN_LENGHT_SERCHING_STRING) {
|
||||
|
@ -313,22 +314,22 @@ public class ListOfProjectTablePanel extends Composite {
|
|||
this.ucdProjectTypesForListingDataView = ucdProjectTypesForListingDataView;
|
||||
|
||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
//noProjectSelectionMessage.setVisible(true);
|
||||
// SELECTION on the first item
|
||||
if (ucdProjectTypesForListingDataView.size() > 0) {
|
||||
//noProjectSelectionMessage.setVisible(false);
|
||||
// noProjectSelectionMessage.setVisible(true);
|
||||
// Selecting directly the unique UCD type.
|
||||
if (ucdProjectTypesForListingDataView.size() == 1) {
|
||||
// noProjectSelectionMessage.setVisible(false);
|
||||
UseCaseDescriptorDV singleUCD = ucdProjectTypesForListingDataView.get(0);
|
||||
alertProjectType.setText(singleUCD.getName());
|
||||
// setFilteringParameters(displayFields, sortByFields, searchForFields,
|
||||
// currentSearchingFilter);
|
||||
appManagerBus.fireEvent(
|
||||
new GetListOfRecordsEvent(true, singleUCD.getProfileID(), getCurrentSearchingFilter(), true));
|
||||
appManagerBus.fireEvent(new GetListOfRecordsEvent(true, singleUCD.getProfileID(),
|
||||
getCurrentSearchingFilter(), true));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -449,12 +450,19 @@ public class ListOfProjectTablePanel extends Composite {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the project type.
|
||||
*
|
||||
* @param link the link
|
||||
*/
|
||||
public void addProjectType(NavLink link) {
|
||||
public void addProjectType(final UseCaseDescriptorDV ucd) {
|
||||
|
||||
NavLink link = new NavLink(ucd.getName());
|
||||
link.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
alertProjectType.setText(ucd.getName());
|
||||
appManagerBus
|
||||
.fireEvent(new GetListOfRecordsEvent(false, ucd.getProfileID(), builtSearchingFilter(), true));
|
||||
}
|
||||
});
|
||||
|
||||
ddProjectType.add(link);
|
||||
|
||||
}
|
||||
|
|
|
@ -484,7 +484,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
.getGeportalViewerResourceProfile(getThreadLocalRequest());
|
||||
GeoportalCommon gc = new GeoportalCommon(grViewerProfile);
|
||||
GeoportalItemReferences item = new GeoportalItemReferences(itemId, profileID);
|
||||
item = gc.getPublicLinksFor(item, false);
|
||||
item = gc.getPublicLinksFor(item, true);
|
||||
LOG.info("Returning: " + item);
|
||||
return item;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue