From 3e14492ae826ea409cba034343a5a4a42810f149 Mon Sep 17 00:00:00 2001 From: FahrJo Date: Thu, 14 Mar 2024 01:37:51 +0000 Subject: [PATCH 1/4] add print styles Signed-off-by: FahrJo --- src/pages/Table.vue | 73 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/src/pages/Table.vue b/src/pages/Table.vue index 70a7069c7..3461e21d0 100644 --- a/src/pages/Table.vue +++ b/src/pages/Table.vue @@ -43,4 +43,77 @@ export default { width: max-content; min-width: var(--app-content-width, 100%); } + +@page { + size: auto; + margin: 5mm; +} + +@media print { + html, body { + background: var(--color-main-background, white) !important; + } + + html { + overflow-y: scroll; + } + + body { + position: absolute; + } + + /* hide toast notifications for printing */ + .toastify.dialogs { + display: none; + } + + .app-navigation { + display: none !important; + } + + #header { + display: none !important; + } + + #content-vue { + display: block !important; + position: static; + overflow: auto; + height: auto; + } + + .main-table-view, .main-view-view { + width: auto; + min-width: 0; + } + + .table-dashboard { + display: none !important; + } + + .row.space-T { + display: none !important; + } + + #app-content-vue .options.row { + display: none !important; + } + + #app-content-vue table { + table-layout: fixed; + } + + #app-content-vue table td, #app-content-vue table th { + white-space: normal !important; + word-break: normal !important; + word-wrap: break-word !important; + } + + #app-content-vue table tr > th.sticky:first-child, + #app-content-vue table tr > td.sticky:first-child, + #app-content-vue table tr > th.sticky:last-child, + #app-content-vue table tr > td.sticky:last-child { + display: none !important; + } +} From 3681e0531dde46c163270ebae1b3d899572dccef Mon Sep 17 00:00:00 2001 From: FahrJo Date: Thu, 14 Mar 2024 11:59:34 +0000 Subject: [PATCH 2/4] improve css for printing wide tables Signed-off-by: FahrJo --- src/pages/Table.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/pages/Table.vue b/src/pages/Table.vue index 3461e21d0..6a7bd9a3e 100644 --- a/src/pages/Table.vue +++ b/src/pages/Table.vue @@ -100,13 +100,24 @@ export default { } #app-content-vue table { - table-layout: fixed; + table-layout: auto !important; } #app-content-vue table td, #app-content-vue table th { white-space: normal !important; word-break: normal !important; word-wrap: break-word !important; + width: auto !important; + } + + #app-content-vue table th .menu { + display: none !important; + } + + #app-content-vue table td .tiptap-reader-cell { + max-height: fit-content; + min-width: 200px; + max-width: fit-content; } #app-content-vue table tr > th.sticky:first-child, From 458b98556f3ab23e94de6a16bb78b51c01d4f9d3 Mon Sep 17 00:00:00 2001 From: FahrJo Date: Thu, 14 Mar 2024 13:02:32 +0000 Subject: [PATCH 3/4] improve css print alignments Signed-off-by: FahrJo --- src/pages/Table.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/pages/Table.vue b/src/pages/Table.vue index 6a7bd9a3e..521b158d2 100644 --- a/src/pages/Table.vue +++ b/src/pages/Table.vue @@ -82,6 +82,10 @@ export default { height: auto; } + #content-vue .row.first-row { + padding-left: 0px; + } + .main-table-view, .main-view-view { width: auto; min-width: 0; @@ -100,7 +104,7 @@ export default { } #app-content-vue table { - table-layout: auto !important; + table-layout: fixed; } #app-content-vue table td, #app-content-vue table th { @@ -110,13 +114,16 @@ export default { width: auto !important; } + #app-content-vue table th .clickable { + overflow-wrap: anywhere; + } + #app-content-vue table th .menu { display: none !important; } #app-content-vue table td .tiptap-reader-cell { max-height: fit-content; - min-width: 200px; max-width: fit-content; } From 08af97e1438b05987bf4c67f891a0d321e6f8aad Mon Sep 17 00:00:00 2001 From: FahrJo Date: Thu, 14 Mar 2024 15:14:49 +0000 Subject: [PATCH 4/4] fix linting Signed-off-by: FahrJo --- src/pages/Table.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Table.vue b/src/pages/Table.vue index 521b158d2..329a898ce 100644 --- a/src/pages/Table.vue +++ b/src/pages/Table.vue @@ -111,13 +111,13 @@ export default { white-space: normal !important; word-break: normal !important; word-wrap: break-word !important; - width: auto !important; + width: auto !important; } #app-content-vue table th .clickable { overflow-wrap: anywhere; } - + #app-content-vue table th .menu { display: none !important; }