mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Adjust the handler to jQuery UI 1.9 API change.
Settings.url no longer contains the URL, as a result navigating around tabs in IE (browsers that do not support History API) becomes broken. For example when the admin is opened on "Pages" section it is impossible to navigate to specific page, or if the admin is opened on a tab, it's not possible to navigate to another tab.
This commit is contained in:
parent
8f89aa9171
commit
2657a27573
@ -922,14 +922,14 @@ jQuery.noConflict();
|
||||
|
||||
if(!this.data('uiTabs')) this.tabs({
|
||||
active: (activeTab.index() != -1) ? activeTab.index() : 0,
|
||||
beforeLoad: function(e, settings) {
|
||||
beforeLoad: function(e, ui) {
|
||||
// Overwrite ajax loading to use CMS logic instead
|
||||
var makeAbs = $.path.makeUrlAbsolute,
|
||||
baseUrl = $('base').attr('href'),
|
||||
isSame = (makeAbs(settings.url, baseUrl) == makeAbs(document.location.href));
|
||||
isSame = (makeAbs(ui.ajaxSettings.url, baseUrl) == makeAbs(document.location.href));
|
||||
|
||||
if(!isSame) $('.cms-container').loadPanel(settings.url);
|
||||
$(this).tabs('select', settings.tab.index());
|
||||
if(!isSame) $('.cms-container').loadPanel(ui.ajaxSettings.url);
|
||||
$(this).tabs('select', ui.tab.index());
|
||||
|
||||
return false;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user