diff --git a/django/contrib/admin/static/admin/js/SelectFilter2.js b/django/contrib/admin/static/admin/js/SelectFilter2.js
index 2eb67e8..b68b4c3 100644
a
|
b
|
window.SelectFilter = {
|
99 | 99 | |
100 | 100 | if (!is_stacked) { |
101 | 101 | // In horizontal mode, give the same height to the two boxes. |
102 | | $(to_box).height($(filter_p).outerHeight() + $(from_box).outerHeight()); |
| 102 | if ($(from_box).outerHeight() > 0) { |
| 103 | // this fieldset is already open, resize now |
| 104 | $(to_box).height($(filter_p).outerHeight() + $(from_box).outerHeight()); |
| 105 | } else { |
| 106 | // this fieldset is probably collapsed (not safe to resize); wait for its 'show' event |
| 107 | $(to_box).closest('fieldset').bind('show.fieldset', function( event, fieldsetID ) { |
| 108 | $(to_box).height($(filter_p).outerHeight() + $(from_box).outerHeight()); |
| 109 | $(this).unbind(event); // unbinds ONLY this handler (no need to resize repeatedly) |
| 110 | }); |
| 111 | } |
103 | 112 | } |
104 | 113 | |
105 | 114 | // Initial icon refresh |
diff --git a/django/contrib/admin/static/admin/js/collapse.js b/django/contrib/admin/static/admin/js/collapse.js
index 0a1e2d8..b4a882f 100644
a
|
b
|
|
15 | 15 | function() { // Show |
16 | 16 | $(this).text(gettext("Hide")); |
17 | 17 | $(this).closest("fieldset").removeClass("collapsed"); |
| 18 | $(this).closest("fieldset").trigger("show.fieldset",[$(this).attr("id")]); |
18 | 19 | return false; |
19 | 20 | }, |
20 | 21 | function() { // Hide |
21 | 22 | $(this).text(gettext("Show")); |
22 | 23 | $(this).closest("fieldset").addClass("collapsed"); |
| 24 | $(this).closest("fieldset").trigger("hide.fieldset",[$(this).attr("id")]); |
23 | 25 | return false; |
24 | 26 | } |
25 | 27 | ); |
diff --git a/django/contrib/admin/static/admin/js/collapse.min.js b/django/contrib/admin/static/admin/js/collapse.min.js
index 428984e..5f5dafa 100644
a
|
b
|
|
1 | | (function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){if(a(b).find("div.errors").length==0){a(b).addClass("collapsed");a(b).find("h2").first().append(' (<a id="fieldsetcollapser'+c+'" class="collapse-toggle" href="#">'+gettext("Show")+"</a>)")}});a("fieldset.collapse a.collapse-toggle").toggle(function(){a(this).text(gettext("Hide"));a(this).closest("fieldset").removeClass("collapsed");return false},function(){a(this).text(gettext("Show"));a(this).closest("fieldset").addClass("collapsed"); |
2 | | return false})})})(django.jQuery); |
| 1 | (function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){a(b).find("div.errors").length==0&&(a(b).addClass("collapsed"),a(b).find("h2").first().append(' (<a id="fieldsetcollapser'+c+'" class="collapse-toggle" href="#">'+gettext("Show")+"</a>)"))});a("fieldset.collapse a.collapse-toggle").toggle(function(){a(this).text(gettext("Hide"));a(this).closest("fieldset").removeClass("collapsed");a(this).closest("fieldset").trigger("show.fieldset",[a(this).attr("id")]);return false}, |
| 2 | function(){a(this).text(gettext("Show"));a(this).closest("fieldset").addClass("collapsed");a(this).closest("fieldset").trigger("hide.fieldset",[a(this).attr("id")]);return false})})})(django.jQuery); |