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:
parent
483713adc6
commit
107a56c481
|
@ -19,7 +19,7 @@
|
||||||
font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif;
|
font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif;
|
||||||
color: #404040;
|
color: #404040;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
width: 330px;
|
width: 310px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar-container > div {
|
.bar-container > div {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class UploaderProgressView {
|
||||||
private VerticalPanel vp = new VerticalPanel();
|
private VerticalPanel vp = new VerticalPanel();
|
||||||
private static final int MAX_CHARS = 55;
|
private static final int MAX_CHARS = 55;
|
||||||
private HorizontalPanel hp = new HorizontalPanel();
|
private HorizontalPanel hp = new HorizontalPanel();
|
||||||
// private HorizontalPanel hpBar = new HorizontalPanel();
|
private HorizontalPanel hpBar = new HorizontalPanel();
|
||||||
private HTML html = new HTML();
|
private HTML html = new HTML();
|
||||||
private ProgressBar bar = new ProgressBar();
|
private ProgressBar bar = new ProgressBar();
|
||||||
private HandlerManager eventBus;
|
private HandlerManager eventBus;
|
||||||
|
@ -65,12 +65,20 @@ public class UploaderProgressView {
|
||||||
|
|
||||||
bar.update(0);
|
bar.update(0);
|
||||||
setVisibleBar(false);
|
setVisibleBar(false);
|
||||||
|
setVisibleCancel(false);
|
||||||
vp.add(hp);
|
vp.add(hp);
|
||||||
|
|
||||||
// hpBar.add(bar);
|
hpBar.add(cancelImg);
|
||||||
// vp.add(hpBar);
|
hpBar.add(bar);
|
||||||
vp.add(bar);
|
vp.add(hpBar);
|
||||||
|
// vp.add(bar);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param b
|
||||||
|
*/
|
||||||
|
private void setVisibleCancel(boolean b) {
|
||||||
|
cancelImg.setVisible(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setVisibleBar(boolean bool){
|
public void setVisibleBar(boolean bool){
|
||||||
|
@ -94,11 +102,11 @@ public class UploaderProgressView {
|
||||||
html.setTitle(uploader.getStatusDescription());
|
html.setTitle(uploader.getStatusDescription());
|
||||||
bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage());
|
bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage());
|
||||||
try{
|
try{
|
||||||
hp.remove(cancelImg);
|
// hpBar.remove(cancelImg);
|
||||||
}catch (Exception e) {}
|
}catch (Exception e) {}
|
||||||
try{
|
try{
|
||||||
// hpBar.remove(bar);
|
// hpBar.remove(bar);
|
||||||
vp.remove(bar);
|
hpBar.clear();
|
||||||
}catch (Exception e) {}
|
}catch (Exception e) {}
|
||||||
break;
|
break;
|
||||||
case FAILED:
|
case FAILED:
|
||||||
|
@ -123,7 +131,13 @@ public class UploaderProgressView {
|
||||||
|
|
||||||
if(uploader.getUploadProgress().getLastEvent().getReadPercentage()!=100 && !cancel){
|
if(uploader.getUploadProgress().getLastEvent().getReadPercentage()!=100 && !cancel){
|
||||||
cancel = true;
|
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());
|
bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage());
|
||||||
|
|
Loading…
Reference in New Issue