Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 2657a27).

The ajax behaviour is now globally disabled in favour of
having '.cms-panel-link' behaviour on the tabs, which
was already in place.
  • Loading branch information...
commit 0be51a93213f9ef17446e20299e5d15ce0a50cbe 1 parent 0eab453
@chillu chillu authored
Showing with 2 additions and 8 deletions.
  1. +2 −8 admin/javascript/LeftAndMain.js
View
10 admin/javascript/LeftAndMain.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.