refs #3283: SAI - Fix back button behavior
https://support.d4science.org/issues/3283 Fixed back button behavior git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@128100 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
90dd08c7f3
commit
2017ce16de
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/statistical-algorithms-importer-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/statistical-algorithms-importer-1.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/statistical-algorithms-importer-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/statistical-algorithms-importer-1.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -45,5 +45,5 @@
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="output" path="target/statistical-algorithms-importer-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/statistical-algorithms-importer-1.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="${groupId}.${artifactId}.1-1-0" date="2016-05-01">
|
||||||
|
<Change>Fixed back button behavior [Ticket #3283]</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="${groupId}.${artifactId}.1-0-0" date="2016-02-28">
|
<Changeset component="${groupId}.${artifactId}.1-0-0" date="2016-02-28">
|
||||||
<Change>First Release</Change>
|
<Change>First Release</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -8,12 +8,12 @@
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<relativePath />
|
<relativePath />
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<!-- POM file generated with GWT webAppCreator -->
|
<!-- POM file generated with GWT webAppCreator -->
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>statistical-algorithms-importer</artifactId>
|
<artifactId>statistical-algorithms-importer</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package org.gcube.portlets.user.statisticalalgorithmsimporter.client;
|
package org.gcube.portlets.user.statisticalalgorithmsimporter.client;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.gcubewidgets.client.ClientScopeHelper;
|
||||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.maindata.MainDataPanel;
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.maindata.MainDataPanel;
|
||||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.resource.StatAlgoImporterResources;
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.resource.StatAlgoImporterResources;
|
||||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.ribbon.StatAlgoImporterRibbon;
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.ribbon.StatAlgoImporterRibbon;
|
||||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.rpc.StatAlgoImporterService;
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.rpc.StatAlgoImporterService;
|
||||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.rpc.StatAlgoImporterServiceAsync;
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.rpc.StatAlgoImporterServiceAsync;
|
||||||
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.tools.ToolsPanel;
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.tools.ToolsPanel;
|
||||||
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.utils.UtilsGXT3;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.client.EntryPoint;
|
import com.google.gwt.core.client.EntryPoint;
|
||||||
|
@ -13,6 +15,8 @@ import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.core.client.Scheduler;
|
import com.google.gwt.core.client.Scheduler;
|
||||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||||
import com.google.gwt.event.shared.EventBus;
|
import com.google.gwt.event.shared.EventBus;
|
||||||
|
import com.google.gwt.user.client.Window.Location;
|
||||||
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.gwt.user.client.ui.RootPanel;
|
import com.google.gwt.user.client.ui.RootPanel;
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
||||||
|
@ -20,7 +24,7 @@ import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderL
|
||||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||||
import com.sencha.gxt.widget.core.client.container.Viewport;
|
import com.sencha.gxt.widget.core.client.container.Viewport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author "Giancarlo Panichi" <a
|
||||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
@ -54,13 +58,37 @@ public class StatAlgoImporter implements EntryPoint {
|
||||||
// onModuleLoad2
|
// onModuleLoad2
|
||||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||||
public void execute() {
|
public void execute() {
|
||||||
loadMainPanel();
|
loadScope();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadMainPanel() {
|
private void loadScope() {
|
||||||
|
ClientScopeHelper.getService().setScope(Location.getHref(),
|
||||||
|
new AsyncCallback<Boolean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Boolean result) {
|
||||||
|
if (result) {
|
||||||
|
loadMainPanel();
|
||||||
|
} else {
|
||||||
|
UtilsGXT3
|
||||||
|
.info("Attention",
|
||||||
|
"ClientScopeHelper has returned a false value!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
UtilsGXT3.alert("Error", "Error setting scope: "
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
caught.printStackTrace();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadMainPanel() {
|
||||||
StatAlgoImporterResources.INSTANCE.saiStyles().ensureInjected();
|
StatAlgoImporterResources.INSTANCE.saiStyles().ensureInjected();
|
||||||
// ScriptInjector.fromString(AccountingManagerResources.INSTANCE.jqueryJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
|
// ScriptInjector.fromString(AccountingManagerResources.INSTANCE.jqueryJs().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
|
||||||
|
|
||||||
|
@ -72,7 +100,7 @@ public class StatAlgoImporter implements EntryPoint {
|
||||||
mainPanelLayout.setId("mainPanelLayout");
|
mainPanelLayout.setId("mainPanelLayout");
|
||||||
mainPanelLayout.setBorders(false);
|
mainPanelLayout.setBorders(false);
|
||||||
mainPanelLayout.setResize(true);
|
mainPanelLayout.setResize(true);
|
||||||
|
|
||||||
// mainPanelLayout.getElement().getStyle().setBackgroundColor("rgb(3, 126, 207)");
|
// mainPanelLayout.getElement().getStyle().setBackgroundColor("rgb(3, 126, 207)");
|
||||||
|
|
||||||
// Main
|
// Main
|
||||||
|
@ -101,14 +129,13 @@ public class StatAlgoImporter implements EntryPoint {
|
||||||
eastData.setCollapseMini(true);
|
eastData.setCollapseMini(true);
|
||||||
eastData.setMargins(new Margins(0, 5, 0, 5));
|
eastData.setMargins(new Margins(0, 5, 0, 5));
|
||||||
eastData.setCollapseHidden(false);
|
eastData.setCollapseHidden(false);
|
||||||
|
|
||||||
|
|
||||||
// estData.setMaxSize(510);
|
// estData.setMaxSize(510);
|
||||||
// estData.setMinSize(310);
|
// estData.setMinSize(310);
|
||||||
mainPanelLayout.setEastWidget(toolsPanel, eastData);
|
mainPanelLayout.setEastWidget(toolsPanel, eastData);
|
||||||
toolsPanel.enable();
|
toolsPanel.enable();
|
||||||
toolsPanel.collapse();
|
toolsPanel.collapse();
|
||||||
|
|
||||||
bind(mainPanelLayout);
|
bind(mainPanelLayout);
|
||||||
controller.setMainPanelLayout(mainPanelLayout);
|
controller.setMainPanelLayout(mainPanelLayout);
|
||||||
controller.restoreUISession();
|
controller.restoreUISession();
|
||||||
|
|
|
@ -19,6 +19,12 @@
|
||||||
<servlet-class>org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl</servlet-class>
|
<servlet-class>org.gcube.portlets.widgets.sessionchecker.server.SessionCheckerServiceImpl</servlet-class>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
|
<!-- Scope Helper -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>scopeService</servlet-name>
|
||||||
|
<servlet-class>org.gcube.portlets.user.gcubewidgets.server.ScopeServiceImpl</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
<!-- StatisticalAlgoImporterService -->
|
<!-- StatisticalAlgoImporterService -->
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>StatAlgoImporterService</servlet-name>
|
<servlet-name>StatAlgoImporterService</servlet-name>
|
||||||
|
@ -92,6 +98,11 @@
|
||||||
<url-pattern>/statalgoimporter/workspaceUploadServletStream</url-pattern>
|
<url-pattern>/statalgoimporter/workspaceUploadServletStream</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- Scope Helper -->
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>scopeService</servlet-name>
|
||||||
|
<url-pattern>/statalgoimporter/scopeService</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
<!-- Default page to serve -->
|
<!-- Default page to serve -->
|
||||||
<welcome-file-list>
|
<welcome-file-list>
|
||||||
|
|
Loading…
Reference in New Issue