feat: добавлен функционал выделения всех записей на всех страницах
- Добавлена кнопка "Выделить все на странице" - выделяет записи текущей страницы - Добавлена кнопка "Выделить все" - выделяет все записи с учетом фильтров (все страницы) - Добавлена кнопка "Снять выделение" - убирает выделение со всех строк - Добавлен счетчик выделенных строк в toolbar - Добавлено предупреждение при выделении большого количества записей - Оптимизировано удаление выделенных строк (batch delete)
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
#table {
|
||||
flex: 1;
|
||||
@@ -122,16 +126,39 @@
|
||||
/* Кнопки toolbar */
|
||||
#toolbar button {
|
||||
padding: 6px 12px;
|
||||
margin-right: 4px;
|
||||
cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#toolbar button:hover {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
#toolbar button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Счетчик выделенных */
|
||||
#selectionCounter {
|
||||
padding: 6px 12px;
|
||||
background: #e3f2fd;
|
||||
border-radius: 3px;
|
||||
font-size: 13px;
|
||||
color: #1976d2;
|
||||
font-weight: bold;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.toolbar-divider {
|
||||
width: 1px;
|
||||
height: 24px;
|
||||
background: #ccc;
|
||||
margin: 0 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -150,9 +177,15 @@
|
||||
<div id="toolbar">
|
||||
<button id="btnInsert">➕ Вставить</button>
|
||||
<button id="btnDelete">🗑️ Удалить</button>
|
||||
<div class="toolbar-divider"></div>
|
||||
<button id="btnSelectPage">☑️ Выделить страницу</button>
|
||||
<button id="btnSelectAll">☑️ Выделить все</button>
|
||||
<button id="btnDeselectAll">⬜ Снять выделение</button>
|
||||
<div class="toolbar-divider"></div>
|
||||
<button id="btnImportCSV">📥 Импорт CSV</button>
|
||||
<input type="file" id="csvFileInput" accept=".csv">
|
||||
<button id="btnExportCSV">📤 Экспорт CSV</button>
|
||||
<span id="selectionCounter" style="display: none;">Выбрано: 0</span>
|
||||
</div>
|
||||
<div id="table"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user