diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-09 12:21:35 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-09 12:21:35 +0800 |
commit | 14899f2d17dd5943b28fb83e79aa998125159fff (patch) | |
tree | 9d494028c6933c8d1fde9f74262b6f723fe80199 /data | |
parent | 4133101266b116d34b04a69e9957c0502daf72e8 (diff) | |
download | gsoc2013-empathy-14899f2d17dd5943b28fb83e79aa998125159fff.tar gsoc2013-empathy-14899f2d17dd5943b28fb83e79aa998125159fff.tar.gz gsoc2013-empathy-14899f2d17dd5943b28fb83e79aa998125159fff.tar.bz2 gsoc2013-empathy-14899f2d17dd5943b28fb83e79aa998125159fff.tar.lz gsoc2013-empathy-14899f2d17dd5943b28fb83e79aa998125159fff.tar.xz gsoc2013-empathy-14899f2d17dd5943b28fb83e79aa998125159fff.tar.zst gsoc2013-empathy-14899f2d17dd5943b28fb83e79aa998125159fff.zip |
Add icons to the new log viewer
Diffstat (limited to 'data')
-rw-r--r-- | data/empathy-log-window.html | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/data/empathy-log-window.html b/data/empathy-log-window.html index d466c9117..034c9301d 100644 --- a/data/empathy-log-window.html +++ b/data/empathy-log-window.html @@ -34,6 +34,11 @@ span.date { float: right; color: gray; } + +img.icon { + vertical-align: middle; + padding-right: 1px; +} </style> <script type="text/javascript"> function filterNodes (node, tagName) @@ -108,7 +113,20 @@ function expandAll() expandAllRecurse(treeview); } -function insertRow (path, text, date_) +function setContent (contents, text, icon, date_) +{ + contents.innerHTML = ""; + + if (icon != "") + { + contents.innerHTML += '<img class="icon" src="' + icon + '"/>'; + } + + contents.innerHTML += text; + contents.innerHTML += '<span class="date">' + date_ + '</span>'; +} + +function insertRow (path, text, icon, date_) { var treeview = document.getElementById('treeview'); var parentnode = treeview; @@ -150,14 +168,14 @@ function insertRow (path, text, date_) var contents = document.createElement('p'); newnode.appendChild(contents); - contents.innerHTML = text + '<span class="date">' + date_ + '</span>'; + setContent(contents, text, icon, date_); // if the node is not a top-level node, hide it if (parentnode != treeview) newnode.style.display = 'none'; } -function changeRow (path, text, date_) +function changeRow (path, text, icon, date_) { var treeview = document.getElementById('treeview'); var node = treeview; @@ -170,7 +188,7 @@ function changeRow (path, text, date_) // set the contents var contents = getContent(node); - contents.innerHTML = text + '<span class="date">' + date_ + '</span>'; + setContent(contents, text, icon, date_); } function deleteRow (path) |