From af328742d0b5809db9afb6680aec88058e45a243 Mon Sep 17 00:00:00 2001 From: amdi-odoo Date: Wed, 7 Dec 2022 09:06:26 +0000 Subject: [PATCH 1/3] [FIX] survey: handle long chars Handle long chars display for single-line question answers by showing them on multiple lines in the print page. Task-2957775 Part-of: odoo/odoo#100168 --- addons/survey/views/survey_templates_print.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/survey/views/survey_templates_print.xml b/addons/survey/views/survey_templates_print.xml index 2d98b8ea9f1..ede6f44df29 100644 --- a/addons/survey/views/survey_templates_print.xml +++ b/addons/survey/views/survey_templates_print.xml @@ -58,7 +58,9 @@ - + + + From c4f954c808ec6a2abd24699fb0e52b424ad146c9 Mon Sep 17 00:00:00 2001 From: amdi-odoo Date: Thu, 20 Oct 2022 13:19:08 +0000 Subject: [PATCH 2/3] [IMP] survey: add no answer helper Display a no answers helper instead of the empty table and the alert message when a question doesn't have any answers. Task-2957775 Part-of: odoo/odoo#100168 --- .../src/scss/survey_templates_results.scss | 13 +++++++++++++ .../views/survey_templates_statistics.xml | 17 ++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/addons/survey/static/src/scss/survey_templates_results.scss b/addons/survey/static/src/scss/survey_templates_results.scss index d7d5e5e404e..c159c175098 100644 --- a/addons/survey/static/src/scss/survey_templates_results.scss +++ b/addons/survey/static/src/scss/survey_templates_results.scss @@ -95,3 +95,16 @@ font-weight: bold; } } + +.o_survey_no_answers::before { + width: 120px; + height: 80px; + background: transparent url(/web/static/img/empty_folder.svg) no-repeat center; + content: ""; + display: block; + margin-top: 50px; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; + z-index: 1; +} diff --git a/addons/survey/views/survey_templates_statistics.xml b/addons/survey/views/survey_templates_statistics.xml index 22bdd7b21b2..fd2b5bdf131 100644 --- a/addons/survey/views/survey_templates_statistics.xml +++ b/addons/survey/views/survey_templates_statistics.xml @@ -99,18 +99,17 @@ - From 4b7bfbc252db0f23d091139211e4bd9e64620d62 Mon Sep 17 00:00:00 2001 From: amdi-odoo Date: Tue, 17 Jan 2023 13:47:16 +0000 Subject: [PATCH 3/3] [IMP] survey: prevent table flicker Purpose ======= Prevent table with answers from flickering when having multiple pages with different items count. Specifications ============== Adjust the table height to the question types to keep the pagination buttons on the same level while switching pages. Each table line is expected to be, for the text_box questions, 3 lines height and for the char_box, numerical, date and datetime question types (+ comments), only one line height. Adding a scrollbar if the table height is greater than expected. For the text, char, number, date and datetime question type (+ comments), set the input line id cells width to a percentage to avoid horizontal flicker while changing pages and to reduce first column width. Task-2957775 Part-of: odoo/odoo#100168 --- .../src/scss/survey_templates_results.scss | 8 + .../views/survey_templates_statistics.xml | 143 ++++++++++-------- 2 files changed, 87 insertions(+), 64 deletions(-) diff --git a/addons/survey/static/src/scss/survey_templates_results.scss b/addons/survey/static/src/scss/survey_templates_results.scss index c159c175098..a7de7bfec9c 100644 --- a/addons/survey/static/src/scss/survey_templates_results.scss +++ b/addons/survey/static/src/scss/survey_templates_results.scss @@ -94,6 +94,14 @@ border-color: #DEE2E6; font-weight: bold; } + table { + font-size: 1rem; + &.o_survey_results_table_indexed { + td:first-child { + width: 7%; + } + } + } } .o_survey_no_answers::before { diff --git a/addons/survey/views/survey_templates_statistics.xml b/addons/survey/views/survey_templates_statistics.xml index fd2b5bdf131..ff88df386f4 100644 --- a/addons/survey/views/survey_templates_statistics.xml +++ b/addons/survey/views/survey_templates_statistics.xml @@ -63,6 +63,10 @@ + + +
@@ -190,38 +194,43 @@ @@ -300,36 +309,40 @@
- - - - - - - - - - - - + + +
+
#User Responses
- - - - - - - - - - - - - -
+ + + + - - -
#User Responses
+ + + + + + + + + + + + + + + + + + + + + + + + +
@@ -474,7 +487,7 @@