diff options
author | Donna Malayeri <lindydonna@gmail.com> | 2011-04-19 14:51:42 +0000 |
---|---|---|
committer | Donna Malayeri <lindydonna@gmail.com> | 2011-04-19 14:51:42 +0000 |
commit | acffc823df789bd0d446f0e3636378b277283e34 (patch) | |
tree | 22180b95485cdf678848b63167bdf7aa179128aa /src/compiler | |
parent | 52fbbcc82470e100d95ac9cdb468060620f1e29e (diff) | |
download | scala-acffc823df789bd0d446f0e3636378b277283e34.tar.gz scala-acffc823df789bd0d446f0e3636378b277283e34.tar.bz2 scala-acffc823df789bd0d446f0e3636378b277283e34.zip |
[scaladoc] CSS tweaks, changes to display of li...
[scaladoc] CSS tweaks, changes to display of linear supertypes/known
subclasses. Closes #4458. No review.
Diffstat (limited to 'src/compiler')
3 files changed, 27 insertions, 73 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala index 58ed4961a5..03e36e6779 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -398,28 +398,22 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { val linearization = mbr match { case dtpl: DocTemplateEntity if isSelf && !isReduced && dtpl.linearizationTemplates.nonEmpty => - <div class="toggleContainer"> - <div class="attributes block"> - <span class="link showElement">Linear Supertypes</span> - <span class="link hideElement">Linear Supertypes</span> - </div> - <div class="superTypes hiddenContent"> - <p>{ typesToHtml(dtpl.linearizationTypes, hasLinks = true, sep = xml.Text(", ")) }</p> - </div> + <div class="toggleContainer block"> + <span class="toggle">Linear Supertypes</span> + <div class="superTypes hiddenContent">{ + typesToHtml(dtpl.linearizationTypes, hasLinks = true, sep = xml.Text(", ")) + }</div> </div> case _ => NodeSeq.Empty } val subclasses = mbr match { case dtpl: DocTemplateEntity if isSelf && !isReduced && dtpl.subClasses.nonEmpty => - <div class="toggleContainer"> - <div class="attributes block"> - <span class="link showElement">Known Subclasses</span> - <span class="link hideElement">Known Subclasses</span> - </div> - <div class="subClasses hiddenContent"> - <p>{ templatesToHtml(dtpl.subClasses.sortBy(_.name), xml.Text(", ")) }</p> - </div> + <div class="toggleContainer block"> + <span class="toggle">Known Subclasses</span> + <div class="subClasses hiddenContent">{ + templatesToHtml(dtpl.subClasses.sortBy(_.name), xml.Text(", ")) + }</div> </div> case _ => NodeSeq.Empty } diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css index 1fb2cbdbc2..52852b91c0 100644 --- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css +++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css @@ -30,7 +30,7 @@ input { border-width: 0px; } /* Page */ body { - font-family: Arial; + font-family: Arial, sans-serif; font-size: 10pt; } @@ -144,34 +144,26 @@ a[href]:hover { } /* Linear super types and known subclasses */ -.hideElement, .hiddenContent { display: none; } -div.superTypes > h1 { - font-style: italic; - padding-top: 0.5em; -} - -.link { - text-decoration: underline; +.toggleContainer .toggle { cursor: pointer; - color: #315479; + padding-left: 15px; + background: url("arrow-right.png") no-repeat 0 3px transparent; +} + +.toggleContainer.open .toggle { + background: url("arrow-down.png") no-repeat 0 3px transparent; } -.toggleContainer p { +.toggleContainer .hiddenContent { margin-top: 5px; } .toggleContainer .showElement { padding-left: 15px; - background: url("arrow-right.png") no-repeat 0 5px transparent; -} - -.toggleContainer .hideElement { - padding-left: 15px; - background: url("arrow-down.png") no-repeat 0 5px transparent; } .value #definition { @@ -214,7 +206,7 @@ dl.attributes > dd { background-color: #315479; /* grayish blue */ background: url("valuemembersbg.gif"); background-repeat:repeat-x; - height: 28px; + height: 18px; } #values ol li:last-child { @@ -225,14 +217,14 @@ dl.attributes > dd { background-color: #316555; /* green */ background: url("typebg.gif"); background-repeat:repeat-x; - height: 28px; + height: 18px; } #constructors > h3 { background-color: #333; background: url("constructorsbg.gif"); background-repeat:repeat-x; - height: 28px; + height: 18px; } #template > div.parent > h3 { @@ -243,7 +235,7 @@ dl.attributes > dd { background: url("constructorsbg.gif"); background-repeat:repeat-x; height: 17px; - margin-top: 10px; +/* margin-top: 10px;*/ /* color: black; text-shadow: white 0px 1px 0px; font-weight: normal;8*/ diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js index e848078aca..14a5613015 100644 --- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js +++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js @@ -42,8 +42,6 @@ $(document).ready(function(){ }; filter(); }); - -/* $("#ancestors > ol > li.hideall").click(function() { $("#linearization li.in").removeClass("in").addClass("out"); $("#linearization li:first").removeClass("out").addClass("in"); @@ -57,32 +55,6 @@ $(document).ready(function(){ filtered.removeClass("out").addClass("in"); filter(); }); -*/ - - - $("#ancestors > ol > li.hideall").click(function() { - if ($(this).hasClass("out")) { - $(this).removeClass("out").addClass("in"); - $("#ancestors > ol > li.showall").removeClass("in").addClass("out"); - $("#linearization li.in").removeClass("in").addClass("out"); - $("#linearization li:first").removeClass("out").addClass("in"); - filter(); - }; - }) - $("#ancestors > ol > li.showall").click(function() { - if($(this).hasClass("out")){ - $(this).removeClass("out").addClass("in"); - $("#ancestors > ol > li.hideall").removeClass("in").addClass("out"); - var filtered = - $("#linearization li.out").filter(function() { - return ! isHiddenClass($(this).attr("name")); - }); - filtered.removeClass("out").addClass("in"); - filter(); - }; - }); - - $("#visbl > ol > li.public").click(function() { if ($(this).hasClass("out")) { $(this).removeClass("out").addClass("in"); @@ -140,16 +112,12 @@ $(document).ready(function(){ var vis = $(":visible", fullComment); signature.toggleClass("closed").toggleClass("opened"); if (vis.length > 0) { - shortComment.slideDown(50); - fullComment.slideUp(50); - signature.addClass("closed"); - signature.removeClass("opened"); + shortComment.slideDown(100); + fullComment.slideUp(100); } else { - shortComment.slideUp(50); - fullComment.slideDown(50); - signature.removeClass("closed"); - signature.addClass("opened"); + shortComment.slideUp(100); + fullComment.slideDown(100); } }; docAllSigs.addClass("closed"); |