summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2010-06-18 15:34:35 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2010-06-18 15:34:35 +0000
commitcb367e28eed815419d29fb73acb2d66c7d3ecb3f (patch)
treebdd823ad2269749cd59d3fb0ae91a1f2cd118c7c /src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js
parent9923b97157725ae1f7853a4834ef5e31283a1b98 (diff)
downloadscala-cb367e28eed815419d29fb73acb2d66c7d3ecb3f.tar.gz
scala-cb367e28eed815419d29fb73acb2d66c7d3ecb3f.tar.bz2
scala-cb367e28eed815419d29fb73acb2d66c7d3ecb3f.zip
[scaladoc] There is a text filter tool for memb...
[scaladoc] There is a text filter tool for members (searching on member name and comment body). Adds button to reset text filter tool. No review. Known limitation: filtering of members is blocking on keystroke leading to sluggish performance on large classes. Scheduler from index needs to be used for member filtering.
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js')
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js8
1 files changed, 7 insertions, 1 deletions
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.