mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
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:
1 parent
839ac976e6
commit
ec00684edd
1 file changed
+12
-4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user