task_24166 #11
|
@ -50,6 +50,8 @@ public class ConstantsGeoPortalDataEntryApp {
|
||||||
|
|
||||||
public static final DateTimeFormat DATE_TIME_FORMAT = DateTimeFormat.getFormat("dd MMMM yyyy");
|
public static final DateTimeFormat DATE_TIME_FORMAT = DateTimeFormat.getFormat("dd MMMM yyyy");
|
||||||
|
|
||||||
|
public static final String SHOW_ON_MAP_NOT_AVAILABLE_IN_DRAFT = "The 'Show on Map' facility is not available in DRAFT phase";
|
||||||
|
|
||||||
public static final String ALERT_MESSAGE_PROJECT_NOT_EDITABLE = "A Project can only be updated in "
|
public static final String ALERT_MESSAGE_PROJECT_NOT_EDITABLE = "A Project can only be updated in "
|
||||||
+ WORKFLOW_PHASE.DRAFT.name()
|
+ WORKFLOW_PHASE.DRAFT.name()
|
||||||
+ " phase. You need to perform the step 'Reject' or 'UnPublish' to take back the project in "
|
+ " phase. You need to perform the step 'Reject' or 'UnPublish' to take back the project in "
|
||||||
|
|
|
@ -1445,14 +1445,28 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
final Modal modal = new Modal(true, true);
|
final Modal modal = new Modal(true, true);
|
||||||
modal.setTitle("Show on Map the Project...");
|
modal.setTitle("Show on Map the Project...");
|
||||||
modal.setCloseVisible(true);
|
modal.setCloseVisible(true);
|
||||||
|
if (resultDocumentDV.getLifecycleInfo() != null) {
|
||||||
|
String phase = resultDocumentDV.getLifecycleInfo().getPhase();
|
||||||
|
// IF the project is not in DRAFT phase, showing an alert and no Update Mode
|
||||||
|
// will
|
||||||
|
// be activated
|
||||||
|
if (phase != null && phase.compareToIgnoreCase(WORKFLOW_PHASE.DRAFT.getLabel()) == 0) {
|
||||||
|
|
||||||
|
Alert alert = new Alert(
|
||||||
|
ConstantsGeoPortalDataEntryApp.SHOW_ON_MAP_NOT_AVAILABLE_IN_DRAFT);
|
||||||
|
alert.setType(AlertType.WARNING);
|
||||||
|
alert.setClose(false);
|
||||||
|
modal.add(alert);
|
||||||
|
modal.show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
final HorizontalPanel hpGetLink = new HorizontalPanel();
|
final HorizontalPanel hpGetLink = new HorizontalPanel();
|
||||||
final LoaderIcon lc = new LoaderIcon("Just moment getting link...");
|
final LoaderIcon lc = new LoaderIcon("Just moment getting link...");
|
||||||
hpGetLink.add(lc);
|
hpGetLink.add(lc);
|
||||||
modal.add(hpGetLink);
|
modal.add(hpGetLink);
|
||||||
|
|
||||||
// final NewBrowserWindow newBrowserWindow = NewBrowserWindow.open("", "_blank",
|
|
||||||
// "");
|
|
||||||
|
|
||||||
GeoportalDataEntryServiceAsync.Util.getInstance().getLinksFor(resultDocumentDV.getId(),
|
GeoportalDataEntryServiceAsync.Util.getInstance().getLinksFor(resultDocumentDV.getId(),
|
||||||
resultDocumentDV.getProfileID(), new AsyncCallback<GeoportalItemReferences>() {
|
resultDocumentDV.getProfileID(), new AsyncCallback<GeoportalItemReferences>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1577,14 +1591,6 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// EditModeRecord emr = new EditModeRecord(appManagerBus, resultDocumentDV);
|
|
||||||
// modal3.add(emr);
|
|
||||||
// modal3.show();
|
|
||||||
//
|
|
||||||
// if(isPublishedProject) {
|
|
||||||
// emr.noUpdateMode();
|
|
||||||
// }
|
|
||||||
|
|
||||||
UpdateRecord ur = new UpdateRecord(appManagerBus, resultDocumentDV.getProfileID(),
|
UpdateRecord ur = new UpdateRecord(appManagerBus, resultDocumentDV.getProfileID(),
|
||||||
resultDocumentDV.getId(), width, height);
|
resultDocumentDV.getId(), width, height);
|
||||||
|
|
||||||
|
@ -1631,6 +1637,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//It is the show document
|
||||||
case SHOW_METADATA: {
|
case SHOW_METADATA: {
|
||||||
GWT.log("VIEW SHOW_METADATA fired");
|
GWT.log("VIEW SHOW_METADATA fired");
|
||||||
final Modal modal = new Modal(true, true);
|
final Modal modal = new Modal(true, true);
|
||||||
|
|
Loading…
Reference in New Issue