Skip to content

Commit

Permalink
Another Drag and Drop fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelck committed Aug 25, 2011
1 parent 36f1e67 commit 2ea1283
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/browser/dropUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ browser.initDropUpload = function() {
files = $('#files'),
folders = $('div.folder > a'),
boundary = '------multipartdropuploadboundary' + (new Date).getTime(),
currentFile,

filesDragOver = function(e) {
if (e.preventDefault) e.preventDefault();
Expand Down Expand Up @@ -151,6 +152,7 @@ browser.initDropUpload = function() {

if (uploadQueue && uploadQueue.length) {
var file = uploadQueue.shift();
currentFile = file;
$('#loading').html(browser.label("Uploading file {number} of {count}... {progress}", {
number: filesCount - uploadQueue.length,
count: filesCount,
Expand Down Expand Up @@ -215,13 +217,14 @@ browser.initDropUpload = function() {
var loop = setInterval(function() {
if (uploadInProgress) return;
clearInterval(loop);
browser.refresh();
if (currentFile.thisTargetDir == browser.dir)
browser.refresh();
boundary = '------multipartdropuploadboundary' + (new Date).getTime();
if (errors.length) {
browser.alert(errors.join('\n'));
errors = [];
}
}, 500);
}, 333);
}
}
};

0 comments on commit 2ea1283

Please sign in to comment.