summaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-01-09 23:26:42 +0000
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2007-01-09 23:26:42 +0000
commit22a7d78d3853015d07620908691c897535dbea8f (patch)
treedb53b39c863327288e3ff9def594fc53c0f4c3c6 /javascript
parentf55b1509a9d0e766bfbebd280abc8ab8afd6ff39 (diff)
downloadvdr-plugin-live-22a7d78d3853015d07620908691c897535dbea8f.tar.gz
vdr-plugin-live-22a7d78d3853015d07620908691c897535dbea8f.tar.bz2
layout with with for the date and time of recordings entries.
Diffstat (limited to 'javascript')
-rw-r--r--javascript/treeview.js25
1 files changed, 21 insertions, 4 deletions
diff --git a/javascript/treeview.js b/javascript/treeview.js
index 7adbc5b..3f6fea9 100644
--- a/javascript/treeview.js
+++ b/javascript/treeview.js
@@ -17,10 +17,24 @@ function findSibling(node, name)
return null;
}
+function findChildNode(node, className)
+{
+ for (idx = 0; idx < node.childNodes.length; idx++) {
+ n = node.childNodes.item(idx);
+ if (n.nodeType == Node.ELEMENT_NODE) {
+ attr = n.getAttributeNode("class");
+ if ((attr != null) && (attr.nodeValue == className)) {
+ return n;
+ }
+ }
+ }
+ return null;
+}
+
function findImageNode(node, className)
{
- for (var idx = 0; idx < node.childNodes.length; idx++) {
- var n = node.childNodes.item(idx);
+ for (idx = 0; idx < node.childNodes.length; idx++) {
+ n = node.childNodes.item(idx);
if ((n.nodeType == Node.ELEMENT_NODE) && (n.nodeName == "IMG")) {
attr = n.getAttributeNode("class");
if ((attr != null) && (attr.nodeValue == className)) {
@@ -52,15 +66,18 @@ function Toggle(node)
if (sibling == null)
return;
+ imgChild = findChildNode(node, "recording_imgs");
if (sibling.style.display == 'none')
{
- setImages(node, "minus.png", "folder_open.png");
+ if (imgChild != null)
+ setImages(imgChild, "minus.png", "folder_open.png");
sibling.style.display = 'block';
}
// Collapse the branch if it IS visible
else
{
- setImages(node, "plus.png", "folder_closed.png");
+ if (imgChild != null)
+ setImages(imgChild, "plus.png", "folder_closed.png");
sibling.style.display = 'none';
}
}