diff options
author | Donna Malayeri <lindydonna@gmail.com> | 2010-07-20 16:13:28 +0000 |
---|---|---|
committer | Donna Malayeri <lindydonna@gmail.com> | 2010-07-20 16:13:28 +0000 |
commit | 60d56501a02ba40d754f02ea78299be865c9a57e (patch) | |
tree | 4f6417ecb57ec8e3278de4e015ca8918915f1fed | |
parent | 30896b2f45f6e700e8ef332c3fe3ec62253cc731 (diff) | |
download | scala-60d56501a02ba40d754f02ea78299be865c9a57e.tar.gz scala-60d56501a02ba40d754f02ea78299be865c9a57e.tar.bz2 scala-60d56501a02ba40d754f02ea78299be865c9a57e.zip |
[scaladoc] Modify build script to copy html res...
[scaladoc] Modify build script to copy html resources to output
directory; display template in a frame rather than an iframe; change
title of main page when new frame is loaded. Review by dubochet.
8 files changed, 27 insertions, 97 deletions
@@ -367,6 +367,7 @@ LOCAL REFERENCE BUILD (LOCKER) <include name="**/*.tmpl"/> <include name="**/*.xml"/> <include name="**/*.js"/> + <include name="**/*.html"/> <include name="**/*.css"/> <include name="**/*.properties"/> <include name="**/*.swf"/> @@ -601,6 +602,7 @@ QUICK BUILD (QUICK) <include name="**/*.xml"/> <include name="**/*.js"/> <include name="**/*.css"/> + <include name="**/*.html"/> <include name="**/*.properties"/> <include name="**/*.swf"/> <include name="**/*.png"/> diff --git a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala index 94b1f38b65..0aff736f47 100644 --- a/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala @@ -40,6 +40,7 @@ class HtmlFactory(val universe: Universe) { finally out.close() } + copyResource("index.html") copyResource("lib/jquery.js") copyResource("lib/tools.tooltip.js") copyResource("lib/scheduler.js") diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Index.scala b/src/compiler/scala/tools/nsc/doc/html/page/Index.scala index 8675058c24..bf531402ce 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Index.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Index.scala @@ -15,7 +15,7 @@ import scala.xml._ class Index(universe: Universe) extends HtmlPage { - def path = List("index.html") + def path = List("allclasses.html") def title = { val s = universe.settings @@ -111,9 +111,6 @@ class Index(universe: Universe) extends HtmlPage { packageElem(universe.rootPackage) }</div> </div> - <div id="content"> - <iframe name="template" src={ relativeLinkTo{List("package.html")} }/> - </div> </body> 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 1e35a10e1d..1da65c16b5 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -18,7 +18,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { val path = templateToPath(tpl) - val title = "Scaladoc for " + tpl.qualifiedName + val title = tpl.name + " (Scaladoc for " + tpl.qualifiedName + ")" val headers = <xml:group> @@ -40,7 +40,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { }) sortBy (_.name) val body = - <body class={ if (tpl.isTrait || tpl.isClass) "type" else "value" }> + <body class={ if (tpl.isTrait || tpl.isClass) "type" else "value" } onload="windowTitle();"> { if (tpl.isRootPackage || tpl.inTemplate.isRootPackage) NodeSeq.Empty diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/index.html b/src/compiler/scala/tools/nsc/doc/html/resource/index.html index 95fae3176e..c5010b2ecd 100644 --- a/src/compiler/scala/tools/nsc/doc/html/resource/index.html +++ b/src/compiler/scala/tools/nsc/doc/html/resource/index.html @@ -1,88 +1,12 @@ <!DOCTYPE HTML> -<html> - <head> - <title>Scaladoc</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <script type="text/javascript" src="lib/jquery.js"></script> - <style type="text/css"> - @import url("lib/index.css") screen; - </style> - <script type="text/javascript" src="lib/index.js"></script> - </head> - <body> - <h1>Documentation</h1> - <div id="browser"> - <input id="quickflt" type="text" accesskey="/"/> - <div id="tpl"> - <ol class="packages"> - <li> - <h3><a href="scala/collection/package.html">scala.collection</a></h3> - <ol class="templates"> - <li title="scala.collection.BitSet"> - <a href="scala/collection/BitSet$.html"> - <span>(object)</span> - </a> - <a href="scala/collection/BitSet.html"> - <span>(class)</span> - <span>BitSet</span> - </a> - </li> - <li title="scala.collection.BufferedIterator"> - <a href="scala/collection/BufferedIterator.html"> - <span>(trait)</span> - <span>BufferedIterator</span> - </a> - </li> - <li title="scala.collection.DefaultMap"> - <a href="scala/collection/DefaultMap$.html"> - <span>(object)</span> - <span>DefaultMap</span> - </a> - </li> - <li title="scala.collection.Iterable"> - <a href="scala/collection/Iterable.html">Iterable <span class="class">(class)</span></a> - <a href="scala/collection/Iterable$.html"><span class="object">(object)</span></a> - </li> - </ol> - <ol class="packages"> - <li> - <h3><a class="tplshow">scala.collection.mutable</a></h3> - <ol class="templates"> - <li title="scala.collection.mutable.DefaultMap"> - <a href="scala/collection/DefaultMap$.html">DefaultMap <span class="class">(object)</span></a> - </li> - <li title="scala.collection.mutable.Iterable"> - <a href="scala/collection/Iterable.html">Iterable <span class="class">(class)</span></a> - <a href="scala/collection/Iterable$.html"><span class="object">(object)</span></a> - </li> - <li title="scala.collection.mutable.Iterable"> - <a href="scala/collection/Iterable.html">Iterable <span class="class">(class)</span></a> - <a href="scala/collection/Iterable$.html"><span class="object">(object)</span></a> - </li> - <li title="scala.collection.mutable.Truc"> - <a href="scala/collection/Truc.html">Truc <span class="class">(class)</span></a> - </li> - </ol> - </li> - <li> - <h3><a class="tplshow">scala.collection.immutable</a></h3> - <ol class="templates"> - <li class="template" title="scala.collection.DefaultMap"> - <a href="scala/collection/DefaultMap$.html">DefaultMap <span class="class">(object)</span></a> - </li> - <li class="template" title="scala.collection.Iterable"> - <a href="scala/collection/Iterable.html">Iterable <span class="class">(class)</span></a> - <a href="scala/collection/Iterable$.html"><span class="object">(object)</span></a> - </li> - </ol> - </li> - </ol> - </li> - </ol> - </div> - </div> - <div id="content"> - <iframe src="template.html"></iframe> - </div> - </body> -</html> +<HTML> +<HEAD> + +<frameset cols="20%,80%" title="" onLoad="top.loadFrames()"> +<frame src="allclasses.html" name="packageFrame" title="All packages and classes" scrolling="no"> +<frame src="package.html" name="template" scrolling="yes"> +Test +</frameset> + +</HEAD> +</HTML> diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.css b/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.css index 0d30662da6..77d9cdf8e6 100644 --- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.css +++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.css @@ -28,7 +28,7 @@ h1 { top: 0px; left: 0px; bottom: 0px; - width: 300px; + width: 100%; display: block; position: fixed; } @@ -37,7 +37,7 @@ h1 { position: fixed; display: block; padding: 5px; - width: 290px; + width: 95%; right: 0; left: 0; top: 0; @@ -78,7 +78,7 @@ h1 { right: 20px; left: 20px; height: 16px; - width: 246px; + width: 90%; padding: 2px; font-weight: bold; color: #993300; 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 8cfd9e9ce1..48276d40b8 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 @@ -111,7 +111,8 @@ a:hover { #template > div.parent > h3 { color: white; padding: 4px; - background-color: #385E1A; + margin-top: 10px; + background-color: #47166D; font-size: 12pt; font-weight: bold; } 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 506edd7746..6aacfb1390 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 @@ -256,3 +256,8 @@ function filter() { }); return false }; + +function windowTitle() +{ + parent.document.title=document.title; +}; |