summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 83658a537b8..b646ff5c6f9 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1311,6 +1311,13 @@ function initCore() {
$('html').addClass('edge');
}
+ $( document ).ajaxError(function( event, request, settings ) {
+ if (_.contains([302, 307, 401], request.status)) {
+ var app = $('#content').attr('class').substring(4);
+ OC.redirect(OC.generateUrl('apps/' + app));
+ }
+ });
+
/**
* Calls the server periodically to ensure that session doesn't
* time out