0.0.121
This commit is contained in:
@@ -1034,24 +1034,58 @@
|
|||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.items_subscribe.select{
|
.text_option_item{
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #272424;
|
color: #272424;
|
||||||
|
width: 93%;
|
||||||
|
float: right;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.items_subscribe.select::marker{
|
.cont_photo_option_item{
|
||||||
content: url("/static/img/svg/galka.svg");
|
height: 100%;
|
||||||
display: inline-block;
|
float: left;
|
||||||
width: 10%;
|
width: 5%;
|
||||||
clear: both;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.items_subscribe > span{
|
.cont_photo_option_item > img{
|
||||||
display: inline-block;
|
display: block;
|
||||||
padding-left: 10px;
|
margin: auto;
|
||||||
width: 90%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.items_subscribe{
|
.item_options_subscribe{
|
||||||
padding-bottom: 5px;
|
height: fit-content;
|
||||||
}
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.option_list{*/
|
||||||
|
/* list-style-image: url("/static/img/svg/galka.svg");*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.items_subscribe.select{*/
|
||||||
|
/* font-size: 16px;*/
|
||||||
|
/* color: #272424;*/
|
||||||
|
/* padding-left: 20px;*/
|
||||||
|
/* !*position: relative;*!*/
|
||||||
|
/* margin: 10px;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.items_subscribe.select:before{*/
|
||||||
|
/* content: url(/static/img/svg/galka.svg);*/
|
||||||
|
/* position: absolute;*/
|
||||||
|
/* !* top: 13px; *!*/
|
||||||
|
/* color: #FF613A;*/
|
||||||
|
/* display: inline-block;*/
|
||||||
|
/* vertical-align: center;*/
|
||||||
|
/* padding-right: 20px;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.items_subscribe > text{*/
|
||||||
|
/* display: inline-block;*/
|
||||||
|
/* padding-left: 4%;*/
|
||||||
|
/* width: 93%;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*.items_subscribe{*/
|
||||||
|
/* padding-bottom: 5px;*/
|
||||||
|
/*}*/
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
let url = `ws://localhost:8000/ws/socket-server/`;
|
// let url = `ws://localhost:8000/ws/socket-server/`;
|
||||||
//
|
//
|
||||||
// const chatSocket = new WebSocket(url);
|
// const chatSocket = new WebSocket(url);
|
||||||
|
|
||||||
@@ -42,37 +42,75 @@ let url = `ws://localhost:8000/ws/socket-server/`;
|
|||||||
|
|
||||||
// var i = 0
|
// var i = 0
|
||||||
|
|
||||||
function sendMessageSocket (data) {
|
// function sendMessageSocket (data) {
|
||||||
let chatSocket = new WebSocket(url);
|
// let chatSocket = new WebSocket(url);
|
||||||
chatSocket.onopen = function (){
|
// chatSocket.onopen = function (){
|
||||||
console.log("open")
|
// console.log("open")
|
||||||
chatSocket.send(JSON.stringify(data))
|
// chatSocket.send(JSON.stringify(data))
|
||||||
}
|
// }
|
||||||
chatSocket.onclose = function () {
|
// chatSocket.onclose = function () {
|
||||||
console.log("close")
|
// console.log("close")
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
//
|
// //
|
||||||
|
//
|
||||||
|
// // }
|
||||||
|
// // open_socket()
|
||||||
|
// // chatSocket.OPEN
|
||||||
|
//
|
||||||
|
// // chatSocket.onopen = function (){
|
||||||
|
// // console.log("open")
|
||||||
|
// //
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
|
||||||
// }
|
//
|
||||||
// open_socket()
|
// chatSocket.onmessage = function (e) {
|
||||||
// chatSocket.OPEN
|
// let data = JSON.parse(e.data);
|
||||||
|
// console.log('Data:', data);
|
||||||
// chatSocket.onopen = function (){
|
// console.log("return")
|
||||||
// console.log("open")
|
// if (data.type === 'chat'){
|
||||||
//
|
// document.querySelector(".container-messages").innerHTML = data.html;
|
||||||
|
// document.querySelector(".enter-message-inp").focus()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
// }
|
let url = `ws://localhost:8000/ws/socket-server/`;
|
||||||
}
|
|
||||||
|
|
||||||
|
const chatSocket = new WebSocket(url);
|
||||||
|
|
||||||
chatSocket.onmessage = function (e) {
|
chatSocket.onmessage = function (e) {
|
||||||
let data = JSON.parse(e.data);
|
let data = JSON.parse(e.data)
|
||||||
console.log('Data:', data);
|
console.log('Data: ', data)
|
||||||
console.log("return")
|
|
||||||
if (data.type === 'chat'){
|
if (data.type === 'chat') {
|
||||||
document.querySelector(".container-messages").innerHTML = data.html;
|
// let messages = document.getElementById('messages')
|
||||||
document.querySelector(".enter-message-inp").focus()
|
//
|
||||||
}
|
// messages.insertAdjacentHTML('beforeend', `<div>
|
||||||
}
|
// <p>${data.message}</p>
|
||||||
|
// </div>`
|
||||||
|
// )
|
||||||
|
document.querySelector(".container-messages").innerHTML = data.html;
|
||||||
|
document.querySelector(".enter-message-inp").focus()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = function () {
|
||||||
|
|
||||||
|
let btn = document.querySelector(".send-message")
|
||||||
|
|
||||||
|
btn.addEventListener('click', (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
// let message = e.target.message.value
|
||||||
|
chatSocket.send(JSON.stringify({
|
||||||
|
'data':'data'
|
||||||
|
}))
|
||||||
|
// btn.reset()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// let form = document.getElementById('form')
|
||||||
|
|
||||||
|
|||||||
@@ -35,14 +35,23 @@
|
|||||||
Опции:
|
Опции:
|
||||||
</div>
|
</div>
|
||||||
<div class="list_options_subscribe">
|
<div class="list_options_subscribe">
|
||||||
<ul сlass="option_list">
|
<div class="item_options_subscribe">
|
||||||
<li class="items_subscribe select"><span>Просмотр контактов</span></li>
|
<div class="cont_photo_option_item">
|
||||||
<li class="items_subscribe select"><span>Размещение заявок</span></li>
|
<img src="{% static "/img/svg/galka.svg" %}">
|
||||||
<li class="items_subscribe select"><span>Уведомления на e-mail о появлении перевозчика по заданным критериям</span></li>
|
</div>
|
||||||
<li class="items_subscribe unselected"><span>Выделение объявления цветом + 30 поднятий</span></li>
|
<div class="text_option_item">
|
||||||
<li class="items_subscribe unselected"><span>Push уведомления</span></li>
|
Просмотр контактов
|
||||||
<li class="items_subscribe unselected"><span>СМС уведомления</span></li>
|
</div>
|
||||||
</ul>
|
<div class="clear_both"></div>
|
||||||
|
</div>
|
||||||
|
{# <ul class="option_list">#}
|
||||||
|
{# <li class="items_subscribe select">Просмотр контактов</li>#}
|
||||||
|
{# <li class="items_subscribe select">Размещение заявок</li>#}
|
||||||
|
{# <li class="items_subscribe select">Уведомления на e-mail о появлении перевозчика по заданным критериям</li>#}
|
||||||
|
{# <li class="items_subscribe unselected">Выделение объявления цветом + 30 поднятий</li>#}
|
||||||
|
{# <li class="items_subscribe unselected">Push уведомления</li>#}
|
||||||
|
{# <li class="items_subscribe unselected">СМС уведомления</li>#}
|
||||||
|
{# </ul>#}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user