MINOR FIXES FOR USABILITY

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@74584 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-05-06 16:54:25 +00:00
parent beffd67076
commit ac824b245e
5 changed files with 76 additions and 13 deletions

View File

@ -23,7 +23,7 @@ import org.gcube.portlets.user.reportgenerator.client.WorkspacePanel;
import org.gcube.portlets.user.reportgenerator.client.dialog.AddBiblioEntryDialog;
import org.gcube.portlets.user.reportgenerator.client.dialog.DeleteCitationsDialog;
import org.gcube.portlets.user.reportgenerator.client.dialog.ReportStructureDialog;
import org.gcube.portlets.user.reportgenerator.client.dialog.SavingDialog;
import org.gcube.portlets.user.reportgenerator.client.dialog.WaitingOperationDialog;
import org.gcube.portlets.user.reportgenerator.client.events.AddBiblioEvent;
import org.gcube.portlets.user.reportgenerator.client.events.AddBiblioEventHandler;
import org.gcube.portlets.user.reportgenerator.client.events.AddCommentEvent;
@ -93,7 +93,7 @@ public class Presenter {
private HorizontalPanel exportsPanel;
private final SavingDialog dlg = new SavingDialog();
private final WaitingOperationDialog dlg = new WaitingOperationDialog();
private UserBean currentUser;
private String currentScope;
@ -131,6 +131,8 @@ public class Presenter {
eventBus.addHandler(ExportingCompletedEvent.TYPE, new ExportingCompletedEventHandler() {
@Override
public void onExportFinished(ExportingCompletedEvent event) {
int top = 0;
ReportGenerator.get().getScrollerPanel().setVerticalScrollPosition(top);
showExportSaveOptions(event.getFilePath(), event.getItemName(), event.getType());
}
});
@ -222,9 +224,9 @@ public class Presenter {
model = new TemplateModel(this);
titleBar = ReportGenerator.get().getTitleHeader();
dlg.center();
dlg.show();
handleEvents();
AsyncCallback<SessionInfo> callback = new AsyncCallback<SessionInfo>() {
public void onFailure(Throwable caught) {}
@ -234,9 +236,12 @@ public class Presenter {
if (sessionInfo.isWorkflowDocument()) {
model.getModelService().getWorkflowDocumentFromDocumentLibrary(new AsyncCallback<Model>() {
public void onFailure(Throwable caught) { }
public void onFailure(Throwable caught) {
dlg.hide();
}
public void onSuccess(Model wfReport) {
dlg.hide();
loadModel(wfReport);
header.setMenuForWorkflowDocument(sessionInfo.isEditable());
pollServiceForLockRenewal();
@ -245,12 +250,16 @@ public class Presenter {
}
else {
model.getModelService().readTemplateFromSession(new AsyncCallback<Model>() {
public void onFailure(Throwable caught) { }
public void onFailure(Throwable caught) {
dlg.hide();
}
public void onSuccess(Model result) {
dlg.hide();
if (result != null) {
loadModel(result);
header.enableExports();
}
} else
commonCommands.newTemplate.execute();
}
});
}

View File

@ -74,7 +74,7 @@ public class WorkspacePanel extends Composite {
mainLayout.setStyleName("wpFlow");
initWidget(mainLayout);
showOpenOptions();
//showOpenOptions();
}
public void showOpenOptions() {

View File

@ -3,11 +3,13 @@ package org.gcube.portlets.user.reportgenerator.client.dialog;
import org.gcube.portlets.user.gcubewidgets.client.popup.GCubeDialog;
import org.gcube.portlets.user.reportgenerator.client.uibinder.ShowSaving;
public class SavingDialog extends GCubeDialog {
public class WaitingOperationDialog extends GCubeDialog {
public SavingDialog() {
public WaitingOperationDialog() {
super(false, true);
setText("Updating report, please wait ...");
setText("Please wait ...");
setStyleName("loading_DialogBox");
setWidth("200px");
setWidget(new ShowSaving());
}
}

View File

@ -393,7 +393,7 @@ public class ClientImage extends Composite {
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup("Select the Image", true, true);
wpTreepopup.setShowableTypes(ItemType.IMAGE_DOCUMENT, ItemType.EXTERNAL_IMAGE);
wpTreepopup.setSelectableTypes(ItemType.IMAGE_DOCUMENT, ItemType.EXTERNAL_IMAGE);
wpTreepopup.setWidth("450px");
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
if (! event.isCanceled()) {
@ -406,7 +406,7 @@ public class ClientImage extends Composite {
}
}
});
wpTreepopup.setPopupPosition(left, top);
wpTreepopup.center();
wpTreepopup.show();
}

View File

@ -1,6 +1,8 @@
@import url('reports/old-dialog.css');
.openOptionsPanel {
margin: 25px 5px 0px -45px;
border: 1px solid #e3e8f3;
@ -818,4 +820,54 @@ gwt-MenuBar {
.cw-RichText {
border: 1px solid #BBBBBB;
border-spacing: 0px;
}
/** dialog box **/
.loading_DialogBox {
z-index: 10001;
background: #FFFFFF none repeat-x scroll 0 0;
border: 11px solid rgb(60, 60, 60); /* for not understanding rgba prop browsers*/
border: 11px solid rgba(0, 0, 0, 0.50);
-webkit-background-clip: padding-box; /* for Safari */
background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
}
.loading_DialogBox .dialogTop {
background: #2999c9;
margin: 0px;
padding-left: 5px;
height: 20px;
}
.loading_DialogBox .dialogMiddleCenter {
padding: 5px;
}
.loading_DialogBox .dialogMiddleLeft {
background: #FFF;
padding-left: 5px;
}
.loading_DialogBox .dialogMiddleRight {
background: #FFF;
padding-right: 5px;
}
.loading_DialogBox .dialogBottom {
background: #FFF;
margin: 0px;
padding-left: 5px;
height: 5px;
}
.loading_DialogBox .Caption {
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
font-size: 14px;
font-weight: bold;
color: #FFF;
padding: 5px;
}