diff --git a/frontend/admin.html b/frontend/admin.html
index c813f1f..9465084 100644
--- a/frontend/admin.html
+++ b/frontend/admin.html
@@ -1350,7 +1350,7 @@
diff --git a/frontend/js/admin/sections/shop.js b/frontend/js/admin/sections/shop.js
index a880d27..31345d3 100644
--- a/frontend/js/admin/sections/shop.js
+++ b/frontend/js/admin/sections/shop.js
@@ -48,7 +48,7 @@
function renderShopItems() {
const body = document.getElementById('shop-items-body');
if (!_shopItems.length) { body.innerHTML = '
| Нет товаров |
'; return; }
- const typeLabels = { frame:'Рамка', title:'Титул', theme:'Тема', effect:'Эффект' };
+ const typeLabels = { frame:'Рамка', title:'Титул', theme:'Тема', effect:'Эффект', background:'Фон' };
body.innerHTML = _shopItems.map(it => `
| ${it.id} |
${esc(it.name)} |
@@ -69,6 +69,13 @@
if (window.lucide) lucide.createIcons();
}
+ function showShopForm() {
+ const form = document.getElementById('shop-item-form');
+ form.style.display = '';
+ form.scrollIntoView({ behavior: 'smooth', block: 'center' });
+ document.getElementById('shop-f-name').focus();
+ }
+
function shopAdminCreateItem() {
_shopEditId = null;
document.getElementById('shop-form-title').textContent = 'Добавить товар';
@@ -79,7 +86,7 @@
document.getElementById('shop-f-icon').value = '';
document.getElementById('shop-f-data').value = '';
document.getElementById('shop-f-active').checked = true;
- document.getElementById('shop-item-form').style.display = '';
+ showShopForm();
}
function shopAdminEditItem(id) {
@@ -94,7 +101,7 @@
document.getElementById('shop-f-icon').value = it.icon || '';
document.getElementById('shop-f-data').value = it.data ? (typeof it.data === 'string' ? it.data : JSON.stringify(it.data)) : '';
document.getElementById('shop-f-active').checked = !!it.is_active;
- document.getElementById('shop-item-form').style.display = '';
+ showShopForm();
}
function shopAdminCancelForm() {