From 483713adc65c22e0fe34251114b322f1d38cc1c8 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Tue, 13 Oct 2015 13:53:40 +0000 Subject: [PATCH] Updated css and progress bar git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@119681 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/resource/FileUpload.css | 2 +- .../client/uploader/UploaderProgressView.java | 21 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/resource/FileUpload.css b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/resource/FileUpload.css index 6216ee8..59a2078 100644 --- a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/resource/FileUpload.css +++ b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/resource/FileUpload.css @@ -19,7 +19,7 @@ font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif; color: #404040; margin: 0px auto; - width: 310px; + width: 330px; } .bar-container > div { diff --git a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderProgressView.java b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderProgressView.java index 6a72d80..cf8cdd6 100644 --- a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderProgressView.java +++ b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderProgressView.java @@ -32,7 +32,7 @@ public class UploaderProgressView { private VerticalPanel vp = new VerticalPanel(); private static final int MAX_CHARS = 55; private HorizontalPanel hp = new HorizontalPanel(); - private HorizontalPanel hpBar = new HorizontalPanel(); +// private HorizontalPanel hpBar = new HorizontalPanel(); private HTML html = new HTML(); private ProgressBar bar = new ProgressBar(); private HandlerManager eventBus; @@ -51,7 +51,8 @@ public class UploaderProgressView { cancelImg = WorkspaceUploaderResources.getImageCancel(); cancelImg.setTitle("Cancel upload"); cancelImg.addStyleName("cancel-upload"); - hpBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); +// hpBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); + hp.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); String text = "
"; String msg = StringUtil.ellipsize("Uploading "+fileName, MAX_CHARS, 0); @@ -67,9 +68,9 @@ public class UploaderProgressView { vp.add(hp); - hpBar.add(bar); - vp.add(hpBar); -// vp.add(bar); +// hpBar.add(bar); +// vp.add(hpBar); + vp.add(bar); } public void setVisibleBar(boolean bool){ @@ -92,12 +93,12 @@ public class UploaderProgressView { html.setHTML(text); html.setTitle(uploader.getStatusDescription()); bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage()); -// try{ -// hpBar.remove(cancelImg); -// }catch (Exception e) {} + try{ + hp.remove(cancelImg); + }catch (Exception e) {} try{ // hpBar.remove(bar); - hpBar.clear(); + vp.remove(bar); }catch (Exception e) {} break; case FAILED: @@ -122,7 +123,7 @@ public class UploaderProgressView { if(uploader.getUploadProgress().getLastEvent().getReadPercentage()!=100 && !cancel){ cancel = true; - hpBar.add(handleCancelUpload(uploader)); + hp.add(handleCancelUpload(uploader)); } bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage());