Skip to content

Commit

Permalink
Fix toast messages to use correct colors in dark mode too.
Browse files Browse the repository at this point in the history
  • Loading branch information
emaijala committed Dec 13, 2024
1 parent 4b430fe commit 8aa612f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions js/mlinvoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ var MLInvoice = (function CreateMLInvoice() {
if (typeof colorClasses !== 'undefined') {
$toast.addClass(colorClasses);
} else {
$toast.addClass('text-white bg-success');
$toast.addClass('text-success-emphasis bg-success-subtle');
}
var $flex = $('<div class="d-flex">')
.appendTo($toast);
Expand Down Expand Up @@ -334,7 +334,12 @@ var MLInvoice = (function CreateMLInvoice() {

function errormsg(msg, timeout)
{
infomsg(msg, timeout, 'text-white bg-danger');
infomsg(msg, timeout, 'text-danger-emphasis bg-danger-subtle');
}

function warningmsg(msg, timeout)
{
infomsg(msg, timeout, 'text-warning-emphasis bg-warning-subtle');
}

function clearMessages()
Expand Down Expand Up @@ -803,6 +808,7 @@ var MLInvoice = (function CreateMLInvoice() {
updateRowSelectedState: updateRowSelectedState,
infomsg: infomsg,
errormsg: errormsg,
warningmsg: warningmsg,
editUnitPrice: editUnitPrice,
setCurrencyDecimals: setCurrencyDecimals,
getDateFormat: getDateFormat,
Expand Down
4 changes: 2 additions & 2 deletions js/mlinvoice.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/mlinvoice.min.js.map

Large diffs are not rendered by default.

0 comments on commit 8aa612f

Please sign in to comment.