Wrap the message content in a pre-scrollable to make sure it doesn't obliterate the screen real estate

This commit is contained in:
R. Tyler Croy 2014-11-25 10:53:40 -08:00
parent f5b619f5f2
commit 5b1574097d
3 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ plugins {
apply plugin: 'groovy'
////////////////////////////////////////////////////////////////////////////////
version = '0.1.0'
group = 'offtopic'
description =' Offtopic is a simple web application built with Ratpack for inspecting and consuming events from Kafka.'
sourceCompatibility = '1.7'

View File

@ -14,3 +14,6 @@ body {
margin-left: 3px;
margin-right: 3px;
}
.message-raw {
}

View File

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