summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2010-02-12 15:53:39 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2010-02-12 15:53:39 +0000
commit7a8973d40a51bc6917e1eb248600097dda03e0d2 (patch)
tree78f4e100020bc96863cea5dca4f831d2bb800945
parentbbeecf2b7811971371a1312a376f66a95d4db2ba (diff)
downloadscala-7a8973d40a51bc6917e1eb248600097dda03e0d2.tar.gz
scala-7a8973d40a51bc6917e1eb248600097dda03e0d2.tar.bz2
scala-7a8973d40a51bc6917e1eb248600097dda03e0d2.zip
[scaladoc] Fixes for IE 8 compatibility.
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/page/Index.scala8
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/page/Template.scala8
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js9
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js11
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css15
5 files changed, 31 insertions, 20 deletions
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 135696a869..cdc040c15d 100644
--- a/src/compiler/scala/tools/nsc/doc/html/page/Index.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/page/Index.scala
@@ -21,11 +21,9 @@ class Index(modelRoot: Package) extends HtmlPage {
def headers =
<xml:group>
- <style type="text/css">
- @import url({ relativeLinkTo(List("index.css", "lib")) }) screen;
- </style>
- <script type="text/javascript" src={ relativeLinkTo{List("index.js", "lib")} }></script>
- <script type="text/javascript" src={ relativeLinkTo{List("scheduler.js", "lib")} }></script>
+ <link href={ relativeLinkTo(List("index.css", "lib")) } media="screen" type="text/css" rel="stylesheet"/>
+ <script type="text/javascript" src={ relativeLinkTo{List("index.js", "lib")} }></script>
+ <script type="text/javascript" src={ relativeLinkTo{List("scheduler.js", "lib")} }></script>
</xml:group>
def 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 f920cfb52d..5fb4e499b6 100644
--- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
@@ -22,11 +22,9 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
val headers =
<xml:group>
- <style type="text/css">
- @import url({ relativeLinkTo(List("template.css", "lib")) }) screen;
- </style>
- <script type="text/javascript" src={ relativeLinkTo{List("template.js", "lib")} }></script>
- <script type="text/javascript" src={ relativeLinkTo{List("tools.tooltip.js", "lib")} }></script>
+ <link href={ relativeLinkTo(List("template.css", "lib")) } media="screen" type="text/css" rel="stylesheet"/>
+ <script type="text/javascript" src={ relativeLinkTo{List("template.js", "lib")} }></script>
+ <script type="text/javascript" src={ relativeLinkTo{List("tools.tooltip.js", "lib")} }></script>
</xml:group>
val valueMembers =
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js b/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js
index 09e298e98a..1ae4a7d708 100644
--- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js
@@ -9,6 +9,15 @@ var domCache = undefined;
$(document).ready(function() {
+ // workaround for IE's iframe sizing lack of smartness
+ if($.browser.msie) {
+ function fixIFrame() {
+ $('iframe').height($(window).height() )
+ }
+ $('iframe').bind("load",fixIFrame)
+ $('iframe').bind("resize",fixIFrame)
+ }
+
scheduler = new Scheduler();
scheduler.addLabel("init", 5);
scheduler.addLabel("focus", 7);
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js b/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
index 51d8ae8cc3..4417f5b438 100644
--- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
@@ -11,6 +11,11 @@ function Scheduler() {
this.name = name;
this.priority = priority;
}
+ this.work = function(fn, self, args) {
+ this.fn = fn;
+ this.self = self;
+ this.args = args;
+ }
this.addLabel = function(name, priority) {
var idx = 0;
while (idx < scheduler.queues.length && scheduler.labels[idx].priority <= priority) { idx = idx + 1; }
@@ -39,8 +44,8 @@ function Scheduler() {
scheduler.timeout = setTimeout(function() {
var work = scheduler.nextWork();
if (work != undefined) {
- //alert(work[0]);
- work[0].apply(work[1], work[2]);
+ if (work.args == undefined) { work.args = new Array(0); }
+ work.fn.apply(work.self, work.args);
doWork();
}
else {
@@ -51,7 +56,7 @@ function Scheduler() {
var idx = 0;
while (idx < scheduler.labels.length && scheduler.labels[idx].name != labelName) { idx = idx + 1; }
if (idx < scheduler.queues.length && scheduler.labels[idx].name == labelName) {
- scheduler.queues[idx].push([fn, self, args]);
+ scheduler.queues[idx].push(new scheduler.work(fn, self, args));
if (scheduler.timeout == undefined) doWork();
}
else throw("queue for add is non existant");
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 9c64e25806..5114ebe957 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
@@ -92,6 +92,7 @@ a:hover {
div.members > ol {
background-color: white;
+ list-style: none
}
div.members > ol > li {
@@ -121,12 +122,13 @@ div.members > ol > li {
.signature .kind {
text-align: right;
float: left;
- width: 72px;
+ display: inline;
+ padding-left: 72px;
}
.signature .symbol {
- display: block;
- margin-left: 80px;
+ display: inline;
+ padding-left: 8px;
}
.signature .name {
@@ -257,19 +259,18 @@ div.fullcomment dl.paramcmts > dd + dt + dd {
#mbrsel > div > h3 {
padding: 4px;
- display: block;
- float: left;
+ display: inline;
}
#mbrsel > div > ol {
- display: inline-block;
+ display: inline;
}
#mbrsel > div > ol > li {
padding: 4px 8px 4px 8px;
font-weight: bold;
background-color: white;
- display: inline-block;
+ display: inline;
cursor: crosshair;
}