summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Furlanetto <pedrofurla@gmail.com>2011-04-20 03:03:51 +0000
committerPedro Furlanetto <pedrofurla@gmail.com>2011-04-20 03:03:51 +0000
commitfa8f997a2d0c3bef85c2b2aa6de59f8e1be29650 (patch)
tree293a98cea0ab90e21a3ff635f46a0137c990b6fd
parente6efa7b11f44d2e405d02c563b710023b3ef3e8a (diff)
downloadscala-fa8f997a2d0c3bef85c2b2aa6de59f8e1be29650.tar.gz
scala-fa8f997a2d0c3bef85c2b2aa6de59f8e1be29650.tar.bz2
scala-fa8f997a2d0c3bef85c2b2aa6de59f8e1be29650.zip
Makes entire package area clickable in the left...
Makes entire package area clickable in the left panel. Contributed by Simon Ochsenreither (soc). Closes #4464. Review by malayeri.
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/page/Index.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/index.css51
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js13
3 files changed, 34 insertions, 32 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 32ba06737b..4fc10b2ec2 100644
--- a/src/compiler/scala/tools/nsc/doc/html/page/Index.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/page/Index.scala
@@ -72,7 +72,7 @@ class Index(universe: doc.Universe, index: doc.Index) extends HtmlPage {
def packageElem(pack: model.Package): NodeSeq = {
<xml:group>
{ if (!pack.isRootPackage)
- <h3><a class="tplshow" href={ relativeLinkTo(pack) } target="template">{ pack.qualifiedName }</a></h3>
+ <a class="tplshow" href={ relativeLinkTo(pack) } target="template">{ pack.qualifiedName }</a>
else NodeSeq.Empty
}
<ol class="templates">{
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 df89781d10..e8c7bb961f 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
@@ -226,7 +226,6 @@ h1 {
float: right;
font-weight: normal;
color: white;
- padding: 0 8px;
}
#tpl .packfocus {
@@ -237,27 +236,31 @@ h1 {
}
#tpl .packages > ol {
- background-color: #dadfe6;
- /*margin-bottom: 5px;*/
+ background-color: #dadfe6;
+ /*margin-bottom: 5px;*/
}
/*#tpl .packages > ol > li {
margin-bottom: 1px;
}*/
-#tpl .packages > li > h3 {
+#tpl .packages > li > a {
+ padding: 0px 5px;
+}
+
+#tpl .packages > li > a.tplshow {
display: block;
color: white;
font-weight: bold;
display: block;
- text-shadow: #000000 0 1px 0;
+ text-shadow: #000000 0 1px 0;
}
#tpl ol > li.pack {
padding: 3px 5px;
- background: url("packagesbg.gif");
- background-repeat:repeat-x;
- min-height: 14px;
+ background: url("packagesbg.gif");
+ background-repeat:repeat-x;
+ min-height: 14px;
background-color: #6e808e;
}
@@ -266,24 +269,24 @@ h1 {
}
#tpl .templates > li {
- padding-left: 5px;
- min-height: 18px;
+ padding-left: 5px;
+ min-height: 18px;
}
#tpl ol > li .icon {
- padding-right: 5px;
+ padding-right: 5px;
bottom: -2px;
position: relative;
}
#tpl .templates div.placeholder {
- padding-right: 5px;
- width: 13px;
- display: inline-block;
+ padding-right: 5px;
+ width: 13px;
+ display: inline-block;
}
#tpl .templates span.tplLink {
- padding-left: 5px;
+ padding-left: 5px;
}
#content {
@@ -306,18 +309,18 @@ h1 {
}
.ui-layout-pane {
- background: #FFF;
- overflow: auto;
+ background: #FFF;
+ overflow: auto;
}
.ui-layout-resizer {
- background-image:url('filterbg.gif');
- background-repeat:repeat-x;
- background-color: #ededee; /* light gray */
- border:1px solid #bbbbbb;
- border-top:0;
- border-bottom:0;
- border-left: 0;
+ background-image:url('filterbg.gif');
+ background-repeat:repeat-x;
+ background-color: #ededee; /* light gray */
+ border:1px solid #bbbbbb;
+ border-top:0;
+ border-bottom:0;
+ border-left: 0;
}
.ui-layout-toggler {
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 60dcfcfe4b..0f25f024f4 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
@@ -126,12 +126,11 @@ var Index = {};
return [
'<li class="pack">',
'<a class="packfocus">focus</a><a class="packhide">hide</a>',
- '<h3>',
'<a class="tplshow" target="template" href="',
pack.replace(/\./g, '/'),
'/package.html">',
pack,
- '</a></h3></li>'
+ '</a></li>'
].join('');
};
@@ -195,13 +194,13 @@ var Index = {};
function subPackages(pack) {
return $.grep($('#tpl ol.packages'), function (element, index) {
- var pack = $('h3', element).text();
+ var pack = $('li.pack > .tplshow', element).text();
return pack.indexOf(pack + '.') == 0;
});
}
ns.hidePackage = function (ol) {
- var selected = $('h3', ol).text();
+ var selected = $('li.pack > .tplshow', ol).text();
hiddenPackages[selected] = true;
$('ol.templates', ol).hide();
@@ -212,7 +211,7 @@ var Index = {};
}
ns.showPackage = function (ol, state) {
- var selected = $('h3', ol).text();
+ var selected = $('li.pack > .tplshow', ol).text();
hiddenPackages[selected] = false;
$('ol.templates', ol).show();
@@ -222,7 +221,7 @@ var Index = {};
// When the filter is in "packs" state,
// we don't want to show the `.templates`
- var key = $('h3', element).text();
+ var key = $('li.pack > .tplshow', element).text();
if (hiddenPackages[key] || state == 'packs') {
$('ol.templates', element).hide();
}
@@ -400,7 +399,7 @@ function configureFocusFilter() {
function focusFilter(package) {
scheduler.clear("filter");
- var currentFocus = $('h3', package).text();
+ var currentFocus = $('li.pack > .tplshow', package).text();
$("#focusfilter > .focuscoll").empty();
$("#focusfilter > .focuscoll").append(currentFocus);