Fix batch confirm: modal overlay + positioned beside button
Replace showCenterConfirm with showBatchConfirm(btn,message,callback) that creates a transparent modal overlay (z-index 9999) to block background clicks, positions the confirm dialog beside the trigger button. Updated all callers (batchDelete, batchPermanentDelete, permanentDelete, emptyTrash) to pass the clicked button. Added CSS for batch-confirm-overlay backdrop.
This commit is contained in:
+4
-2
@@ -215,7 +215,7 @@ input:focus, select:focus { border-color:var(--accent); }
|
||||
/* Trash */
|
||||
.trash-badge { background:var(--danger); color:#fff; padding:0.15rem 0.5rem; border-radius:1rem; font-size:0.65rem; margin-left:0.3rem; }
|
||||
.trash-info { font-size:0.7rem; color:var(--text2); margin-top:0.2rem; }
|
||||
.restore-btn { background:var(--success); color:#fff; border:none; padding:0.2rem 0.6rem; border-radius:1.5rem; cursor:pointer; font-size:0.7rem; }
|
||||
.restore-btn { background:none; color:#fff; border:none; padding:0.2rem 0.6rem; border-radius:1.5rem; cursor:pointer; font-size:0.7rem; }
|
||||
.restore-btn:hover { filter:brightness(1.2); }
|
||||
.empty-trash-btn { background:var(--danger); color:#fff; border:none; padding:0.3rem 0.8rem; border-radius:1.5rem; cursor:pointer; font-size:0.75rem; }
|
||||
.empty-trash-btn:hover { filter:brightness(1.2); }
|
||||
@@ -331,4 +331,6 @@ input:focus, select:focus { border-color:var(--accent); }
|
||||
border-color:var(--danger)!important;
|
||||
box-shadow:0 0 15px rgba(239,68,68,0.4);
|
||||
background:rgba(239,68,68,0.15);
|
||||
}
|
||||
}
|
||||
/* Batch confirm modal backdrop */
|
||||
.batch-confirm-overlay { background:rgba(0,0,0,0.3); }
|
||||
Reference in New Issue
Block a user