client/messages: fix batch messages appearance

This commit is contained in:
rr- 2016-04-12 18:25:52 +02:00
parent d3979d63dc
commit 7874614be3
2 changed files with 5 additions and 1 deletions

View File

@ -157,6 +157,7 @@ nav.text-nav ul li.active a {
max-width: 100%; max-width: 100%;
} }
.messages .message { .messages .message {
margin: 0.25em 0;
display: inline-block; display: inline-block;
text-align: left; text-align: left;
padding: 0.5em 1em; padding: 0.5em 1em;

View File

@ -19,7 +19,10 @@ function _messageHandler(target, message, className) {
node.innerHTML = message.replace(/\n/g, '<br/>'); node.innerHTML = message.replace(/\n/g, '<br/>');
node.classList.add('message'); node.classList.add('message');
node.classList.add(className); node.classList.add(className);
messagesHolder.appendChild(node); const wrapper = document.createElement('div');
wrapper.classList.add('message-wrapper');
wrapper.appendChild(node);
messagesHolder.appendChild(wrapper);
} }
function _serializeElement(name, attributes) { function _serializeElement(name, attributes) {