Commit 1e64968f authored by Vincent Petry's avatar Vincent Petry Committed by Thomas Müller
Browse files

Allow leaving update page when errors occurred

parent 06ddd408
......@@ -51,12 +51,14 @@
});
updateEventSource.listen('error', function(message) {
message = message || t('core', 'An error occurred.');
$(window).off('beforeunload.inprogress');
$('<span>').addClass('error').append(message).append('<br />').appendTo($el);
message = t('core', 'Please reload the page.');
$('<span>').addClass('error').append('<a href=".">'+message+'</a><br />').appendTo($el);
updateEventSource.close();
});
updateEventSource.listen('failure', function(message) {
$(window).off('beforeunload.inprogress');
$('<span>').addClass('error').append(message).append('<br />').appendTo($el);
$('<span>')
.addClass('bold')
......
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