This commit is contained in:
Holger Trampe 2020-05-19 22:03:29 +02:00
parent d8dc365b03
commit 712532a117
3 changed files with 23 additions and 29 deletions

View File

@ -99,14 +99,6 @@
</div>
<script type="text/javascript">
function scrollDown(){
//$('#chatmessages').animate({scrollTop: $('#chatmessages').prop("scrollHeight")}, 500);
}
$(document).ready(function(){
$('#chatcontentcomplete').scrollTop( $('#chatcontentcomplete').height()*200 )
});
@ -127,9 +119,6 @@ $(document).ready(function(){
chatwebsocket = new WebSocket(ws_string+window.location.host+"/ws/chat/{{roomdata.creator.pk}}/{{roomdata.chatmember_single.pk}}/")
}
chatwebsocket.onmessage = function(e) {
datainfo = e["data"].split("__");
if(datainfo[0] == "starttyping")
@ -183,7 +172,10 @@ $(document).ready(function(){
})
function sendNewMessage(){
function sendNewMessage()
{
if($("#message").val().length > 0)
{
$.ajax(
{
type: "GET",
@ -202,6 +194,7 @@ $(document).ready(function(){
}
});
}
}
$(document).on('keypress',function(e) {

View File

@ -61,6 +61,7 @@ X_FRAME_OPTIONS = 'SAMEORIGIN'
SECRET_KEY = '_qv2t2lmsctjxpbb4rrp=op%_20_hxzonv^mvty1o85c)l$s^q'
ALLOWED_HOSTS = ['digitale-agentur.com', 'www.digitale-agentur.com', '127.0.0.1', 'localhost', 'dev01.digitale-agentur.com', '10.0.2.2']
CSRF_TRUSTED_ORIGINS = ['127.0.0.1', 'localhost']
# Application definition
INSTALLED_APPS = [