forked from 0x2620/pandora
dont close upload dialog if upload failed
This commit is contained in:
parent
5c995553c9
commit
f9f1a119a2
1 changed files with 17 additions and 8 deletions
|
@ -179,17 +179,26 @@ 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) {
|
||||||
Ox.Request.clearCache();
|
if (data.progress == 1) {
|
||||||
if (pandora.user.ui.item == item && pandora.user.ui.itemView == 'files') {
|
Ox.Request.clearCache();
|
||||||
pandora.$ui.item.reload();
|
if (pandora.user.ui.item == item && pandora.user.ui.itemView == 'files') {
|
||||||
|
pandora.$ui.item.reload();
|
||||||
|
} else {
|
||||||
|
pandora.UI.set({
|
||||||
|
item: item,
|
||||||
|
itemView: 'files'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
delete pandora.firefogg;
|
||||||
|
that.close();
|
||||||
} else {
|
} else {
|
||||||
pandora.UI.set({
|
$status.html('Upload Failed.');
|
||||||
item: item,
|
pandora.api.log({
|
||||||
itemView: 'files'
|
text: data.responseText,
|
||||||
|
url: '/' + item,
|
||||||
|
line: 1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
delete pandora.firefogg;
|
|
||||||
that.close();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue