dont close upload dialog if upload failed

This commit is contained in:
j 2013-03-25 13:47:20 +00:00
parent 5c995553c9
commit f9f1a119a2

View file

@ -179,6 +179,7 @@ pandora.ui.uploadDialog = function(data) {
$progress.options({progress: 0.5 + progress / 2}); $progress.options({progress: 0.5 + progress / 2});
}, },
done: function(data) { done: function(data) {
if (data.progress == 1) {
Ox.Request.clearCache(); Ox.Request.clearCache();
if (pandora.user.ui.item == item && pandora.user.ui.itemView == 'files') { if (pandora.user.ui.item == item && pandora.user.ui.itemView == 'files') {
pandora.$ui.item.reload(); pandora.$ui.item.reload();
@ -190,6 +191,14 @@ pandora.ui.uploadDialog = function(data) {
} }
delete pandora.firefogg; delete pandora.firefogg;
that.close(); that.close();
} else {
$status.html('Upload Failed.');
pandora.api.log({
text: data.responseText,
url: '/' + item,
line: 1
});
}
} }
}); });
}); });