diff --git a/chat/templates/chat/chat_allusers.html b/chat/templates/chat/chat_allusers.html index 1edd0ff..973f16c 100644 --- a/chat/templates/chat/chat_allusers.html +++ b/chat/templates/chat/chat_allusers.html @@ -4,7 +4,6 @@ z-index: 999; height: 100%; width: 100%; - border-radius: 50%; } .icon-container { width: 50px; @@ -69,6 +68,7 @@ { $("#dynamicchatwindow_content").html(data); $("#dynamicchatwindow").show(); + localStorage.setItem("basechatid", userid); } }); diff --git a/chat/templates/chat/chat_content.html b/chat/templates/chat/chat_content.html index 942bb3b..766d0d1 100644 --- a/chat/templates/chat/chat_content.html +++ b/chat/templates/chat/chat_content.html @@ -153,11 +153,12 @@ $(document).ready(function(){ }) - + sending = true; function sendNewMessage() { - if($("#message").val().length > 0) + if($("#message").val().length > 0 && sending) { + sending = false; $.ajax( { type: "GET", @@ -173,7 +174,8 @@ $(document).ready(function(){ $("#message").val(""); chatwebsocket.send("load__{{user.pk}}__privatechat_{{roomdata.creator.pk}}_{{roomdata.chatmember_single.pk}}"); chatwebsocket.send("stoptyping__{{user.pk}}__privatechat_{{roomdata.creator.pk}}_{{roomdata.chatmember_single.pk}}"); - } + sending = true; + } }); } } @@ -181,7 +183,7 @@ $(document).ready(function(){ $(document).on('keypress',function(e) { if(e.which == 13) { - if($("#message").val().length > 0){ + if($("#message").val().length > 0 && sending){ sendNewMessage(); } } diff --git a/chat/templates/chat/chat_content_basechat.html b/chat/templates/chat/chat_content_basechat.html index 9b23693..db01b59 100644 --- a/chat/templates/chat/chat_content_basechat.html +++ b/chat/templates/chat/chat_content_basechat.html @@ -1,9 +1,9 @@ {% load counter_tag %} @@ -65,7 +71,7 @@ {% if message.author == request.user %}
- +
{{message.sendtime|date:"H:i"}}
@@ -77,7 +83,7 @@ {% else %}
- +
{{message.author.first_name}} {{message.author.last_name}}, {{message.sendtime|date:"H:i"}}
@@ -114,6 +120,7 @@ function closeSingleChat(){ chatwebsocket.close(); $("#dynamicchatwindow").hide(); + localStorage. removeItem("basechatid"); } $(document).ready(function(){ @@ -189,12 +196,13 @@ $(document).ready(function(){ } }) - + var sending = true; function sendNewMessage() - { - if($("#message").val().length > 0) + { + if($("#message").val().length > 0 && sending) { + sending = false; $.ajax( { type: "GET", @@ -210,15 +218,16 @@ $(document).ready(function(){ $("#message").val(""); chatwebsocket.send("load__{{user.pk}}__privatechat_{{roomdata.creator.pk}}_{{roomdata.chatmember_single.pk}}"); chatwebsocket.send("stoptyping__{{user.pk}}__privatechat_{{roomdata.creator.pk}}_{{roomdata.chatmember_single.pk}}"); + sending = true; } - }); + }); } } $(document).on('keypress',function(e) { if(e.which == 13) { - if($("#message").val().length > 0){ + if($("#message").val().length > 0 && sending == true){ sendNewMessage(); } } diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 362ae6f..9a54d97 100644 Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ diff --git a/digitaleagentur/settings.py b/digitaleagentur/settings.py index b1bcf68..45dae74 100644 --- a/digitaleagentur/settings.py +++ b/digitaleagentur/settings.py @@ -14,38 +14,35 @@ from datetime import datetime, timedelta # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -############################################## LOCAL ##################################### -BASE_URL = "http://localhost:8000/" +############################################## DEV ##################################### +BASE_URL = "https://dev01.digitale-agentur.com/" CRONAPIKEY = "gCddsaz6NOnE9QbXZM5LasdEk122D" MAILINFOKEY = "jka7sd8iukashdna78skduJAHDsu6dilaksdjba65a68iadbhjak" # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -# Database -# https://docs.djangoproject.com/en/2.2/ref/settings/#databases +# MAIL DEV +EMAIL_HOST = 'smtp.strato.de' +EMAIL_PORT = 587 +EMAIL_USE_TLS = True +EMAIL_HOST_USER = "support@dev01.digitale-agentur.com" +EMAIL_HOST_PASSWORD = "n2xd7emyKZFb6UREzvbintuUIG" +DEFAULT_FROM_EMAIL = "support@dev01.digitale-agentur.com" + # DEV DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', - 'NAME' : 'digitaleagentur', - 'USER' : 'root', - 'PASSWORD' : '', + 'NAME' : 'digitaleagentur_dev01', + 'USER' : 'digitaleagentur_dev01', + 'PASSWORD' : 't3TvtGAOkFHYXdJlUMIu9u3U', 'PORT' : 3306 } } -# MAIL DEV -EMAIL_HOST = 'gymhum.de' -EMAIL_PORT = 587 -EMAIL_USE_TLS = True -EMAIL_HOST_USER = "holger.trampe" -EMAIL_HOST_PASSWORD = "Motte2016_!" -DEFAULT_FROM_EMAIL = "holger.trampe@gymhum.de" - # REDIS REDIS_URL = ("localhost", 6379) -################################################### LOCAL ############################### +############################################## DEV ##################################### diff --git a/users/templates/users/base.html b/users/templates/users/base.html index 80b4e39..de767e8 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -440,7 +440,7 @@ -