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
This commit is contained in:
parent
33501b5f0c
commit
483713adc6
|
@ -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 {
|
||||
|
|
|
@ -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 = "<div><img src='"+WorkspaceUploaderResources.getImageLoading().getUrl()+"'>";
|
||||
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());
|
||||
|
|
Loading…
Reference in New Issue