Commit 17be172f authored by Riccardo Angius's avatar Riccardo Angius Committed by Felix Paul Kühne

Wifi Upload: cross-browser fix for beforeunload event

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 4c22c69b
......@@ -22,14 +22,14 @@ $(function(){
fileupload.bind('fileuploadprogress', progress);
$(window).bind('beforeunload', function (e) {
var confirmationMessage = "";
var confirmationMessage = null;
if ($('.progress').not('.done').not('.fail').length > 0) {
if ($('.uploads > ul > li').not('.done').not('.fail').length > 0) {
confirmationMessage = 'There are transfers in progress, navigating away will abort them.';
}
(e || window.event).returnValue = confirmationMessage; // Gecko + IE
return confirmationMessage; // Webkit, Safari, Chrome etc.
}
});
var xhrCache = [];
function add (e, data) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment