From fa8f997a2d0c3bef85c2b2aa6de59f8e1be29650 Mon Sep 17 00:00:00 2001 From: Pedro Furlanetto Date: Wed, 20 Apr 2011 03:03:51 +0000 Subject: 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. --- .../scala/tools/nsc/doc/html/page/Index.scala | 2 +- .../tools/nsc/doc/html/resource/lib/index.css | 51 ++++++++++++---------- .../scala/tools/nsc/doc/html/resource/lib/index.js | 13 +++--- 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 = { { if (!pack.isRootPackage) -

{ pack.qualifiedName }

+ { pack.qualifiedName } else NodeSeq.Empty }
    { 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 [ '
  1. ', 'focushide', - '

    ', '', pack, - '

  2. ' + '' ].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); -- cgit v1.2.3