mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Fix ModelAdmin search (fixes #8052)
Broken by jQuery UI ajax behaviour in tabs, which compares URLs to determine if the tab needs to be loaded via ajax. This was always a brittle solution, and now broke alongside our upgrade to jQuery UI 1.9 (specifically, with 2657a275). The ajax behaviour is now globally disabled in favour of having '.cms-panel-link' behaviour on the tabs, which was already in place.
This commit is contained in:
parent
0eab45392e
commit
0be51a9321
@ -923,14 +923,8 @@ jQuery.noConflict();
|
||||
if(!this.data('uiTabs')) this.tabs({
|
||||
active: (activeTab.index() != -1) ? activeTab.index() : 0,
|
||||
beforeLoad: function(e, ui) {
|
||||
// Overwrite ajax loading to use CMS logic instead
|
||||
var makeAbs = $.path.makeUrlAbsolute,
|
||||
baseUrl = $('base').attr('href'),
|
||||
isSame = (makeAbs(ui.ajaxSettings.url, baseUrl) == makeAbs(document.location.href));
|
||||
|
||||
if(!isSame) $('.cms-container').loadPanel(ui.ajaxSettings.url);
|
||||
$(this).tabs('select', ui.tab.index());
|
||||
|
||||
// Disable automatic ajax loading of tabs without matching DOM elements,
|
||||
// determining if the current URL differs from the tab URL is too error prone.
|
||||
return false;
|
||||
},
|
||||
activate: function(e, ui) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user