mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
f431b35b88
commit
d872202ae5
@ -370,6 +370,12 @@ jQuery.noConflict();
|
|||||||
handleAjaxResponse: function(data, status, xhr) {
|
handleAjaxResponse: function(data, status, xhr) {
|
||||||
var self = this, url, activeTabs, guessFragment;
|
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
|
// Pseudo-redirects via X-ControllerURL might return empty data, in which
|
||||||
// case we'll ignore the response
|
// case we'll ignore the response
|
||||||
if(!data) return;
|
if(!data) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user