From f9fdcc53142b9c9c500913f37bed253c134ce574 Mon Sep 17 00:00:00 2001 From: SBD Date: Wed, 29 Nov 2023 22:03:31 +0300 Subject: [PATCH] 0.8.437 --- static/js/dynamic_loading_routes.js | 29 +++++++++++++++++++++++++++-- static/js/user_profile_2.js | 1 + templates/pages/p_main.html | 4 ++-- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/static/js/dynamic_loading_routes.js b/static/js/dynamic_loading_routes.js index a62e812..9ad0ab6 100644 --- a/static/js/dynamic_loading_routes.js +++ b/static/js/dynamic_loading_routes.js @@ -203,6 +203,20 @@ function load_routes (el,news=null,incrase) { } +function set_right_btn_owner_type (el){ + let els = document.querySelectorAll(".btns_owner") + let i = 0 + els.forEach(function (){ + if (els[i] !== el){ + els[i].classList.remove("active") + els[i].classList.add("deactive") + } + i++ + }) + el.classList.add('active') + el.classList.remove('deactive') +} + function forloop_func_form (data,get,str) { let list_of_elements_form = document.querySelectorAll(".el_form_find_route"); for (let i = 0;i < list_of_elements_form.length;i++) { @@ -212,6 +226,7 @@ function forloop_func_form (data,get,str) { // } let name_attr = list_of_elements_form[i].attributes["name"] let value_el = list_of_elements_form[i].value + let class_el = list_of_elements_form[i].classList if (name_attr) { let name_el = name_attr.value if (list_of_elements_form[i].tagName === "INPUT" && list_of_elements_form[i].type === "checkbox"){ @@ -242,8 +257,18 @@ function forloop_func_form (data,get,str) { } else { let name_el = name_attr.value - data[name_el] = value_el - str = `${str}${name_el}=${value_el}&` + if (name_el === 'owner_type'){ + if (class_el.contains('active')){ + data[name_el] = value_el + str = `${str}${name_el}=${value_el}&` + } else { + // + } + } else { + data[name_el] = value_el + str = `${str}${name_el}=${value_el}&` + } + } } } diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index ddcb458..1949ab5 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -451,6 +451,7 @@ function createTicket (el) { } + function selectedUserMessenger (ticket_id=null,user_id=null,el){ let loader = document.querySelector(".loader_chat_f_sw_chats") let block_chat = document.querySelector(".block-chat") diff --git a/templates/pages/p_main.html b/templates/pages/p_main.html index 6ecdd92..98d969a 100644 --- a/templates/pages/p_main.html +++ b/templates/pages/p_main.html @@ -37,12 +37,12 @@
- +
- +