Display the topic in the list view to make it easier to see combo streams

References #7
This commit is contained in:
R. Tyler Croy 2014-11-24 18:00:10 -08:00
parent 183f429ebd
commit d04d228b28
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,10 @@ function watchTopic(name) {
var data = $.parseJSON(event.data);
var messages = $('#messages');
var el_id = Math.floor(Math.random() * 1000000);
var el = "<div id='" + el_id + "' class='list-group-item'>" + data.raw + "<br/><div id='" + el_id + "_b64' style='display:none;'><pre>" + data.b64 + "</pre></div>";
var el = ["<div id='" + el_id + "' class='list-group-item'>",
"<code>" + data.topic + "</code>",
data.raw + "<br/><div id='" + el_id,
"_b64' style='display:none;'><pre>" + data.b64 + "</pre></div>"].join("\n");
messages.prepend(el);
$("#" + el_id).click(function(ev) {
$("#"+el_id+'_b64').toggle();