Compare commits
2 Commits
f4bd302e9d
...
84baaff88a
Author | SHA1 | Date | |
---|---|---|---|
84baaff88a | |||
ce89247a9c |
@ -7,10 +7,11 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="fixed-bottom form-inline">
|
||||
<textarea id="msgbox" class="form-control" style="min-width:80%"></textarea>
|
||||
<textarea id="msgbox" class="form-control" style="width:85%; float: left;"></textarea>
|
||||
<button id="btn-send"
|
||||
class="btn btn-info"
|
||||
type="button"
|
||||
style="width: 10%;"
|
||||
onclick="send_message()"
|
||||
disabled>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
@ -50,18 +51,17 @@
|
||||
var li = document.createElement('li');
|
||||
var pre = document.createElement('pre');
|
||||
li.appendChild(pre)
|
||||
li.style.marginBottom = "20px"
|
||||
li.style.textAlign = "left"
|
||||
li.style.padding = "10px"
|
||||
li.style.clear = "both"
|
||||
if (msg.response == "" && msg.request != "") {
|
||||
li.style.textAlign = "right"
|
||||
pre.innerText = msg.request
|
||||
pre.style.backgroundColor = "lightblue"
|
||||
pre.style = "background-color: lightblue; border-radius: 10px; padding: 5px; white-space: pre-wrap; word-wrap: break-word; float: right;"
|
||||
} else if (msg.request != "") {
|
||||
li.style.textAlign = "left"
|
||||
pre.innerText = msg.response
|
||||
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)
|
||||
})
|
||||
window.scrollTo(0,document.documentElement.scrollHeight)
|
||||
@ -82,12 +82,11 @@
|
||||
var li = document.createElement('li');
|
||||
var pre = document.createElement('pre');
|
||||
li.appendChild(pre)
|
||||
li.style.textAlign="right"
|
||||
li.style.marginBottom="20px"
|
||||
li.style.textAlign = "left"
|
||||
li.style.padding = "10px"
|
||||
li.style.clear = "both"
|
||||
pre.innerText = data.msg
|
||||
pre.style.backgroundColor="lightblue"
|
||||
pre.style.borderRadius="10px"
|
||||
pre.style.padding="5px"
|
||||
pre.style = "background-color: lightblue; border-radius: 10px; padding: 5px; white-space: pre-wrap; word-wrap: break-word; float: right;"
|
||||
msg_list.appendChild(li)
|
||||
}
|
||||
msgbox.value=""
|
||||
@ -107,10 +106,9 @@
|
||||
li.appendChild(pre)
|
||||
pre.innerText = response.message
|
||||
li.style.textAlign = "left"
|
||||
li.style.marginBottom="20px"
|
||||
pre.style.backgroundColor="lightgreen"
|
||||
pre.style.borderRadius="10px"
|
||||
pre.style.padding="5px"
|
||||
li.style.padding = "10px"
|
||||
li.style.clear = "both"
|
||||
pre.style = "background-color: lightgreen; border-radius: 10px; padding: 5px; white-space: pre-wrap; word-wrap: break-word;"
|
||||
msg_list.appendChild(li)
|
||||
msg_list.appendChild(document.createElement('br'))
|
||||
}
|
||||
|
Reference in New Issue
Block a user