Refactor checkbox column for consistent layout in entries table
This commit is contained in:
@@ -690,13 +690,13 @@ function renderEntries(entries) {
|
||||
const locationIcon = location === 'home' ? '🏠' : '🏢';
|
||||
const locationText = location === 'home' ? 'Home' : 'Büro';
|
||||
|
||||
// Checkbox column (only in bulk edit mode)
|
||||
// Checkbox column (always present for consistent layout)
|
||||
const checkboxCell = bulkEditMode ? `
|
||||
<td class="px-2 py-4 whitespace-nowrap text-center">
|
||||
<input type="checkbox" class="entry-checkbox w-5 h-5 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500"
|
||||
data-id="${entry.id}" ${selectedEntries.has(entry.id) ? 'checked' : ''}>
|
||||
</td>
|
||||
` : '';
|
||||
` : '<td class="hidden"></td>';
|
||||
|
||||
row.innerHTML = checkboxCell + `
|
||||
<td class="px-2 py-4 whitespace-nowrap text-sm font-medium ${weekend ? 'text-blue-400' : 'text-gray-100'}">${dayOfWeek}</td>
|
||||
@@ -821,13 +821,13 @@ function renderMonthlyView(entries) {
|
||||
const locationIcon = location === 'home' ? '🏠' : '🏢';
|
||||
const locationText = location === 'home' ? 'Home' : 'Büro';
|
||||
|
||||
// Checkbox column (only in bulk edit mode)
|
||||
// Checkbox column (always present for consistent layout)
|
||||
const checkboxCell = bulkEditMode ? `
|
||||
<td class="px-2 py-4 whitespace-nowrap text-center">
|
||||
<input type="checkbox" class="entry-checkbox w-5 h-5 text-blue-600 bg-gray-700 border-gray-600 rounded focus:ring-blue-500"
|
||||
data-id="${entry.id}" ${selectedEntries.has(entry.id) ? 'checked' : ''}>
|
||||
</td>
|
||||
` : '';
|
||||
` : '<td class="hidden"></td>';
|
||||
|
||||
row.innerHTML = checkboxCell + `
|
||||
<td class="px-2 py-4 whitespace-nowrap text-sm font-medium ${weekend ? 'text-blue-400' : 'text-gray-100'}">${dayOfWeek}</td>
|
||||
@@ -866,9 +866,9 @@ function renderMonthlyView(entries) {
|
||||
|
||||
row.className = weekend ? 'hover:bg-gray-700 bg-gray-700' : 'hover:bg-gray-700 bg-red-900';
|
||||
|
||||
// Empty checkbox cell in bulk edit mode
|
||||
const checkboxCell = bulkEditMode ? '<td class="px-2 py-4"></td>' : '';
|
||||
const colspan = bulkEditMode ? '6' : '5';
|
||||
// Empty checkbox cell (always present for consistent layout)
|
||||
const checkboxCell = bulkEditMode ? '<td class="px-2 py-4"></td>' : '<td class="hidden"></td>';
|
||||
const colspan = bulkEditMode ? '5' : '5';
|
||||
|
||||
row.innerHTML = checkboxCell + `
|
||||
<td class="px-2 py-4 whitespace-nowrap text-sm font-medium ${weekend ? 'text-blue-400' : 'text-gray-100'}">${dayOfWeek}</td>
|
||||
|
||||
Reference in New Issue
Block a user