Added warning message on broken link
This commit is contained in:
parent
1a6c9b074d
commit
ff3a7461df
|
@ -64,6 +64,7 @@ import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
|
|||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery;
|
||||
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerItem;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Modal;
|
||||
import com.github.gwtbootstrap.client.ui.Popover;
|
||||
import com.github.gwtbootstrap.client.ui.constants.Placement;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
|
@ -362,7 +363,7 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
|
||||
if (!ucdIds.contains(collId)) {
|
||||
GWT.log("!! Collection " + collId + " is not available");
|
||||
Window.alert("Collection " + collId + " is not found.");
|
||||
Window.alert("Collection " + collId + " not found.");
|
||||
} else {
|
||||
GCubeCollection toOpen = theConfig.getAvailableCollections().get(collId);
|
||||
|
||||
|
@ -449,9 +450,22 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
Window.alert(caught.getMessage());
|
||||
// Window.alert(caught.getMessage());
|
||||
mainPanel.hidePanelDetails();
|
||||
|
||||
Modal errorModal = new Modal(true, true);
|
||||
errorModal.setCloseVisible(true);
|
||||
errorModal.setTitle("Oops...");
|
||||
Image geoportalError = new Image(GNAImages.ICONS.warningError());
|
||||
FlowPanel errorPanelMsg = new FlowPanel();
|
||||
errorPanelMsg.getElement().addClassName("general_warning");
|
||||
errorPanelMsg.add(geoportalError);
|
||||
errorPanelMsg.add(new HTML("D4S GeoPortal"));
|
||||
HTML erroMessage = new HTML(
|
||||
"Oops something went wrong, either the project does not exist or it has not been published yet");
|
||||
errorPanelMsg.add(erroMessage);
|
||||
errorModal.add(errorPanelMsg);
|
||||
errorModal.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -779,8 +793,9 @@ public class GeoportalDataViewer implements EntryPoint {
|
|||
//console.log("jsonObj: "+jsonObj);
|
||||
return jsonObj;
|
||||
}-*/;
|
||||
|
||||
// /**
|
||||
// * Handler popu closer.
|
||||
// * Handler popup closer.
|
||||
// *
|
||||
// * @param divId the div id
|
||||
// * @param overlayId the overlay id
|
||||
|
|
|
@ -642,7 +642,7 @@ public abstract class OpenLayerMap {
|
|||
|
||||
Style style = new Style();
|
||||
StrokeOptions strokeOptions = new StrokeOptions();
|
||||
strokeOptions.setColor(new Color(255, 255, 51, 0.8));
|
||||
strokeOptions.setColor(new Color(255, 69, 0, 0.8));
|
||||
strokeOptions.setWidth(5);
|
||||
Stroke stroke = new Stroke(strokeOptions);
|
||||
stroke.setWidth(2);
|
||||
|
|
|
@ -59,7 +59,10 @@ public interface GNAImages extends ClientBundle {
|
|||
@Source("spinner_clock.gif")
|
||||
ImageResource spinnerClock();
|
||||
|
||||
@Source("geoporta_error.png")
|
||||
@Source("geoportal_error.png")
|
||||
ImageResource geoportaServiceError();
|
||||
|
||||
@Source("warning_error.png")
|
||||
ImageResource warningError();
|
||||
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
|
@ -720,11 +720,11 @@ Table Of Contents (TOC)
|
|||
text-align: center;
|
||||
font-size: 20px;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
-ms-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
-ms-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.general_error div {
|
||||
|
@ -732,6 +732,16 @@ Table Of Contents (TOC)
|
|||
}
|
||||
|
||||
|
||||
.general_warning {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.general_warning div {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
|
||||
/******************************
|
||||
RESPONSIVE
|
||||
*******************************/
|
||||
|
|
Loading…
Reference in New Issue