summaryrefslogtreecommitdiff
path: root/html/wb/template_wb_tree.html
diff options
context:
space:
mode:
authorscuri <scuri>2008-10-17 06:10:33 +0000
committerscuri <scuri>2008-10-17 06:10:33 +0000
commit7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf (patch)
treed0857278bde2eff784227c57dcaf930346ceb7ac /html/wb/template_wb_tree.html
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'html/wb/template_wb_tree.html')
-rw-r--r--html/wb/template_wb_tree.html220
1 files changed, 220 insertions, 0 deletions
diff --git a/html/wb/template_wb_tree.html b/html/wb/template_wb_tree.html
new file mode 100644
index 0000000..4e45163
--- /dev/null
+++ b/html/wb/template_wb_tree.html
@@ -0,0 +1,220 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
+<html>
+<head>
+ <meta http-equiv="Content-Language" content="en-us" >
+ <title>Tree</title>
+ <base target="wb_cont">
+ <style type="text/css">
+ .tree { font-family: helvetica, sans-serif; font-size: 10pt; }
+ .tree h3 {
+ margin: 5px 0px 0px 0px;
+ font-size: 12pt;
+ }
+ .tree p { margin: 0px; white-space: nowrap; }
+ .tree p.sep { margin: 0px; white-space: nowrap; line-height: 8px; font-size: 5px; }
+ .tree div { display: none; margin: 0px; }
+ .tree img { vertical-align: middle; }
+ .tree a.el { text-decoration: none; margin-left: 4px; color: #003366; }
+ .tree a:hover { text-decoration: none; background-color: #e0e0ff }
+ </style>
+ <script type="text/javascript">
+ lastLink = null;
+
+ function hideFolder(folder, id)
+ {
+ var imageNode = document.images["img" + id];
+ if (imageNode != null)
+ {
+ var len = imageNode.src.length;
+ if (imageNode.src.substring(len-8,len-4) == "last")
+ imageNode.src = "wb_img/plusnodelast.png";
+ else if (imageNode.src.substring(len-8,len-4) == "node")
+ imageNode.src = "wb_img/plusnode.png";
+ }
+ folder.style.display = "none";
+ }
+
+ function showFolder(folder, id)
+ {
+ var imageNode = document.images["img" + id];
+ if (imageNode != null)
+ {
+ var len = imageNode.src.length;
+ if (imageNode.src.substring(len-8,len-4) == "last")
+ imageNode.src = "wb_img/minusnodelast.png";
+ else if (imageNode.src.substring(len-8,len-4) == "node")
+ imageNode.src = "wb_img/minusnode.png";
+ }
+ folder.style.display = "block";
+ }
+
+ function toggleFolder(id)
+ {
+ var folder = document.getElementById(id);
+ if (folder.style.display == "block")
+ hideFolder(folder, id);
+ else
+ showFolder(folder, id);
+ }
+
+ function setFoldersAtLevel(level, show)
+ {
+ var i = 1;
+ do
+ {
+ var folder_id = level + "." + i;
+ var id = "folder" + folder_id;
+ var folder = document.getElementById(id);
+ if (folder != null)
+ {
+ setFoldersAtLevel(folder_id, show);
+
+ if (show)
+ showFolder(folder, id);
+ else
+ hideFolder(folder, id);
+ }
+ i++;
+ } while(folder != null);
+ }
+
+ function showAllFolders()
+ {
+ setFoldersAtLevel("", true);
+ }
+
+ function hideAllFolders()
+ {
+ setFoldersAtLevel("", false);
+ }
+
+ function getFolderId(name)
+ {
+ return name.substring(name.indexOf("folder"), name.length);
+ }
+
+ function showFolderRec(id)
+ {
+ var folder = document.getElementById(id);
+ if (folder != null)
+ {
+ showFolder(folder, id);
+
+ var parent_id = id.substring(0, id.lastIndexOf("."))
+ if (parent_id != null && parent_id != "folder")
+ {
+ showFolderRec(parent_id)
+ }
+ }
+ }
+
+ function clearLastLink()
+ {
+ if (lastLink != null)
+ {
+ lastLink.style.color = ""
+ lastLink = null;
+ }
+ }
+
+ function goToLink(link)
+ {
+ var id = getFolderId(link.name);
+ showFolderRec(id);
+ location.hash = "#" + link.name;
+ link.style.color = "#ff0000";
+
+ clearLastLink();
+ lastLink = link;
+ }
+
+ function syncContents()
+ {
+ var cur_topic = parent.wb_cont.location.href
+
+ for (var i = 0; i < document.links.length; i++)
+ {
+ var link = document.links[i];
+ if (cur_topic == link.href)
+ {
+ goToLink(link)
+ return
+ }
+ }
+ }
+
+ function nextContents()
+ {
+ var cur_topic = parent.wb_cont.location.href
+
+ for (var i = 0; i < document.links.length; i++)
+ {
+ var link = document.links[i];
+ if (cur_topic == link.href)
+ {
+ if (i == document.links.length-1)
+ link = document.links[0];
+ else
+ link = document.links[i+1];
+
+ goToLink(link)
+ parent.wb_cont.location.href = link.href;
+ return
+ }
+ }
+ }
+
+ function prevContents()
+ {
+ var cur_topic = parent.wb_cont.location.href
+ var prev_link = document.links[document.links.length-1]
+
+ for (var i = 0; i < document.links.length; i++)
+ {
+ var link = document.links[i];
+ if (cur_topic == link.href)
+ {
+ if (i == 0)
+ link = document.links[document.links.length-1];
+ else
+ link = document.links[i-1];
+
+ goToLink(link)
+ parent.wb_cont.location.href = link.href;
+ return
+ }
+ }
+ }
+
+ function showStartPage()
+ {
+ var full_url = parent.document.URL;
+ if (full_url == null)
+ return;
+
+ var param = full_url.substring(full_url.indexOf("?") + 1, full_url.length);
+ if (param == null)
+ return;
+
+ var param_url = param.substring(param.indexOf("url=") + 4, param.length);
+ if (param_url == null)
+ return;
+
+ var param_len = param_url.length;
+ for (var i = 0; i < document.links.length; i++)
+ {
+ var link = document.links[i];
+ var link_url = link.href.substring(link.href.length-param_len, link.href.length)
+ if (link_url == param_url)
+ {
+ goToLink(link)
+ parent.wb_cont.location.href = link.href;
+ return
+ }
+ }
+ }
+ </script>
+</head>
+
+<body style="margin: 2px; background-color: #F1F1F1" onload="showStartPage()">
+ <div class="tree" onmouseout="clearLastLink()">