fixed clsoe export panel

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@71574 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-03-19 18:02:28 +00:00
parent e213b445af
commit b3f02f11d3
7 changed files with 27 additions and 1 deletions

View File

@ -1148,6 +1148,7 @@ public class Presenter {
* @param type
*/
public void showExportSaveOptions(final String filePath, final String itemName, final TypeExporter type) {
clearExportPanel();
/*
* I need to save a temp file, in case the user uses the Save & Open.
* Smart popup blockers will allow a popup if it is directly associated to a users action.

View File

@ -9,6 +9,7 @@ import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
import org.gcube.portlets.user.reportgenerator.client.toursteps.Intro;
import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
import org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceServiceAsync;
import org.gcube.portlets.user.workspace.lighttree.client.ItemType;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
@ -170,6 +171,7 @@ public class ReportGenerator implements EntryPoint {
});
//presenter.showExportPanel("", "", null, "");
//showGuidedTour() ;
}

View File

@ -14,6 +14,7 @@ import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
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.Composite;
@ -34,6 +35,7 @@ public class ExportOptions extends Composite {
@UiField HTML saveOpen;
@UiField HTML save;
@UiField HTML saveAs;
@UiField HTML close;
@UiField HTMLPanel myPanel;
private String tempFileId;
@ -55,6 +57,19 @@ public class ExportOptions extends Composite {
this.tempFileId = tempFileId;
}
@UiHandler("close")
void onSaveCancel(ClickEvent e) {
myPanel.removeStyleName("exportPanel-show");
//needed for applying the css3 transition effect
final Timer t = new Timer() {
@Override
public void run() {
p.clearExportPanel();
}
};
t.schedule(500);
}
@UiHandler("saveOpen")
void onSaveOpenClick(ClickEvent e) {
GWT.log("SaveOPen");
@ -135,7 +150,7 @@ public class ExportOptions extends Composite {
break;
}
}
public HTMLPanel getMainPanel() {
return myPanel;
}

View File

@ -2,6 +2,9 @@
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<g:HTMLPanel styleName="exportPanel" ui:field="myPanel">
<div class="exportClose">
<g:HTML ui:field="close" styleName="closeImage" title="Cancel"></g:HTML>
</div>
<table style="width: 700px; text-align: center;">
<tr>
<td colspan="3">

View File

@ -29,6 +29,10 @@
-ms-transition-timing-function: ease-out;
}
.exportClose {
width: 775px;
}
.exportPanel-show {
opacity: 1;
background-color: #FFFFBF;
@ -83,6 +87,7 @@
background: url(images/close.png) 0px 0px no-repeat;
height: 15px;
width: 15px;
float: right;
}
.closeImage:hover {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB