Skip to content

Commit

Permalink
Display line breaks in data tables
Browse files Browse the repository at this point in the history
Some values might contain line breaks, for example the relatively
new setting SCENARIO_DEFINITIONS_YAML. Before everything was
printed in one line. Line breaks got lost.
  • Loading branch information
perlpunk committed Jul 21, 2023
1 parent 877fa4a commit c2846e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/javascripts/audit_log.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function showScheduledProductModalDialog(title, body) {
}

function renderScheduledProductSettings(settings) {
const table = $('<table/>').addClass('table table-striped');
const table = $('<table/>').addClass('table table-striped settings-table');
for (const [key, value] of Object.entries(settings || {})) {
table.append(
$('<tr/>')
Expand Down
6 changes: 5 additions & 1 deletion assets/stylesheets/tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@
text-align: center;
}
}

table.settings-table tr {
td span {
white-space: pre;
}
}
table.dataTable {
td.name {
text-align: left;
Expand Down

0 comments on commit c2846e6

Please sign in to comment.