]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #24717 - liigo:add-back-toggle-links, r=alexcrichton
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 24 Apr 2015 04:14:17 +0000 (09:44 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Fri, 24 Apr 2015 13:51:14 +0000 (19:21 +0530)
r? @alexcrichton (since you added `.stability` warning messages)

src/librustdoc/html/static/main.js

index 9e00a64d3f5a63ce88928851dcffffcbf36b10d1..56cea50a502399cae7e4279f07eff6d2852b3c3f 100644 (file)
     $(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'});
             .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 =