rustdoc: add back [-]/[+] toggle links for unstable-methods
This commit is contained in:
parent
6b29a7d564
commit
76a590d0ef
1 changed files with 7 additions and 3 deletions
|
@ -823,6 +823,9 @@
|
|||
$(document).on("click", ".collapse-toggle", function() {
|
||||
var toggle = $(this);
|
||||
var relatedDoc = toggle.parent().next();
|
||||
if (relatedDoc.is(".stability")) {
|
||||
relatedDoc = relatedDoc.next();
|
||||
}
|
||||
if (relatedDoc.is(".docblock")) {
|
||||
if (relatedDoc.is(":visible")) {
|
||||
relatedDoc.slideUp({duration:'fast', easing:'linear'});
|
||||
|
@ -843,9 +846,10 @@
|
|||
.html("[<span class='inner'>-</span>]");
|
||||
|
||||
$(".method").each(function() {
|
||||
if ($(this).next().is(".docblock")) {
|
||||
$(this).children().first().after(toggle.clone());
|
||||
}
|
||||
if ($(this).next().is(".docblock") ||
|
||||
($(this).next().is(".stability") && $(this).next().next().is(".docblock"))) {
|
||||
$(this).children().first().after(toggle.clone());
|
||||
}
|
||||
});
|
||||
|
||||
var mainToggle =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue