From 70ff3841f6b83b4f8b04a993109bfc4865756f5b Mon Sep 17 00:00:00 2001 From: borissedw Date: Mon, 31 Jul 2023 16:24:51 +0300 Subject: [PATCH] 0.0.4 --- static/css/styles(boris).css | 22 ++++++++++++++++++- static/js/user_profile(boris).js | 12 ++++++++++ static/js/user_profile.js | 2 +- templates/blocks/profile/b_create_ticket.html | 8 +++++-- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 15395cb..c74ec8b 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -89,7 +89,27 @@ .el-form-create-ticket{ width: 100%; - height: 60px; + height: 50px; filter: drop-shadow(-1px 4px 10px rgba(198, 199, 203, 0.20)) drop-shadow(0px -1px 10px rgba(198, 199, 203, 0.20)); border-radius: 3px; + margin-bottom: 20px; + /*min-width: unset;*/ + /*max-width: unset;*/ + /*min-height: unset;*/ + /*padding: 10px;*/ +} + +/*.el-form-create-ticket:last-child{*/ +/* !*margin-bottom: 40px;*!*/ +/* !*height: 200px;*!*/ +/* min-width: 100%;*/ +/* max-width: 100%;*/ +/* min-height: 200px;*/ +/* !*padding: 10px;*!*/ +/*}*/ + +.el-form-create-ticket-textarea{ + min-height: 200px; + min-width: 100%; + max-width: 100%; } \ No newline at end of file diff --git a/static/js/user_profile(boris).js b/static/js/user_profile(boris).js index addbea2..fd4453c 100644 --- a/static/js/user_profile(boris).js +++ b/static/js/user_profile(boris).js @@ -15,4 +15,16 @@ function createTicketShow () { }, }); +} + +function countLetters () { + let area = document.querySelector("textarea[name=enter-message]") + let count = area.value.length + if (count <= 500) { + let ins_area = document.querySelector(".letrs-count-span") + ins_area.innerHTML = count + } + else { + area.setAttribute("disabled","disabled") + } } \ No newline at end of file diff --git a/static/js/user_profile.js b/static/js/user_profile.js index e61cdad..89188a9 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -110,7 +110,7 @@ function confirmRemove(el) { let cancel_button = document.createElement('button') cancel_button.className = "cancel_remove"; cancel_button.innerText = "Отменить удаление"; - let place = btn.closest(#select-remove) + let place = btn.closest("#select-remove") place.insertBefore(cancel_button, btn.nextSibling); } btn.removeAttribute("id", "select-remove") diff --git a/templates/blocks/profile/b_create_ticket.html b/templates/blocks/profile/b_create_ticket.html index ac0ca25..19430dd 100644 --- a/templates/blocks/profile/b_create_ticket.html +++ b/templates/blocks/profile/b_create_ticket.html @@ -7,9 +7,13 @@ +
0/500
+ class="el-form-create-ticket-textarea" + placeholder="Введите сообщение..." + onkeyup="countLetters()"> + \ No newline at end of file