Updated css and progress bar

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@119682 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-10-13 14:11:51 +00:00
parent 483713adc6
commit 107a56c481
2 changed files with 23 additions and 9 deletions

View File

@ -19,7 +19,7 @@
font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif;
color: #404040;
margin: 0px auto;
width: 330px;
width: 310px;
}
.bar-container > div {

View File

@ -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;
@ -65,14 +65,22 @@ public class UploaderProgressView {
bar.update(0);
setVisibleBar(false);
setVisibleCancel(false);
vp.add(hp);
// hpBar.add(bar);
// vp.add(hpBar);
vp.add(bar);
hpBar.add(cancelImg);
hpBar.add(bar);
vp.add(hpBar);
// vp.add(bar);
}
/**
* @param b
*/
private void setVisibleCancel(boolean b) {
cancelImg.setVisible(b);
}
public void setVisibleBar(boolean bool){
bar.setVisible(bool);
}
@ -94,11 +102,11 @@ public class UploaderProgressView {
html.setTitle(uploader.getStatusDescription());
bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage());
try{
hp.remove(cancelImg);
// hpBar.remove(cancelImg);
}catch (Exception e) {}
try{
// hpBar.remove(bar);
vp.remove(bar);
hpBar.clear();
}catch (Exception e) {}
break;
case FAILED:
@ -123,7 +131,13 @@ public class UploaderProgressView {
if(uploader.getUploadProgress().getLastEvent().getReadPercentage()!=100 && !cancel){
cancel = true;
hp.add(handleCancelUpload(uploader));
handleCancelUpload(uploader);
setVisibleCancel(true);
}else if(uploader.getUploadProgress().getLastEvent().getReadPercentage()==100 && cancel){
try{
setVisibleCancel(false);
// hp.remove(cancelImg);
}catch (Exception e) {}
}
bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage());