about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-04-24 09:44:17 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-04-24 19:21:14 +0530
commitaf6ec32842dd27f66a5dd18bb1c07dd85fe4fced (patch)
tree433e15a07fe9b68a25f8f18bd74f02ba490ca336
parentf1db259804535076bff7f8fcdb14f782cc4486b4 (diff)
parent76a590d0ef15506ed805a943b3a19ce65651903f (diff)
downloadrust-af6ec32842dd27f66a5dd18bb1c07dd85fe4fced.tar.gz
rust-af6ec32842dd27f66a5dd18bb1c07dd85fe4fced.zip
Rollup merge of #24717 - liigo:add-back-toggle-links, r=alexcrichton
r? @alexcrichton (since you added `.stability` warning messages)
-rw-r--r--src/librustdoc/html/static/main.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 9e00a64d3f5..56cea50a502 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -828,6 +828,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'});
@@ -848,9 +851,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 =