Replaced the obsolete toggle event handling JS function
The toggle(func1, func2) event handling function has been removed in jQuery 1.9.
This commit is contained in:
parent
8bbca211b6
commit
4246fe6006
|
@ -10,15 +10,15 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Add toggle to anchor tag
|
// Add toggle to anchor tag
|
||||||
$("fieldset.collapse a.collapse-toggle").toggle(
|
$("fieldset.collapse a.collapse-toggle").click(function(ev) {
|
||||||
function() { // Show
|
if ($(this).closest("fieldset").hasClass("collapsed")) {
|
||||||
|
// Show
|
||||||
$(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset", [$(this).attr("id")]);
|
$(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset", [$(this).attr("id")]);
|
||||||
return false;
|
} else {
|
||||||
},
|
// Hide
|
||||||
function() { // Hide
|
|
||||||
$(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", [$(this).attr("id")]);
|
$(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", [$(this).attr("id")]);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
);
|
return false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})(django.jQuery);
|
})(django.jQuery);
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
(function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){a(b).find("div.errors").length==0&&a(b).addClass("collapsed").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")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset",[a(this).attr("id")]);return false},function(){a(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset",
|
(function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){0==a(b).find("div.errors").length&&a(b).addClass("collapsed").find("h2").first().append(' (<a id="fieldsetcollapser'+c+'" class="collapse-toggle" href="#">'+gettext("Show")+"</a>)")});a("fieldset.collapse a.collapse-toggle").click(function(){a(this).closest("fieldset").hasClass("collapsed")?a(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset",[a(this).attr("id")]):a(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset",
|
||||||
[a(this).attr("id")]);return false})})})(django.jQuery);
|
[a(this).attr("id")]);return!1})})})(django.jQuery);
|
||||||
|
|
Loading…
Reference in New Issue