Clear all lines asks in redmine_dark_mode's dialog when it's installed

On dark pages the confirmation is dark instead of the browser's bright box; without redmine_dark_mode
it's the browser's box as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-02 22:22:51 -05:00
1 parent 839ac976e6
commit ec00684edd
1 file changed
+12 -4
+12 -4
View File
@@ -415,10 +415,18 @@ $(function () {
});
$('#qbo-estimate-clear-lines').on('click', function () {
if (!window.confirm($(this).data('confirmText'))) return;
rows().remove();
addRow(); addRow();
changed();
function clearLines() {
rows().remove();
addRow(); addRow();
changed();
}
// redmine_dark_mode asks in a dark dialog on dark pages; otherwise the browser's own box
var message = $(this).data('confirmText');
if (window.RedmineDarkMode && window.RedmineDarkMode.confirm) {
window.RedmineDarkMode.confirm(message, clearLines);
} else if (window.confirm(message)) {
clearLines();
}
});
// Drag lines by the handle to reorder them; they're saved in table order