From edf2bdbcce7f36ca546d79154d0be571728b829b Mon Sep 17 00:00:00 2001 From: Michael Chus Date: Wed, 21 Jan 2026 22:18:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BE=D0=BA=20=D0=B8=20?= =?UTF-8?q?=D1=8F=D1=87=D0=B5=D0=B9=D0=BA=D0=B8=20=D1=81=D1=82=D0=BE=D0=BB?= =?UTF-8?q?=D0=B1=D1=86=D0=B0=20=D1=81=20=D1=87=D0=B5=D0=BA=D0=B1=D0=BE?= =?UTF-8?q?=D0=BA=D1=81=D0=B0=D0=BC=D0=B8=20=D0=B4=D0=BE=D0=BB=D0=B6=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=B8=D0=BC=D0=B5=D1=82=D1=8C=20=D0=BE=D0=B4=D0=B8?= =?UTF-8?q?=D0=BD=D0=B0=D0=BA=D0=BE=D0=B2=D1=83=D1=8E=20=D1=88=D0=B8=D1=80?= =?UTF-8?q?=D0=B8=D0=BD=D1=83=20(40px)=20=D0=B8=20=D0=BE=D0=B4=D0=B8=D0=BD?= =?UTF-8?q?=D0=B0=D0=BA=D0=BE=D0=B2=D1=8B=D0=B9=20padding=20(4px),=20?= =?UTF-8?q?=D1=87=D1=82=D0=BE=20=D1=83=D1=81=D1=82=D1=80=D0=B0=D0=BD=D1=8F?= =?UTF-8?q?=D0=B5=D1=82=20=D0=BD=D0=B5=D1=81=D0=BE=D0=BE=D1=82=D0=B2=D0=B5?= =?UTF-8?q?=D1=82=D1=81=D1=82=D0=B2=D0=B8=D0=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/app.js | 26 +++++++++++++++++++++++++- public/index.html | 18 ++++++++++++------ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/public/app.js b/public/app.js index 6e0dda5..c08db42 100644 --- a/public/app.js +++ b/public/app.js @@ -634,15 +634,39 @@ async function selectTable(schema, tableName) { }); if (checkboxColumn) { - // Принудительно устанавливаем ширину + // Принудительно устанавливаем ширину для столбца const element = checkboxColumn.getElement(); if (element) { element.style.width = '40px'; element.style.minWidth = '40px'; element.style.maxWidth = '40px'; element.style.flex = '0 0 40px'; + element.style.padding = '0'; + element.style.boxSizing = 'border-box'; } + // ✅ Также устанавливаем ширину для ячейки заголовка + setTimeout(() => { + const headerCell = element?.querySelector('.tabulator-cell'); + if (headerCell) { + headerCell.style.width = '40px'; + headerCell.style.minWidth = '40px'; + headerCell.style.maxWidth = '40px'; + headerCell.style.padding = '4px'; + headerCell.style.boxSizing = 'border-box'; + } + + // ✅ Устанавливаем ширину для всех ячеек данных в этом столбце + const dataCells = document.querySelectorAll('.tabulator-row .tabulator-cell:first-child'); + dataCells.forEach(cell => { + cell.style.width = '40px'; + cell.style.minWidth = '40px'; + cell.style.maxWidth = '40px'; + cell.style.padding = '4px'; + cell.style.boxSizing = 'border-box'; + }); + }, 50); + console.log('✅ Ширина столбца чекбоксов зафиксирована'); } }); diff --git a/public/index.html b/public/index.html index b6085d4..f6b1a56 100644 --- a/public/index.html +++ b/public/index.html @@ -247,25 +247,30 @@ } /* ✅ ИСКЛЮЧЕНИЕ: столбец с чекбоксами - фиксированная ширина */ + /* Таргетируем столбец rowSelection по всем возможным селекторам */ .tabulator-col.tabulator-row-handle, - .tabulator-col[tabulator-field=""] { + .tabulator-col[tabulator-field=""], + .tabulator-col:first-child { width: 40px !important; min-width: 40px !important; max-width: 40px !important; } - /* ✅ Заголовок столбца с чекбоксами */ + /* ✅ Заголовок столбца с чекбоксами - убираем лишний padding */ .tabulator-header .tabulator-col.tabulator-row-handle, - .tabulator-header .tabulator-col[tabulator-field=""] { + .tabulator-header .tabulator-col[tabulator-field=""], + .tabulator-header .tabulator-col:first-child { width: 40px !important; min-width: 40px !important; max-width: 40px !important; flex: 0 0 40px !important; + padding: 0 !important; } - /* ✅ Ячейки заголовка столбца с чекбоксами */ + /* ✅ Ячейки заголовка столбца с чекбоксами - одинаковый padding с ячейками */ .tabulator-header .tabulator-cell.tabulator-row-handle, - .tabulator-header .tabulator-cell[tabulator-field=""] { + .tabulator-header .tabulator-cell[tabulator-field=""], + .tabulator-header .tabulator-cell:first-child { width: 40px !important; min-width: 40px !important; max-width: 40px !important; @@ -274,7 +279,8 @@ } /* ✅ Ячейки столбца с чекбоксами */ - .tabulator-cell[tabulator-field=""] { + .tabulator-cell[tabulator-field=""], + .tabulator-row .tabulator-cell:first-child { width: 40px !important; min-width: 40px !important; max-width: 40px !important;