Delay reloading the page if an ajax error occurs, show notification
This commit is contained in:
parent
7f3f06cdd9
commit
40f066ab6d
|
@ -752,7 +752,8 @@ var OC={
|
||||||
// sometimes "beforeunload" happens later, so need to defer the reload a bit
|
// sometimes "beforeunload" happens later, so need to defer the reload a bit
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (!self._userIsNavigatingAway && !self._reloadCalled) {
|
if (!self._userIsNavigatingAway && !self._reloadCalled) {
|
||||||
OC.reload();
|
OC.Notification.show(t('core', 'Problem loading page, reloading in 5 seconds'));
|
||||||
|
setTimeout(OC.reload, 5000);
|
||||||
// only call reload once
|
// only call reload once
|
||||||
self._reloadCalled = true;
|
self._reloadCalled = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue