fix for ticket #1801

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@76625 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-05-31 16:14:48 +00:00
parent 65f297906e
commit b58ee1a4b0
7 changed files with 44 additions and 29 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/reports-4.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/reports-4.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -30,5 +30,5 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/reports-4.2.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/reports-4.3.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,8 +1,8 @@
#Thu May 02 16:46:18 CEST 2013
#Fri May 31 18:12:53 CEST 2013
=\=\=\=\=\=\=
<<<<<<<=.mine
>>>>>>>=.r71295
eclipse.preferences.version=1
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.2.0-SNAPSHOT
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.3.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

21
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>reports</artifactId>
<packaging>war</packaging>
<version>4.2.0-SNAPSHOT</version>
<version>4.3.0-SNAPSHOT</version>
<name>gCube Reports Portlet</name>
<description>
gCube Reports Portlet.
@ -157,14 +157,14 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>home-library</artifactId>
<version>[4.3.0-SNAPSHOT,5.0.0-SNAPSHOT)</version>
<scope>${setScope}</scope>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>home-library-jcr</artifactId>
<version>[1.3.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<!-- <classifier>${setClassifier}</classifier> -->
<scope>${setScope}</scope>
<!-- <classifier>${setClassifier}</classifier> -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
@ -226,19 +226,6 @@
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<build>

View File

@ -244,6 +244,7 @@ public class Presenter {
dlg.hide();
loadModel(wfReport);
header.setMenuForWorkflowDocument(sessionInfo.isEditable());
titleBar.addWorkflowButtons(true);
pollServiceForLockRenewal();
}
});

View File

@ -10,6 +10,7 @@ import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.CellPanel;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
@ -59,6 +60,7 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
private HTML nextButton = new HTML("&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"" + ReportConstants.IMAGE_NEXT_PAGE + "\" />", true);
private HorizontalPanel captionPanel = new HorizontalPanel();
/**
* Constructor
* @param c the controller instance for this UI component
@ -81,7 +83,6 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
//design the part for the template name and the pages handling
HorizontalPanel captionPanel = new HorizontalPanel();
HorizontalPanel innerCaptionPanel = new HorizontalPanel();
captionPanel.setWidth("100%");
@ -102,14 +103,16 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
captionPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
innerCaptionPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
innerCaptionPanel.setVerticalAlignment(HasAlignment.ALIGN_BOTTOM);
innerCaptionPanel.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
innerCaptionPanel.add(templateNameBox);
innerCaptionPanel.add(editedOn);
captionPanel.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
captionPanel.add(innerCaptionPanel);
mainLayout.add(captionPanel);
mainLayout.add(pageHandlerPanel);
editedOn.setStyleName("docEditedBy");
mainLayout.setCellHorizontalAlignment(captionPanel, HasHorizontalAlignment.ALIGN_LEFT);
mainLayout.setCellVerticalAlignment(captionPanel, HasVerticalAlignment.ALIGN_MIDDLE);
mainLayout.setCellWidth(pageHandlerPanel, "200");
initWidget(mainLayout);
@ -123,7 +126,31 @@ import com.google.gwt.user.client.ui.HorizontalPanel;
public void onClick(ClickEvent event) { presenter.prevPageButtonClicked(); }
});
}
/**
* add the buttons well visible on the top
* @param isEdit
*/
public void addWorkflowButtons(final boolean isEdit) {
Button update = new Button("Update (SAVE)");
update.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.updateWorkflowDocument(isEdit);
}
});
Button back = new Button("Do not Update");
back.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.updateWorkflowDocument(isEdit);
}
});
update.addStyleName("addEntryButton");
back.addStyleName("deleteEntryButton");
captionPanel.add(update);
captionPanel.add(back);
}
/**
* changes the pages label in the UI : e.g. Page x of y
* @param currentPage .

View File

@ -6,7 +6,7 @@ import org.gcube.portlets.user.reportgenerator.client.uibinder.ShowSaving;
public class WaitingOperationDialog extends GCubeDialog {
public WaitingOperationDialog() {
super(false, true);
super(true, false);
setText("Please wait ...");
setStyleName("loading_DialogBox");
setWidth("200px");

View File

@ -5,7 +5,7 @@
<table style="width: 700px; text-align: center;">
<tr>
<td>
<g:HTML ui:field="openTemplate" styleName="openOption optionOpenTemplate">Load Template</g:HTML>
<g:HTML ui:field="openTemplate" styleName="openOption optionOpenTemplate">New From Template</g:HTML>
</td>
<td>
<g:HTML ui:field="openReport" styleName="openOption optionOpenReport">Open/Edit Report</g:HTML>