1 line
551 B
JavaScript
1 line
551 B
JavaScript
|
(function(a){a(document).ready(function(){a("fieldset.collapse").each(function(b,c){if(a(c).find("div.errors").length==0){a(c).addClass("collapsed");a(c).find("h2").first().append(' (<a id="fieldsetcollapser'+b+'" 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");return false})})})(jQuery);
|