aboutsummaryrefslogtreecommitdiffstats
path: root/data/empathy-log-window.html
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-08-09 12:32:30 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2011-08-09 12:32:30 +0800
commit14ccd126b65741b4e5f9575cc0ddd6d371d40b9d (patch)
tree1e0ebf8b5212368ecffb4c4bdc26ec48fc1d7880 /data/empathy-log-window.html
parent14899f2d17dd5943b28fb83e79aa998125159fff (diff)
downloadgsoc2013-empathy-14ccd126b65741b4e5f9575cc0ddd6d371d40b9d.tar
gsoc2013-empathy-14ccd126b65741b4e5f9575cc0ddd6d371d40b9d.tar.gz
gsoc2013-empathy-14ccd126b65741b4e5f9575cc0ddd6d371d40b9d.tar.bz2
gsoc2013-empathy-14ccd126b65741b4e5f9575cc0ddd6d371d40b9d.tar.lz
gsoc2013-empathy-14ccd126b65741b4e5f9575cc0ddd6d371d40b9d.tar.xz
gsoc2013-empathy-14ccd126b65741b4e5f9575cc0ddd6d371d40b9d.tar.zst
gsoc2013-empathy-14ccd126b65741b4e5f9575cc0ddd6d371d40b9d.zip
Toggle the expander on row double click
Diffstat (limited to 'data/empathy-log-window.html')
-rw-r--r--data/empathy-log-window.html19
1 files changed, 11 insertions, 8 deletions
diff --git a/data/empathy-log-window.html b/data/empathy-log-window.html
index 034c9301d..987c07a26 100644
--- a/data/empathy-log-window.html
+++ b/data/empathy-log-window.html
@@ -71,7 +71,7 @@ function getToggle(node)
return filterNodes(node, 'SPAN')[0];
}
-function toggleExpander(node, open)
+function setExpander(node, open)
{
var toggle = getToggle(node);
var display;
@@ -102,7 +102,7 @@ function expandAll()
for (var i = 0; i < nodes.length; i++)
{
- toggleExpander(nodes[i], true);
+ setExpander(nodes[i], true);
expandAllRecurse(nodes[i]);
}
@@ -158,17 +158,20 @@ function insertRow (path, text, icon, date_)
toggle.setAttribute('class', 'closed');
toggle.style.display = 'none';
- toggle.onclick = function (e)
+ var contents = document.createElement('p');
+ newnode.appendChild(contents);
+ setContent(contents, text, icon, date_);
+
+ function toggleExpander (e)
{
if (toggle.getAttribute('class') == 'closed')
- toggleExpander(newnode, true);
+ setExpander(newnode, true);
else
- toggleExpander(newnode, false);
+ setExpander(newnode, false);
};
- var contents = document.createElement('p');
- newnode.appendChild(contents);
- setContent(contents, text, icon, date_);
+ toggle.onclick = toggleExpander;
+ contents.ondblclick = toggleExpander;
// if the node is not a top-level node, hide it
if (parentnode != treeview)