Compare commits

..

No commits in common. "84baaff88a51257f16920201318ee78e535df5a6" and "f4bd302e9d47e31a91ea62afc3710812899652df" have entirely different histories.

View File

@ -7,11 +7,10 @@
</ul> </ul>
</div> </div>
<div class="fixed-bottom form-inline"> <div class="fixed-bottom form-inline">
<textarea id="msgbox" class="form-control" style="width:85%; float: left;"></textarea> <textarea id="msgbox" class="form-control" style="min-width:80%"></textarea>
<button id="btn-send" <button id="btn-send"
class="btn btn-info" class="btn btn-info"
type="button" type="button"
style="width: 10%;"
onclick="send_message()" onclick="send_message()"
disabled> disabled>
<svg xmlns="http://www.w3.org/2000/svg" <svg xmlns="http://www.w3.org/2000/svg"
@ -51,17 +50,18 @@
var li = document.createElement('li'); var li = document.createElement('li');
var pre = document.createElement('pre'); var pre = document.createElement('pre');
li.appendChild(pre) li.appendChild(pre)
li.style.textAlign = "left" li.style.marginBottom = "20px"
li.style.padding = "10px"
li.style.clear = "both"
if (msg.response == "" && msg.request != "") { if (msg.response == "" && msg.request != "") {
li.style.textAlign = "right"
pre.innerText = msg.request pre.innerText = msg.request
pre.style = "background-color: lightblue; border-radius: 10px; padding: 5px; white-space: pre-wrap; word-wrap: break-word; float: right;" pre.style.backgroundColor = "lightblue"
} else if (msg.request != "") { } else if (msg.request != "") {
li.style.textAlign = "left" li.style.textAlign = "left"
pre.innerText = msg.response pre.innerText = msg.response
pre.style = "background-color: lightgreen; border-radius: 10px; padding: 5px; white-space: pre-wrap; word-wrap: break-word;" pre.style.backgroundColor = "lightgreen"
} }
pre.style.borderRadius = "10px"
pre.style.padding = "5px"
msg_list.appendChild(li) msg_list.appendChild(li)
}) })
window.scrollTo(0,document.documentElement.scrollHeight) window.scrollTo(0,document.documentElement.scrollHeight)
@ -82,11 +82,12 @@
var li = document.createElement('li'); var li = document.createElement('li');
var pre = document.createElement('pre'); var pre = document.createElement('pre');
li.appendChild(pre) li.appendChild(pre)
li.style.textAlign = "left" li.style.textAlign="right"
li.style.padding = "10px" li.style.marginBottom="20px"
li.style.clear = "both" pre.innerText=data.msg
pre.innerText = data.msg pre.style.backgroundColor="lightblue"
pre.style = "background-color: lightblue; border-radius: 10px; padding: 5px; white-space: pre-wrap; word-wrap: break-word; float: right;" pre.style.borderRadius="10px"
pre.style.padding="5px"
msg_list.appendChild(li) msg_list.appendChild(li)
} }
msgbox.value="" msgbox.value=""
@ -104,11 +105,12 @@
var li = document.createElement('li'); var li = document.createElement('li');
var pre = document.createElement('pre'); var pre = document.createElement('pre');
li.appendChild(pre) li.appendChild(pre)
pre.innerText = response.message pre.innerText=response.message
li.style.textAlign = "left" li.style.textAlign="left"
li.style.padding = "10px" li.style.marginBottom="20px"
li.style.clear = "both" pre.style.backgroundColor="lightgreen"
pre.style = "background-color: lightgreen; border-radius: 10px; padding: 5px; white-space: pre-wrap; word-wrap: break-word;" pre.style.borderRadius="10px"
pre.style.padding="5px"
msg_list.appendChild(li) msg_list.appendChild(li)
msg_list.appendChild(document.createElement('br')) msg_list.appendChild(document.createElement('br'))
} }