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
This commit is contained in:
admin i 2025-10-28 10:11:25 +03:00
parent 5864a2bf71
commit c7647c6231
5 changed files with 52 additions and 21 deletions

View File

@ -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;
}

View File

@ -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);
}

View File

@ -6,10 +6,7 @@
{% block extra_css %}
<link rel="stylesheet" href="{% static 'css/components/ios-search.css' %}">
<style>
/* чуть плотнее заголовок-строку */
.feed-header { gap:.6rem; flex-wrap:wrap; }
</style>
<link rel="stylesheet" href="{% static 'css/components/feed-header.css' %}">
{% endblock %}
{% block content %}

View File

@ -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/оверлеев #}
<style>
/* Модалки поверх всего */
.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; }
</style>
{% load static %}
{% block extra_css %}
<link rel="stylesheet" href="{% static 'css/components/department-controls.css' %}">
{% endblock %}
{% if can_manage %}
<div class="ios-acc mb-3">

View File

@ -5,13 +5,7 @@
{% block extra_css %}
<link rel="stylesheet" href="{% static 'css/components/ios-search.css' %}">
<style>
/* ios-search стили теперь в static/css/components/ios-search.css */
.feed-header { gap:.6rem; flex-wrap:wrap; }
.result-row { cursor:default; }
.list-results > .result-row + .result-row { border-top:1px solid var(--bs-border-color); }
</style>
<link rel="stylesheet" href="{% static 'css/components/feed-header.css' %}">
{% endblock %}
{% block content %}