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:
Ingo Schommer 2012-12-04 14:26:19 +01:00
parent 0eab45392e
commit 0be51a9321

View File

@ -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) {