diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-16 14:15:38 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-16 14:15:38 +0800 |
commit | ede83c3b09c25b9e08c0aa54d842d844b582e0d8 (patch) | |
tree | 136410d9523f2a8ee029746da571c532f0140fd0 /data | |
parent | 9d1f95bebe28683a23f56568539ee2c56655b80c (diff) | |
download | gsoc2013-empathy-ede83c3b09c25b9e08c0aa54d842d844b582e0d8.tar gsoc2013-empathy-ede83c3b09c25b9e08c0aa54d842d844b582e0d8.tar.gz gsoc2013-empathy-ede83c3b09c25b9e08c0aa54d842d844b582e0d8.tar.bz2 gsoc2013-empathy-ede83c3b09c25b9e08c0aa54d842d844b582e0d8.tar.lz gsoc2013-empathy-ede83c3b09c25b9e08c0aa54d842d844b582e0d8.tar.xz gsoc2013-empathy-ede83c3b09c25b9e08c0aa54d842d844b582e0d8.tar.zst gsoc2013-empathy-ede83c3b09c25b9e08c0aa54d842d844b582e0d8.zip |
Allow clicking on a row to select the contact
Does not currently highlight the row.
Diffstat (limited to 'data')
-rw-r--r-- | data/empathy-log-window.html | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/data/empathy-log-window.html b/data/empathy-log-window.html index 5a94b7e09..6962528a4 100644 --- a/data/empathy-log-window.html +++ b/data/empathy-log-window.html @@ -1,4 +1,7 @@ -<html> +<?xml version="1.0"> +<html + xmlns="http://www.w3.org/TR/html4/" + xmlns:empathy="http://live.gnome.org/Empathy"> <head> <style type="text/css"> html, body, div, p { @@ -41,6 +44,8 @@ img.icon { } </style> <script type="text/javascript"> +var EMPATHY_NS='http://live.gnome.org/Empathy'; + function filterNodes (node, tagName) { var out = new Array(); @@ -148,6 +153,9 @@ function insertRow (path, text, icon, date_) else parentnode.insertBefore(newnode, nodes[path[i]]); + // set the path + newnode.setAttributeNS(EMPATHY_NS, 'path', path.join(':')); + // add an expander var toggle = document.createElement('span'); newnode.appendChild(toggle); @@ -219,6 +227,22 @@ function reorderRows (path, new_order) // For reference: new_order[new_pos] = old_pos for (var i = 0; i < nodes.length; i++) node.appendChild(nodes[new_order[i]]); + + // recursively update the path + function updatePaths(path, node) + { + var nodes = getNodes(node); + + for (var i = 0; i < nodes.length; i++) + { + var newpath = path.concat([i]); + + nodes[i].setAttributeNS(EMPATHY_NS, 'path', newpath.join(':')); + updatePaths(newpath, nodes[i]); + } + } + + updatePaths(path, node); } function hasChildRows (path, has_children) |