Fix dblclick: clear selection, select entry, render, open edit. closeEdit calls render. Trash FAB: moved from toolbar to floating button at bottom-left (like add FAB).
This commit is contained in:
@@ -291,7 +291,7 @@ function toggleTrash() {
|
||||
showTrash = !showTrash;
|
||||
const btn = document.getElementById('trashBtn');
|
||||
const actions = document.getElementById('trashActions');
|
||||
if (btn) { btn.textContent = showTrash ? '📋 Active' : '🗑️ Trash'; btn.classList.toggle('btn-danger', showTrash); }
|
||||
if (btn) { btn.textContent = showTrash ? '📋' : '🗑️'; btn.classList.toggle('active', showTrash); btn.title = showTrash ? 'Active entries' : 'Trash'; }
|
||||
if (actions) actions.classList.toggle('hidden', !showTrash);
|
||||
loadEntries();
|
||||
playSound('click');
|
||||
@@ -1000,10 +1000,11 @@ function attachEvents() {
|
||||
el.addEventListener('dblclick', function(ev) {
|
||||
const id = this.dataset.id;
|
||||
if (id && !showTrash) {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
selectedIds.clear();
|
||||
selectedIds.add(parseInt(id));
|
||||
updateBatchBar();
|
||||
render();
|
||||
openEdit(id);
|
||||
}
|
||||
});
|
||||
@@ -1056,7 +1057,7 @@ function openEdit(id) {
|
||||
document.getElementById('editSite').focus();
|
||||
playSound('open');
|
||||
}
|
||||
function closeEdit() { document.getElementById('editModal').classList.remove('show'); playSound('close'); }
|
||||
function closeEdit() { document.getElementById('editModal').classList.remove('show'); render(); playSound('close'); }
|
||||
function toggleEditPassword() { const f = document.getElementById('editPassword'); f.type = f.type === 'password' ? 'text' : 'password'; }
|
||||
async function saveEdit() {
|
||||
const id = document.getElementById('editId').value;
|
||||
|
||||
Reference in New Issue
Block a user