ui: заменить оставшиеся боковые панели на центрированные popup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-13 13:12:21 +03:00
parent 31dd3b4ffc
commit 4e1d5f221e
12 changed files with 107 additions and 52 deletions
+7 -4
View File
@@ -8,7 +8,7 @@
{% trans "Инверторы и генераторы: объекты, обслуживание и плановое ТО" %}
</p>
</div>
<button type="button" class="btn btn-primary" onclick="document.getElementById('power-create-panel').style.display='block'; document.getElementById('power-create-overlay').style.display='block';">
<button type="button" class="btn btn-primary" onclick="var p=document.getElementById('power-create-panel'); p.style.display='flex'; document.body.style.overflow='hidden'; if(typeof initSearchableSelects==='function') initSearchableSelects(p);">
{% trans "Добавить" %}
</button>
</div>
@@ -265,11 +265,13 @@
{% include "partials/pagination.html" with page=power_assets_page base_url="/accounting/?tab=power" page_param="power_page" size_param="power_per_page" item_label="единиц" %}
</div>
<div id="power-create-overlay" onclick="this.style.display='none'; document.getElementById('power-create-panel').style.display='none';" style="display:none; position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:1000;"></div>
<div id="power-create-panel" style="display:none; position:fixed; top:0; right:0; height:100vh; width:28rem; max-width:92vw; background:var(--color-card); box-shadow:-8px 0 24px rgba(0,0,0,0.18); z-index:1001; overflow-y:auto;">
<div id="power-create-panel" role="dialog" aria-modal="true"
style="display:none; position:fixed; inset:0; z-index:80; background:rgba(0,0,0,0.4); align-items:flex-start; justify-content:center; padding:1.5rem 1rem; overflow-y:auto;"
onclick="if(event.target===this){this.style.display='none'; document.body.style.overflow='';}">
<div style="background:var(--color-card); border-radius:0.75rem; border:1px solid var(--color-border); box-shadow:0 20px 60px rgb(0 0 0/0.2); width:100%; max-width:36rem; margin:auto;">
<div style="padding:1rem 1.25rem; border-bottom:1px solid var(--color-border); display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:var(--color-card);">
<span style="font-weight:600;">{% trans "Новое энергооборудование" %}</span>
<button type="button" class="btn btn-ghost btn-icon" onclick="document.getElementById('power-create-panel').style.display='none'; document.getElementById('power-create-overlay').style.display='none';" aria-label="{% trans 'Закрыть' %}">×</button>
<button type="button" class="btn btn-ghost btn-icon" onclick="document.getElementById('power-create-panel').style.display='none'; document.body.style.overflow='';" aria-label="{% trans 'Закрыть' %}">×</button>
</div>
<form hx-post="/power-assets/create/" hx-target="#main-content" hx-indicator="#loader"
style="padding:1.25rem; display:flex; flex-direction:column; gap:0.875rem;">
@@ -352,6 +354,7 @@
</div>
<button type="submit" class="btn btn-primary">{% trans "Сохранить" %}</button>
</form>
</div>
</div>
<script>if (typeof initSearchableSelects === 'function') initSearchableSelects(document);</script>