#24300 Done. Improved the GUI of the search functionality when multiple
collections are available.
This commit is contained in:
parent
78cc536f54
commit
b797a9fd8d
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.0.0/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.0.1-SNAPSHOT/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-viewer-app-3.0.0/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.0.1-SNAPSHOT/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-viewer-app-3.0.0/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.0.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
eclipse.preferences.version=1
|
||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.0.0
|
||||
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.0.1-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
|
|
@ -35,7 +35,9 @@
|
|||
|
||||
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.0.0">
|
||||
|
||||
<wb-module deploy-name="geoportal-data-viewer-app-3.0.1-SNAPSHOT">
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -93,6 +95,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -130,6 +133,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -167,6 +171,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -204,6 +209,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -241,6 +247,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -278,6 +285,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -315,6 +323,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -351,6 +360,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
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).
|
||||
|
||||
## [v3.0.1-SNAPSHOT] - 2022-12-13
|
||||
|
||||
- [#24300] Improved the GUI of the search functionality when multiple collections are available.
|
||||
|
||||
## [v3.0.0] - 2022-11-28
|
||||
|
||||
- [#23940] Passed to CMS-UCD
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -14,7 +14,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>geoportal-data-viewer-app</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>3.0.0</version>
|
||||
<version>3.0.1-SNAPSHOT</version>
|
||||
<name>GeoPortal Data Viewer App</name>
|
||||
<description>The GeoPortal Data Viewer App is an application to access, discovery and navigate the Geoportal projects/documents by a Web-Map Interface</description>
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
|||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.CheckBox;
|
||||
import com.github.gwtbootstrap.client.ui.DropdownButton;
|
||||
import com.github.gwtbootstrap.client.ui.ListBox;
|
||||
import com.github.gwtbootstrap.client.ui.NavLink;
|
||||
import com.github.gwtbootstrap.client.ui.NavList;
|
||||
import com.github.gwtbootstrap.client.ui.Paragraph;
|
||||
|
@ -38,6 +39,8 @@ import com.google.gwt.core.client.GWT;
|
|||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||
import com.google.gwt.dom.client.Style.Unit;
|
||||
import com.google.gwt.event.dom.client.ChangeEvent;
|
||||
import com.google.gwt.event.dom.client.ChangeHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
||||
|
@ -56,6 +59,8 @@ import com.google.gwt.user.client.ui.ScrollPanel;
|
|||
import com.google.gwt.user.client.ui.SimplePanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
|
||||
import ol.has.Has;
|
||||
|
||||
/**
|
||||
* The Class GeonaDataViewMainPanel.
|
||||
*
|
||||
|
@ -65,6 +70,8 @@ import com.google.gwt.user.client.ui.Widget;
|
|||
*/
|
||||
public class GeonaDataViewMainPanel extends Composite {
|
||||
|
||||
private static final String PLACEHOLDER_SELECT_SEARCH_IN = "Select Collection...";
|
||||
|
||||
private static GeonaDataViewMainPanelUiBinder uiBinder = GWT.create(GeonaDataViewMainPanelUiBinder.class);
|
||||
|
||||
/**
|
||||
|
@ -114,7 +121,7 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
DropdownButton searchFacilityButton;
|
||||
|
||||
@UiField
|
||||
NavList navListSearch;
|
||||
ListBox navListSearch;
|
||||
|
||||
@UiField
|
||||
ScrollPanel overlayLayersPanel;
|
||||
|
@ -142,6 +149,10 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
|
||||
private HashMap<String, List<CheckBox>> mapCollectionCheckBoxes;
|
||||
|
||||
private SearchFacilityUI currentSearchFacility;
|
||||
|
||||
private HashMap<String, ItemFieldsResponse> mapItemFieldsForUCD = new HashMap<String, ItemFieldsResponse>();
|
||||
|
||||
public GeonaDataViewMainPanel(HandlerManager applicationBus, int mapHeight,
|
||||
List<ItemFieldsResponse> itemFieldsReponse) {
|
||||
initWidget(uiBinder.createAndBindUi(this));
|
||||
|
@ -171,12 +182,42 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
|
||||
openCollectionDropDown.setIcon(IconType.COMPASS);
|
||||
|
||||
mapItemFieldsForUCD.clear();
|
||||
|
||||
SearchingFilter initialSortFilter = new SearchingFilter();
|
||||
initialSortFilter.setOrder(ORDER.ASC);
|
||||
|
||||
for (final ItemFieldsResponse ifResponse : itemFieldsReponse) {
|
||||
navListSearch.addItem(PLACEHOLDER_SELECT_SEARCH_IN, PLACEHOLDER_SELECT_SEARCH_IN);
|
||||
|
||||
List<ItemFieldDV> result = ifResponse.getListItemFields();
|
||||
navListSearch.getElement().getFirstChildElement().setAttribute("disabled", "disabled");
|
||||
|
||||
for (final ItemFieldsResponse itemFieldResp : itemFieldsReponse) {
|
||||
|
||||
UseCaseDescriptorDV ucd = itemFieldResp.getUseCaseDescriptorDV();
|
||||
mapItemFieldsForUCD.put(ucd.getId(), itemFieldResp);
|
||||
GWT.log("Added navLink for: " + ucd.getName());
|
||||
navListSearch.addItem(ucd.getName(), ucd.getProfileID());
|
||||
}
|
||||
|
||||
navListSearch.addChangeHandler(new ChangeHandler() {
|
||||
|
||||
private SearchFacilityUI currentSearchFacility;
|
||||
|
||||
@Override
|
||||
public void onChange(ChangeEvent event) {
|
||||
|
||||
if (this.currentSearchFacility != null)
|
||||
this.currentSearchFacility.resetCurrentSearch();
|
||||
|
||||
String ucdProfileID = navListSearch.getValue(navListSearch.getSelectedIndex());
|
||||
GWT.log("UCD ProfileID selected: " + ucdProfileID);
|
||||
|
||||
if (ucdProfileID.compareTo(PLACEHOLDER_SELECT_SEARCH_IN) != 0) {
|
||||
|
||||
searchFacilityPanel.clear();
|
||||
ItemFieldsResponse itemFieldResp = mapItemFieldsForUCD.get(ucdProfileID);
|
||||
|
||||
List<ItemFieldDV> result = itemFieldResp.getListItemFields();
|
||||
List<ItemFieldDV> displayFields = new ArrayList<ItemFieldDV>();
|
||||
List<ItemFieldDV> searchByFields = new ArrayList<ItemFieldDV>();
|
||||
List<ItemFieldDV> sortByFields = new ArrayList<ItemFieldDV>();
|
||||
|
@ -194,30 +235,14 @@ public class GeonaDataViewMainPanel extends Composite {
|
|||
}
|
||||
}
|
||||
|
||||
final UseCaseDescriptorDV ucd = ifResponse.getUseCaseDescriptorDV();
|
||||
NavLink navLink = new NavLink(ifResponse.getUseCaseDescriptorDV().getName());
|
||||
// navLink.setText(ucd.getName());
|
||||
navLink.addClickHandler(new ClickHandler() {
|
||||
|
||||
private SearchFacilityUI currentSearchFacility;
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
if (this.currentSearchFacility != null)
|
||||
this.currentSearchFacility.resetCurrentSearch();
|
||||
|
||||
searchFacilityPanel.clear();
|
||||
this.currentSearchFacility = new SearchFacilityUI(ucd.getProfileID(), applicationBus, displayFields,
|
||||
this.currentSearchFacility = new SearchFacilityUI(ucdProfileID, applicationBus, displayFields,
|
||||
sortByFields, searchByFields, initialSortFilter);
|
||||
searchFacilityPanel.add(currentSearchFacility);
|
||||
currentSearchFacility.setSearchButton(searchFacilityButton);
|
||||
}
|
||||
});
|
||||
|
||||
GWT.log("Added navLink for: " + ucd.getName());
|
||||
navListSearch.add(navLink);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
searchFacilityButton.setIcon(IconType.SEARCH);
|
||||
|
||||
|
|
|
@ -17,6 +17,14 @@
|
|||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.margin-left-top-5 {
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.margin-left-5 {
|
||||
margin-left: 5px;
|
||||
}
|
||||
</ui:style>
|
||||
<g:HTMLPanel ui:field="mainHTMLPanel">
|
||||
<g:HTMLPanel ui:field="mainContainerPanel">
|
||||
|
@ -43,7 +51,8 @@
|
|||
</b:DropdownButton>
|
||||
<b:DropdownButton type="LINK"
|
||||
text="Open Collection" ui:field="openCollectionDropDown">
|
||||
<g:HTMLPanel ui:field="openCollectionPanel" addStyleNames="{style.open-collection-style}">
|
||||
<g:HTMLPanel ui:field="openCollectionPanel"
|
||||
addStyleNames="{style.open-collection-style}">
|
||||
</g:HTMLPanel>
|
||||
</b:DropdownButton>
|
||||
<b:DropdownButton type="LINK"
|
||||
|
@ -53,7 +62,14 @@
|
|||
</b:DropdownButton>
|
||||
<b:DropdownButton type="LINK" text="Search"
|
||||
ui:field="searchFacilityButton">
|
||||
<b:NavList ui:field="navListSearch"></b:NavList>
|
||||
<g:FlowPanel addStyleNames="search-field">
|
||||
<g:HorizontalPanel>
|
||||
<b:Label type="INFO">Search in </b:Label>
|
||||
<b:ListBox title="Search in the Collection..."
|
||||
ui:field="navListSearch">
|
||||
</b:ListBox>
|
||||
</g:HorizontalPanel>
|
||||
</g:FlowPanel>
|
||||
<g:ScrollPanel ui:field="searchFacilityPanel"
|
||||
addStyleNames="search-facility"></g:ScrollPanel>
|
||||
</b:DropdownButton>
|
||||
|
|
|
@ -488,6 +488,22 @@ body {
|
|||
width: 250px !important;
|
||||
}
|
||||
|
||||
.search-field {
|
||||
margin: 5px;
|
||||
background-color: #f9f9f9;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.search-field div {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.search-field select {
|
||||
margin-left: 8px;
|
||||
width: 505px !important;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table-results {
|
||||
table-layout: fixed;
|
||||
/*width: 600px;*/
|
||||
|
|
Loading…
Reference in New Issue