Commit 4c22c69b authored by Riccardo Angius's avatar Riccardo Angius Committed by Felix Paul Kühne
Browse files

WiFi uploader now requires confirmation before user navigates away from page...


WiFi uploader now requires confirmation before user navigates away from page with a transfer is in progress

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent e25397e3
......@@ -21,6 +21,16 @@ $(function(){
fileupload.bind('fileuploadfail', fail);
fileupload.bind('fileuploadprogress', progress);
$(window).bind('beforeunload', function (e) {
var confirmationMessage = "";
if ($('.progress').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) {
$('.message').hide();
......
Supports Markdown
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