diff --git a/.classpath b/.classpath
index 0bc30bd..4c881c3 100644
--- a/.classpath
+++ b/.classpath
@@ -1,6 +1,6 @@
-
+
@@ -30,5 +30,5 @@
-
+
diff --git a/.settings/com.google.gdt.eclipse.core.prefs b/.settings/com.google.gdt.eclipse.core.prefs
index 7c32945..e29041e 100644
--- a/.settings/com.google.gdt.eclipse.core.prefs
+++ b/.settings/com.google.gdt.eclipse.core.prefs
@@ -1,8 +1,8 @@
-#Mon Mar 18 11:42:27 CET 2013
+#Thu May 02 16:46:18 CEST 2013
=\=\=\=\=\=\=
<<<<<<<=.mine
>>>>>>>=.r71295
eclipse.preferences.version=1
-lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.1.0-SNAPSHOT
+lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.2.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 02a19d2..70b6044 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,4 +1,8 @@
+
+Lots of improvements in the UI
+Embedded images in reports
+
Top menu restyled
adapted to new Workspace Tree
diff --git a/pom.xml b/pom.xml
index b6f8ee9..7f29d89 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,7 +12,7 @@
org.gcube.portlets.user
reports
war
- 4.1.0-SNAPSHOT
+ 4.2.0-SNAPSHOT
gCube Reports Portlet
gCube Reports Portlet.
diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/Presenter/Presenter.java b/src/main/java/org/gcube/portlets/user/reportgenerator/client/Presenter/Presenter.java
index 41e792f..7720fff 100644
--- a/src/main/java/org/gcube/portlets/user/reportgenerator/client/Presenter/Presenter.java
+++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/Presenter/Presenter.java
@@ -260,6 +260,35 @@ public class Presenter {
public void showOpenOptions() {
wp.showOpenOptions();
}
+
+ public void showLoading() {
+ wp.showLoading();
+ }
+
+ /**
+ * load the template to edit in the MODEL and in the VIEW
+ * @param templateToOpen the name of the template to open without extension nor path
+ * @param templateObjectID the id in the folder of the template to open
+ * @param isTemplate true if you are opening a template false if you are opening a report
+ */
+ public void openTemplate(String templateToOpen, String templateObjectID, final boolean isTemplate) {
+ showLoading();
+ //will asyncrously return a Serializable Model instance read from disk
+ model.getModelService().readModel(templateToOpen, templateObjectID, isTemplate, false, new AsyncCallback() {
+ @Override
+ public void onSuccess(Model toLoad) {
+ if (toLoad != null)
+ loadModel(toLoad);
+ else
+ Window.alert("Could not Load template, error on server: ");
+ }
+ @Override
+ public void onFailure(Throwable caught) {
+ Window.alert("Could not Load template, please try again later: " + caught.getMessage());
+
+ }
+ });
+ }
public void showSectionUserCommentsTooltips() {
TemplateSection currSection = model.getSection(model.getCurrentPage());
@@ -712,29 +741,7 @@ public class Presenter {
titleBar.showPrevButton();
}
- /**
- * load the template to edit in the MODEL and in the VIEW
- * @param templateToOpen the name of the template to open without extension nor path
- * @param templateObjectID the id in the folder of the template to open
- * @param isTemplate true if you are opening a template false if you are opening a report
- */
- public void openTemplate(String templateToOpen, String templateObjectID, final boolean isTemplate) {
- //will asyncrously return a Serializable Model instance read from disk
- model.getModelService().readModel(templateToOpen, templateObjectID, isTemplate, false, new AsyncCallback() {
- @Override
- public void onSuccess(Model toLoad) {
- if (toLoad != null)
- loadModel(toLoad);
- else
- Window.alert("Could not Load template, error on server: ");
- }
- @Override
- public void onFailure(Throwable caught) {
- Window.alert("Could not Load template, please try again later: " + caught.getMessage());
-
- }
- });
- }
+
/**
* load the template to edit in the MODEL and in the VIEW
* @param serializedpath the temp file to open
diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/WorkspacePanel.java b/src/main/java/org/gcube/portlets/user/reportgenerator/client/WorkspacePanel.java
index 0092ca2..cab4c69 100644
--- a/src/main/java/org/gcube/portlets/user/reportgenerator/client/WorkspacePanel.java
+++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/WorkspacePanel.java
@@ -6,10 +6,13 @@ import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
import org.gcube.portlets.user.reportgenerator.client.model.TemplateModel;
import org.gcube.portlets.user.reportgenerator.client.targets.DoubleColumnPanel;
import org.gcube.portlets.user.reportgenerator.client.uibinder.OpenOptions;
+import org.gcube.portlets.user.reportgenerator.client.uibinder.ShowLoading;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;
@@ -20,6 +23,7 @@ import com.google.gwt.user.client.ui.Widget;
*/
public class WorkspacePanel extends Composite {
+
/**
* the model
*/
@@ -77,6 +81,11 @@ public class WorkspacePanel extends Composite {
mainLayout.add(new OpenOptions(presenter));
}
+ public void showLoading() {
+ mainLayout.clear();
+ mainLayout.add(new ShowLoading());
+ }
+
/**
*
* @param w .
diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/OpenOptions.java b/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/OpenOptions.java
index e23d2ff..df25e20 100644
--- a/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/OpenOptions.java
+++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/OpenOptions.java
@@ -67,7 +67,7 @@ public class OpenOptions extends Composite {
cmd.openTemplate.execute();
break;
case UPLOAD:
-
+ p.showUploadFilePopup();
break;
default:
break;
diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/ShowLoading.java b/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/ShowLoading.java
new file mode 100644
index 0000000..52d72df
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/ShowLoading.java
@@ -0,0 +1,27 @@
+package org.gcube.portlets.user.reportgenerator.client.uibinder;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Widget;
+
+public class ShowLoading extends Composite {
+ public static final String LOADING = GWT.getModuleBaseURL() + "../images/reports-loader.gif";
+
+ private static ShowoadingUiBinder uiBinder = GWT
+ .create(ShowoadingUiBinder.class);
+
+ interface ShowoadingUiBinder extends UiBinder {
+ }
+
+ @UiField Image loadingReport;
+
+ public ShowLoading() {
+ initWidget(uiBinder.createAndBindUi(this));
+ loadingReport.setUrl(LOADING);
+ }
+
+
+}
diff --git a/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/ShowLoading.ui.xml b/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/ShowLoading.ui.xml
new file mode 100644
index 0000000..7871ab5
--- /dev/null
+++ b/src/main/java/org/gcube/portlets/user/reportgenerator/client/uibinder/ShowLoading.ui.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/images/reports-loader.gif b/src/main/webapp/images/reports-loader.gif
new file mode 100644
index 0000000..3be8732
Binary files /dev/null and b/src/main/webapp/images/reports-loader.gif differ