Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions dqgen/resources/html_templates/static/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@
margin-top: 0.5em;
}

/* Enable horizontal scrolling for wide tables */
#print-container {
overflow-x: auto;
}

.dataTables_wrapper {
overflow-x: auto;
}

table.display {
width: 100% !important;
min-width: 100%;
Comment on lines 65 to 67

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow DataTables to set its own table width

The added CSS sets table.display { width: 100% !important; }, which overrides the inline width that DataTables applies when scrollX: true. With the fixed width in place, the table can never grow beyond its container, so no horizontal scrollbar appears and wide tables remain truncated. Dropping the !important or the fixed width lets DataTables expand the table and enables the scroll behaviour.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed along with updating the table for screen resizes

}

@media print {
#toc {
visibility: hidden;
Expand Down Expand Up @@ -122,9 +136,8 @@ <h1 class="ui header center aligned reportTitle" id="skip-toc">{{ conf.title }}<
'print'
],
"lengthMenu": [[5, 15, 30, -1], [5, 15, 30, "All"]],
responsive: {
details: true
}
scrollX: true,
autoWidth: false
});
$("h2").each(function () {
if (!$(this).next().is("section") && !$(this).next().is("h3") && !$(this).next().hasClass("dataTables_wrapper")) {
Expand Down