Allow leaving update page when errors occurred

This commit is contained in:
Vincent Petry 2015-10-14 10:04:20 +02:00 committed by Thomas Müller
parent 06ddd40886
commit 1e64968ff7
1 changed files with 2 additions and 0 deletions

View File

@ -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')