info.addStyleName("gss-uploadNote");
panel.add(info);
// Add an informative label with the folder name.
- Object selection = GSS.get().getFolders().getCurrent().getUserObject();
+ Object selection = GSS.get().getTreeView().getSelection();
folder = (FolderResource) selection;
browse = new Button("Browse...");
@Override
public void onClick(ClickEvent event) {
canContinue = false;
- cancelUpload();
+ cancelUpload();
+ GSS.get().showFileList(true);
}
});
buttons.add(cancel);
private void cancelUpload() {
for (HttpRequest request: requests)
request.abort();
- hide();
+ hide();
}
/**
case 201: // Created falls through to updated.
case 204:
filesRemaining.remove(0);
- if(filesRemaining.isEmpty()){
- selectedFiles = filesRemaining;
+ if(filesRemaining.isEmpty()){
finish();
break;
- }
- selectedFiles = filesRemaining;
+ }
doSend(filesRemaining);
break;
case 403:
* Perform the final actions after the files are uploaded.
*/
protected void finish() {
- if (!selectedFiles.isEmpty()) return;
hide();
GSS.get().showFileList(true);
GSS.get().getStatusPanel().updateStats();