Revision ecf96721 src/gr/grnet/pithos/web/client/FileUploadDialog.java
b/src/gr/grnet/pithos/web/client/FileUploadDialog.java | ||
---|---|---|
243 | 243 |
}, |
244 | 244 |
|
245 | 245 |
UploadComplete: function(up, files) { |
246 |
if ($wnd.console && $wnd.console.log) |
|
246 |
if ($wnd.console && $wnd.console.log) {
|
|
247 | 247 |
$wnd.console.log('All files finished'); |
248 |
} |
|
248 | 249 |
dlg.@gr.grnet.pithos.web.client.FileUploadDialog::setInProgress(Z)(false); |
249 | 250 |
dlg.@gr.grnet.pithos.web.client.FileUploadDialog::hideUploadIndicator()(); |
250 | 251 |
app.@gr.grnet.pithos.web.client.Pithos::hideUploadAlert()(); |
251 | 252 |
var uris = []; |
252 |
for (var i = 0; i<files.length; i++) |
|
253 |
uris.push(files[i].url); |
|
253 |
if (!dlg.@gr.grnet.pithos.web.client.FileUploadDialog::isVisible()()) |
|
254 |
while (files.length > 0) { |
|
255 |
uris.push(files[0].url); |
|
256 |
up.removeFile(files[0]); |
|
257 |
} |
|
258 |
else |
|
259 |
for (var i=0; i<files.length; i++) |
|
260 |
uris.push(files[i].url); |
|
254 | 261 |
app.@gr.grnet.pithos.web.client.Pithos::updateUploadFolder(Lcom/google/gwt/core/client/JsArrayString;)(uris); |
255 | 262 |
}, |
256 | 263 |
|
... | ... | |
346 | 353 |
void close() { |
347 | 354 |
setVisible(false); |
348 | 355 |
setModal(false); |
356 |
clearUploader(); |
|
349 | 357 |
if (isUploading()) |
350 | 358 |
app.showUploadIndicator(); |
351 | 359 |
setGlobalDropArea(); |
352 | 360 |
} |
361 |
|
|
362 |
private native void clearUploader() /*-{ |
|
363 |
var uploader = $wnd.$("#uploader").pluploadQueue(); |
|
364 |
var files = uploader.files; |
|
365 |
while (files.length > 0) |
|
366 |
uploader.removeFile(files[0]); |
|
367 |
}-*/; |
|
353 | 368 |
|
354 | 369 |
native void setGlobalDropArea() /*-{ |
355 | 370 |
var uploader = $wnd.$("#uploader").pluploadQueue(); |
Also available in: Unified diff