summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/page/Template.scala1
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.pngbin3519 -> 481 bytes
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.psdbin31923 -> 30823 bytes
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.pngbin2977 -> 533 bytes
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.psdbin28574 -> 31295 bytes
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/index.css37
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js8
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css40
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js25
9 files changed, 94 insertions, 17 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 d49ce07e43..938ac511b6 100644
--- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala
@@ -59,6 +59,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
<div id="template">
<div id="mbrsel">
+ <div id='textfilter'><span class='pre'/><input type='text' accesskey='/'/><span class='post'/></div>
{ if (tpl.linearization.isEmpty) NodeSeq.Empty else
<div id="order">
<span class="filtertype">Ordering</span>
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.png b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.png
index f4cca45dc0..4127dbf3c2 100644
--- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.png
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.png
Binary files differ
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.psd b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.psd
index 9fb3991b14..4d740f3b17 100644
--- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.psd
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_left.psd
Binary files differ
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.png b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.png
index 1fda869beb..942736e44d 100644
--- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.png
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.png
Binary files differ
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.psd b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.psd
index 860833d2b5..63a1ae8349 100644
--- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.psd
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/filter_box_right.psd
Binary files differ
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 fc3f6d4c29..0d30662da6 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
@@ -47,30 +47,39 @@ h1 {
#textfilter {
position: relative;
display: block;
+ height: 20px;
+ margin-bottom: 5px;
}
-#textfilter:before {
+#textfilter > .pre {
display: block;
- content: url("filter_box_left.png");
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 20px;
+ width: 20px;
+ background: url("filter_box_left.png");
}
-#textfilter:after {
+#textfilter > .post {
display: block;
- position: absolute;
- top: 0;
- right: 0;
- content: url("filter_box_right.png");
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 20px;
+ width: 20px;
+ background: url("filter_box_right.png");
}
#textfilter input {
display: block;
- position: absolute;
- top: 0;
- left: 32px;
- right: 16px;
- height: 22px;
- width: 232px;
- padding: 5px;
+ position: absolute;
+ top: 0;
+ right: 20px;
+ left: 20px;
+ height: 16px;
+ width: 246px;
+ padding: 2px;
font-weight: bold;
color: #993300;
background-color: white;
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 e7cf484fa2..4d361a5c5a 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
@@ -95,7 +95,7 @@ function prepareEntityList() {
/* Configures the text filter */
function configureTextFilter() {
scheduler.add("init", function() {
- $("#filter").append("<div id='textfilter'><input type='text' accesskey='/'/></div>");
+ $("#filter").append("<div id='textfilter'><span class='pre'/><input type='text' accesskey='/'/><span class='post'/></div>");
var input = $("#textfilter > input");
resizeFilterBlock();
input.bind("keyup", function(event) {
@@ -106,6 +106,12 @@ function configureTextFilter() {
});
input.focus(function(event) { input.select(); });
});
+ scheduler.add("init", function() {
+ $("#textfilter > .post").click(function(){
+ $("#textfilter > input").attr("value", "");
+ textFilter();
+ });
+ });
}
// Filters all focused templates and packages. This function should be made less-blocking.
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 ccbb14ba8f..25ae8f9478 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
@@ -376,6 +376,46 @@ div.fullcomment dl.paramcmts > dd + dt + dd {
/* Members filter tool */
+#textfilter {
+ position: relative;
+ display: block;
+ height: 20px;
+ margin-bottom: 5px;
+}
+
+#textfilter > .pre {
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 20px;
+ width: 20px;
+ background: url("filter_box_left.png");
+}
+
+#textfilter > .post {
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ height: 20px;
+ width: 20px;
+ background: url("filter_box_right.png");
+}
+
+#textfilter input {
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 20px;
+ left: 20px;
+ height: 16px;
+ padding: 2px;
+ font-weight: bold;
+ color: #993300;
+ background-color: white;
+}
+
#mbrsel {
padding: 4px;
background-color: #B78E99; /* grayish pink */
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 5e24f3f5a8..034ad666c0 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
@@ -9,6 +9,20 @@ $(document).ready(function(){
prefilters.removeClass("in");
prefilters.addClass("out");
filter();
+
+ var input = $("#textfilter > input");
+ input.bind("keyup", function(event) {
+ if (event.keyCode == 27) { // escape
+ input.attr("value", "");
+ }
+ filter();
+ });
+ input.focus(function(event) { input.select(); });
+ $("#textfilter > .post").click(function(){
+ $("#textfilter > input").attr("value", "");
+ filter();
+ });
+
$("#ancestors > ol > li").click(function(){
if ($(this).hasClass("in")) {
$(this).removeClass("in");
@@ -174,6 +188,8 @@ function initInherit() {
};
function filter() {
+ var query = $("#textfilter > input").attr("value").toLowerCase();
+ var queryRegExp = new RegExp(query, "i");
var inheritHides = null
if ($("#order > ol > li.inherit").hasClass("in")) {
inheritHides = $("#linearization > li:gt(0)");
@@ -201,11 +217,16 @@ function filter() {
};
};
};
- var showByVis = true
+ var showByVis = true;
if (vis1 == "prt") {
showByVis = prtVisbl;
};
- if (showByOwned && showByVis) {
+ var showByName = true;
+ if (query != "") {
+ var content = $(this).attr("name") + $("> .fullcomment .cmt", this).text();
+ showByName = queryRegExp.test(content);
+ };
+ if (showByOwned && showByVis && showByName) {
$(this).show();
}
else {