v1.18.x
Julian Lam 10 years ago
parent f1f199019d
commit 40763d2ae7

@ -23,9 +23,8 @@ $(document).ready(function() {
ajaxify.currentPage = null; ajaxify.currentPage = null;
ajaxify.go = function (url, callback, quiet) { ajaxify.go = function (url, callback, quiet) {
// If ajaxifying into an admin route from regular site, do a cold load. if (ajaxify.handleACPRedirect(url)) {
if (url.indexOf('admin') === 0 && window.location.pathname.indexOf('/admin') !== 0) { return;
return window.open(RELATIVE_PATH + '/' + url, '_blank');
} }
app.enterRoom(''); app.enterRoom('');
@ -62,6 +61,14 @@ $(document).ready(function() {
return true; return true;
}; };
ajaxify.handleACPRedirect = function(url) {
// If ajaxifying into an admin route from regular site, do a cold load.
url = ajaxify.removeRelativePath(url.replace(/\/$/, ''));
if (url.indexOf('admin') === 0 && window.location.pathname.indexOf('/admin') !== 0) {
return window.open(RELATIVE_PATH + '/' + url, '_blank');
}
}
ajaxify.start = function(url, quiet, search) { ajaxify.start = function(url, quiet, search) {
url = ajaxify.removeRelativePath(url.replace(/\/$/, '')); url = ajaxify.removeRelativePath(url.replace(/\/$/, ''));
var hash = window.location.hash; var hash = window.location.hash;

Loading…
Cancel
Save