From c7647c6231fb59b882c2f4f1707a159014d0905a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=9D=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Tue, 28 Oct 2025 10:11:25 +0300 Subject: [PATCH] refactor: Extract remaining small CSS blocks (department controls, feed-header, search, chat) - Created: static/css/components/department-controls.css (modal z-index overrides for department management) - Created: static/css/components/feed-header.css (reusable feed header styles with gap/flex-wrap) - Modified: templates/employees/_department_controls.html (replaced 12-line style block) - Modified: templates/search/results.html (replaced feed-header styles) - Modified: templates/communications/chat_list.html (replaced feed-header styles) - Description: Extracted last remaining inline styles, created reusable feed-header component - Result: All small CSS blocks now extracted to component files --- .../css/components/department-controls.css | 25 +++++++++++++++++++ backend/static/css/components/feed-header.css | 21 ++++++++++++++++ .../templates/communications/chat_list.html | 5 +--- .../employees/_department_controls.html | 14 +++-------- backend/templates/search/results.html | 8 +----- 5 files changed, 52 insertions(+), 21 deletions(-) create mode 100644 backend/static/css/components/department-controls.css create mode 100644 backend/static/css/components/feed-header.css diff --git a/backend/static/css/components/department-controls.css b/backend/static/css/components/department-controls.css new file mode 100644 index 00000000..d5e17132 --- /dev/null +++ b/backend/static/css/components/department-controls.css @@ -0,0 +1,25 @@ +/** + * department-controls.css + * Стили для модального управления отделом + */ + +/* ───────────────────────────────────────────────────────────── + MODAL Z-INDEX OVERRIDES +────────────────────────────────────────────────────────────── */ +/* Модалки поверх всего */ +.modal-backdrop.show { + z-index: 3000 !important; +} + +.modal.show { + z-index: 3010 !important; +} + +.modal-dialog { + pointer-events: auto !important; +} + +/* Портальный дропдаун автокомплита ролей ниже модалки */ +.role-portal { + z-index: 1800 !important; +} diff --git a/backend/static/css/components/feed-header.css b/backend/static/css/components/feed-header.css new file mode 100644 index 00000000..a77535c9 --- /dev/null +++ b/backend/static/css/components/feed-header.css @@ -0,0 +1,21 @@ +/** + * feed-header.css + * Общие стили заголовка списка (используется в разных секциях) + */ + +/* ───────────────────────────────────────────────────────────── + FEED HEADER +────────────────────────────────────────────────────────────── */ +.feed-header { + gap: 0.6rem; + flex-wrap: wrap; +} + +/* Дополнительные стили для строк результатов */ +.result-row { + cursor: default; +} + +.list-results > .result-row + .result-row { + border-top: 1px solid var(--bs-border-color); +} diff --git a/backend/templates/communications/chat_list.html b/backend/templates/communications/chat_list.html index 3141ea8e..0de88aa2 100644 --- a/backend/templates/communications/chat_list.html +++ b/backend/templates/communications/chat_list.html @@ -6,10 +6,7 @@ {% block extra_css %} - + {% endblock %} {% block content %} diff --git a/backend/templates/employees/_department_controls.html b/backend/templates/employees/_department_controls.html index db75c04e..2e0b056d 100644 --- a/backend/templates/employees/_department_controls.html +++ b/backend/templates/employees/_department_controls.html @@ -1,16 +1,10 @@ {# backend/templates/employees/_department_controls.html #} {# Контекст: dept, head_choices, roles, dept_perm_choices, can_manage, can_assign_roles, can_change_head #} -{# Модалки поверх любых локальных dropdown/оверлеев #} - +{% load static %} +{% block extra_css %} + +{% endblock %} {% if can_manage %}
diff --git a/backend/templates/search/results.html b/backend/templates/search/results.html index ab51c3c5..6125f315 100644 --- a/backend/templates/search/results.html +++ b/backend/templates/search/results.html @@ -5,13 +5,7 @@ {% block extra_css %} - + {% endblock %} {% block content %}