feature_27120 #13
|
@ -110,6 +110,7 @@ import com.google.gwt.user.client.Timer;
|
|||
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.FlowPanel;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.Image;
|
||||
|
@ -172,6 +173,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
|
||||
private boolean canCreateNewItem = false;
|
||||
|
||||
private GNADataEntryExtendedConfigProfile gNADataEntryPresentationConfig = null;
|
||||
|
||||
/**
|
||||
* This is the entry point method.
|
||||
*/
|
||||
|
@ -198,6 +201,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
ConstantsGeoPortalDataEntryApp.ROOT_PANEL_DIV_PORTLET.getElement()
|
||||
.addClassName(ConstantsGeoPortalDataEntryApp.CSS_CLASS_ANIMATE_FADE_IN_OUT);
|
||||
|
||||
// Loads Geoportal init configurations
|
||||
Command commandGeonaInitConfig = new Command() {
|
||||
|
||||
@Override
|
||||
|
@ -239,6 +243,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
}
|
||||
};
|
||||
|
||||
// Loads data entry presetentation configurations
|
||||
Command commandReadDataViewerConfig = new Command() {
|
||||
|
||||
@Override
|
||||
|
@ -246,7 +251,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
GWT.log("Execute commandReadDataViewerConfig...");
|
||||
// Loading Geoportal Configurations from IS
|
||||
GeoportalDataEntryServiceAsync.Util.getInstance()
|
||||
.readDataViewerConfig(new AsyncCallback<GNADataEntryExtendedConfigProfile>() {
|
||||
.readDataEntryPresentationConfig(new AsyncCallback<GNADataEntryExtendedConfigProfile>() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
@ -272,6 +277,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
GWT.log(GNADataEntryExtendedConfigProfile.class.getSimpleName() + " loaded: "
|
||||
+ gNADataEntryConfig);
|
||||
|
||||
gNADataEntryPresentationConfig = gNADataEntryConfig;
|
||||
try {
|
||||
ConstantsGeoPortalDataEntryApp.ROOT_PANEL_DIV_LOADERS.remove(loaderApplication);
|
||||
} catch (Exception e) {
|
||||
|
@ -307,6 +313,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
|
||||
Command commandInitOnItem = null;
|
||||
|
||||
// Resolves the gid={ITEM_ID}&git={PROFILE_ID}
|
||||
if (paramGeonaItemType != null && paramGeonaItemID != null) {
|
||||
|
||||
commandInitOnItem = new Command() {
|
||||
|
@ -327,19 +334,18 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
@Override
|
||||
public void onSuccess(final ResultDocumentDV result) {
|
||||
GWT.log("commandInitOnItem success: " + result);
|
||||
Integer attempts = 0;
|
||||
|
||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
appManagerBus.fireEvent(new OperationOnItemEvent<DocumentDV>(
|
||||
Arrays.asList(result), OPERATION_ON_ITEM.VIEW_PROJECT_AS_DOCUMENT));
|
||||
|
||||
|
||||
// appManagerBus.fireEvent(new OperationOnItemEvent<DocumentDV>(
|
||||
// Arrays.asList(result), OPERATION_ON_ITEM.VIEW_PROJECT_AS_DOCUMENT));
|
||||
|
||||
Timer timer = new Timer() {
|
||||
int attempts = 0;
|
||||
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
attempts++;
|
||||
|
@ -357,22 +363,47 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
|
||||
if (filterUCD.size() == 1) {
|
||||
GWT.log("FilterUCD");
|
||||
|
||||
|
||||
UseCaseDescriptorDV ucd = filterUCD.get(0);
|
||||
|
||||
ListOfProjectTablePanel listProjectPanel = mainTabPanel.getListOfProjectTablePanel();
|
||||
|
||||
ListOfProjectTablePanel listProjectPanel = mainTabPanel
|
||||
.getListOfProjectTablePanel();
|
||||
SearchingFilter searchingFilter = new SearchingFilter();
|
||||
searchingFilter.setGetForIDs(result.getProfileID(), result.getProjectID());
|
||||
//searchFilter.setConditions(null);
|
||||
//searchFilter.setGetForIDs(result.getProfileID(), result.getProjectID());
|
||||
|
||||
GetListOfRecordsEvent event = new GetListOfRecordsEvent(true, ucd.getProfileID(),
|
||||
searchingFilter, true);
|
||||
|
||||
listProjectPanel.setSearchTypeAndFire(filterUCD.get(0).getName(), event);
|
||||
searchingFilter.setGetForIDs(result.getProfileID(),
|
||||
result.getProjectID());
|
||||
// searchFilter.setConditions(null);
|
||||
// searchFilter.setGetForIDs(result.getProfileID(),
|
||||
// result.getProjectID());
|
||||
|
||||
GetListOfRecordsEvent event = new GetListOfRecordsEvent(
|
||||
true, ucd.getProfileID(), searchingFilter, true);
|
||||
|
||||
listProjectPanel.setSearchTypeAndFire(
|
||||
filterUCD.get(0).getName(), event);
|
||||
|
||||
Modal errorModal = new Modal(true, true);
|
||||
// errorModal.setWidth("800px");
|
||||
errorModal.setCloseVisible(true);
|
||||
errorModal.setTitle("Information...");
|
||||
Image geoportalError = new Image(Images.ICONS.info());
|
||||
geoportalError.setWidth("128px");
|
||||
FlowPanel errorPanelMsg = new FlowPanel();
|
||||
errorPanelMsg.getElement().addClassName("general_info");
|
||||
errorPanelMsg.add(geoportalError);
|
||||
errorPanelMsg.add(new HTML(gNADataEntryPresentationConfig
|
||||
.getDataEntryGUIPresentation().getHeader()
|
||||
.getTitle()));
|
||||
HTML erroMessage = new HTML(
|
||||
"The <span class='general_info_facility'>List of Projects</span> only shows the <br/><br/><b>\""
|
||||
+ result.getFirstEntryOfMap().getValue()
|
||||
+ "\"</b><br/><br/>project resolved by shared link<br/><br/>To view all projects select <span class='general_info_facility'>Reload Projects</span> button");
|
||||
errorPanelMsg.add(erroMessage);
|
||||
errorModal.add(errorPanelMsg);
|
||||
errorModal.show();
|
||||
|
||||
}
|
||||
|
||||
if(attempts>30) {
|
||||
|
||||
if (attempts > 20) {
|
||||
this.cancel();
|
||||
}
|
||||
}
|
||||
|
@ -930,7 +961,6 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
if (searchingFilter == null || getListOfRecordsEvent.isOnApplicationInit()
|
||||
|| getListOfRecordsEvent.isReloadFilteringParameters()) {
|
||||
mainTabPanel.setFilteringParameters(seachingFilterParameters);
|
||||
|
||||
|
||||
// Searching in the cache if the list of relationship definition is present
|
||||
List<RelationshipDefinitionDV> listRelationshipsDef = geoportalCaches
|
||||
|
@ -956,8 +986,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(searchingFilter == null ) {
|
||||
|
||||
if (searchingFilter == null) {
|
||||
searchingFilter = mainTabPanel.getCurrentProjectsSearchingFilter();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public interface GeoportalDataEntryService extends RemoteService {
|
|||
* @return the GNA data entry ext config profile
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
GNADataEntryExtendedConfigProfile readDataViewerConfig() throws Exception;
|
||||
GNADataEntryExtendedConfigProfile readDataEntryPresentationConfig() throws Exception;
|
||||
|
||||
/**
|
||||
* Gets the list use case descriptors.
|
||||
|
|
|
@ -70,7 +70,7 @@ public interface GeoportalDataEntryServiceAsync {
|
|||
|
||||
void updateRecord(String profileID, String projectID, String jsonUpdate, AsyncCallback<ProjectDV> callback);
|
||||
|
||||
void readDataViewerConfig(AsyncCallback<GNADataEntryExtendedConfigProfile> asyncCallback);
|
||||
void readDataEntryPresentationConfig(AsyncCallback<GNADataEntryExtendedConfigProfile> asyncCallback);
|
||||
|
||||
void getListUseCaseDescriptors(List<String> handlersIds, AsyncCallback<List<UseCaseDescriptorDV>> callback);
|
||||
|
||||
|
|
|
@ -16,4 +16,7 @@ public interface Images extends ClientBundle {
|
|||
|
||||
@Source("one-finger-icon.png")
|
||||
ImageResource oneFingerIcon();
|
||||
|
||||
@Source("information_icon.png")
|
||||
ImageResource info();
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -1088,7 +1088,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
|||
* @throws Exception the exception
|
||||
*/
|
||||
@Override
|
||||
public GNADataEntryExtendedConfigProfile readDataViewerConfig() throws Exception {
|
||||
public GNADataEntryExtendedConfigProfile readDataEntryPresentationConfig() throws Exception {
|
||||
LOG.info("readDataViewerConfig called");
|
||||
|
||||
GCubeUser user = null;
|
||||
|
|
|
@ -315,4 +315,21 @@ h1 {
|
|||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
/** END OVERRDING legend-style into 'metadata-profile-form-builder-widget' */
|
||||
/** END OVERRDING legend-style into 'metadata-profile-form-builder-widget' */
|
||||
|
||||
|
||||
.general_info {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.general_info div {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.general_info_facility {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
color: #3e6eac;
|
||||
font-family: Helvetica, Arial;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue