Support for X-Reload header

Backported from 3.1. Required to get subsite's
"copy page to subsite" form submission working.
This commit is contained in:
Ingo Schommer 2013-01-03 20:43:25 +01:00
parent f431b35b88
commit d872202ae5

View File

@ -370,6 +370,12 @@ jQuery.noConflict();
handleAjaxResponse: function(data, status, xhr) {
var self = this, url, activeTabs, guessFragment;
// Support a full reload
if(xhr.getResponseHeader('X-Reload') && xhr.getResponseHeader('X-ControllerURL')) {
document.location.href = xhr.getResponseHeader('X-ControllerURL');
return;
}
// Pseudo-redirects via X-ControllerURL might return empty data, in which
// case we'll ignore the response
if(!data) return;