summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2009-11-24 19:27:10 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2009-11-24 19:27:10 +0000
commitd9e3dde6d6d18b9a93e7566447cc3ee342f033d5 (patch)
tree13084c6cd10ca3d673d6eca2af3af8d96a96155f /src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js
parent583e431b07fae9c3fbeb075e40d7729958df6499 (diff)
downloadscala-d9e3dde6d6d18b9a93e7566447cc3ee342f033d5.tar.gz
scala-d9e3dde6d6d18b9a93e7566447cc3ee342f033d5.tar.bz2
scala-d9e3dde6d6d18b9a93e7566447cc3ee342f033d5.zip
Scaladoc 2.
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js')
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js46
1 files changed, 46 insertions, 0 deletions
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
new file mode 100644
index 0000000000..4da8b28882
--- /dev/null
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js
@@ -0,0 +1,46 @@
+$(document).ready(function(){
+ var prefilters = $("#ancestors > ol > li").filter(function(){
+ var name = $(this).attr("name");
+ return name == "scala.Any" || name == "scala.AnyRef";
+ });
+ prefilters.removeClass("in");
+ prefilters.addClass("out");
+ filterInherit();
+ $("#ancestors > ol > li").click(function(event){
+ if ($(this).hasClass("in")) {
+ $(this).removeClass("in");
+ $(this).addClass("out");
+ }
+ else if ($(this).hasClass("out")) {
+ $(this).removeClass("out");
+ $(this).addClass("in");
+ };
+ filterInherit();
+ });
+});
+
+function filterInherit() {
+ $("#mbrsel > div > ol > li.in").each(function(){
+ findMembersByOwner($(this).attr("name")).show();
+ });
+ $("#mbrsel > div > ol > li.out").each(function(){
+ findMembersByOwner($(this).attr("name")).hide();
+ });
+ return false;
+};
+
+function findMembersByOwner(owner0) {
+ return $(".members > ol > li").filter(function(){
+ var qualName1 = $(this).attr("name");
+ if (qualName1 == undefined) return false;
+ return owner0 == qualName1.slice(0, qualName1.indexOf("#"));
+ });
+};
+
+function findMemberByName(name0) {
+ return $(".members > ol > li").filter(function(){
+ var qualName1 = $(this).attr("name");
+ if (qualName1 == undefined) return false;
+ return name0 == qualName1.slice(qualName1.indexOf("#") + 1);
+ }).eq(0);
+}; \ No newline at end of file