summaryrefslogtreecommitdiff
path: root/addons/survey/static/src/scss
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/survey/static/src/scss
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/survey/static/src/scss')
-rw-r--r--addons/survey/static/src/scss/survey_form.scss422
-rw-r--r--addons/survey/static/src/scss/survey_reports.scss196
-rw-r--r--addons/survey/static/src/scss/survey_views.scss26
3 files changed, 644 insertions, 0 deletions
diff --git a/addons/survey/static/src/scss/survey_form.scss b/addons/survey/static/src/scss/survey_form.scss
new file mode 100644
index 00000000..270b0e61
--- /dev/null
+++ b/addons/survey/static/src/scss/survey_form.scss
@@ -0,0 +1,422 @@
+/**********************************************************
+ Remove website navbar : Should be done in website survey
+ but we won't do a bridge module only for this.
+ TODO: SmartPeople Fixme - cleaner solution? be my guest!
+ **********************************************************/
+body.o_connected_user {
+ padding-top: 0px !important;
+}
+
+nav#oe_main_menu_navbar {
+ display: none;
+}
+
+/**********************************************************
+ Common Style
+ **********************************************************/
+.o_survey_wrap {
+ min-height: 100%;
+}
+
+.o_survey_progress_wrapper {
+ min-width: 11rem;
+ max-width: 15rem;
+
+ .o_survey_progress {
+ height:0.5em;
+ }
+}
+
+.o_survey_navigation_wrapper .o_survey_navigation_submit {
+ cursor: pointer;
+}
+
+.o_survey_timer {
+ min-height: 1.2rem;
+}
+
+.o_survey_brand_message {
+ background-color: rgba(255,255,255,0.7);
+}
+
+.o_survey_form, .o_survey_print, .o_survey_session_manage, .o_survey_quick_access {
+ .o_survey_question_error {
+ height: 0px;
+ transition: height .5s ease;
+ line-height: 4rem;
+ &.slide_in {
+ height: 4rem;
+ }
+ }
+
+ fieldset[disabled] {
+ .o_survey_question_text_box,
+ .o_survey_question_date,
+ .o_survey_question_datetime,
+ .o_survey_question_numerical_box {
+ padding-left: 0px;
+ }
+ }
+
+ .o_survey_question_text_box,
+ .o_survey_question_date,
+ .o_survey_question_datetime,
+ .o_survey_question_numerical_box {
+ border: 0px;
+ border-bottom: 1px solid $primary;
+ &:disabled {
+ color: black !important;
+ border-color: $gray-600;
+ border-bottom: 1px solid $gray-600;
+ }
+ &:focus {
+ box-shadow: none;
+ }
+ }
+
+ .o_survey_form_date .input-group-append {
+ right: 0;
+ bottom: 5px;
+ top: auto;
+ }
+
+ .o_survey_choice_btn {
+ transition: background-color 0.3s ease;
+ flex: 1 0 300px;
+ color: $primary;
+
+ span {
+ line-height: 25px;
+ }
+ i {
+ top: 0px;
+ font-size: large;
+ &.fa-check-circle,&.fa-check-square {
+ display: none;
+ }
+ }
+
+ &.o_survey_selected i {
+ display: none;
+ &.fa-check-circle,&.fa-check-square {
+ display: inline;
+ }
+ }
+ }
+
+ input::placeholder, textarea::placeholder {
+ font-weight: 300;
+ }
+
+ .o_survey_page_per_question.o_survey_simple_choice.o_survey_minimized_display,
+ .o_survey_page_per_question.o_survey_multiple_choice.o_survey_minimized_display,
+ .o_survey_page_per_question.o_survey_numerical_box,
+ .o_survey_page_per_question.o_survey_date,
+ .o_survey_page_per_question.o_survey_datetime {
+ // 'pixel perfect' layouting for choice questions having less than 5 choices in page_per_question mode
+ // we use media queries instead of bootstrap classes because they don't provide everything needed here
+ @media (min-width: 768px) {
+ width: 50%;
+ position: relative;
+ left: 25%;
+ }
+ }
+
+ .o_survey_question_matrix {
+ td {
+ min-width: 100px;
+ i {
+ font-size: 22px;
+ display: none;
+ &.o_survey_matrix_empty_checkbox {
+ display: inline;
+ }
+ }
+ .o_survey_choice_key {
+ left: 10px;
+ right: auto;
+ top: 12px;
+ > span > span {
+ top: 0px;
+ }
+ }
+
+ &.o_survey_selected {
+ i {
+ display: inline;
+ &.o_survey_matrix_empty_checkbox {
+ display: none;
+ }
+ }
+ }
+ }
+ thead {
+ th:first-child {
+ border-top-left-radius: .25rem;
+ }
+ th:last-child {
+ border-top-right-radius: .25rem;
+ }
+ }
+ tbody tr:last-child {
+ th {
+ border-bottom-left-radius: .25rem;
+ }
+ td:last-child {
+ border-bottom-right-radius: .25rem;
+ }
+ }
+ }
+}
+
+.o_survey_form, .o_survey_session_manage {
+ .o_survey_question_matrix {
+ th {
+ background-color: $primary;
+ }
+ td {
+ background-color: rgba($primary, 0.2);
+ }
+ }
+}
+
+/**********************************************************
+ Form Specific Style
+ **********************************************************/
+
+.o_survey_form {
+ min-height: 25rem;
+
+ .o_survey_choice_btn {
+ cursor: pointer;
+ background-color: rgba($primary, 0.1);
+ box-shadow: $primary 0px 0px 0px 1px;
+
+ &.o_survey_selected {
+ box-shadow: $primary 0px 0px 0px 2px;
+ }
+
+ &:hover {
+ background-color: rgba($primary, 0.3);
+ .o_survey_choice_key span.o_survey_key {
+ opacity: 1;
+ }
+ }
+ }
+
+ .o_survey_choice_key {
+ width: 25px;
+ height: 25px;
+ border: 1px solid $primary;
+ span {
+ font-size: smaller;
+ top: -1px;
+ &.o_survey_key {
+ right: 21px;
+ border: 1px solid $primary;
+ border-right: 0px;
+ height: 25px;
+ transition: opacity 0.4s ease;
+ white-space: nowrap;
+ opacity: 0;
+ span {
+ top: -2px;
+ }
+ }
+ }
+ }
+
+ .o_survey_question_matrix td:hover {
+ background-color: rgba($primary, 0.5);
+ cursor: pointer;
+ .o_survey_choice_key span.o_survey_key {
+ opacity: 1;
+ }
+ }
+}
+
+/**********************************************************
+ Survey Session Specific Style
+ **********************************************************/
+
+.o_survey_session_manage {
+ h1 {
+ font-size: 3rem;
+ }
+
+ h2 {
+ font-size: 2.5rem;
+ }
+
+ .o_survey_session_navigation {
+ position: fixed;
+ padding: 1rem;
+ top: calc(50% - 0.5rem);
+ cursor: pointer;
+
+ &.o_survey_session_navigation_next {
+ right: 2rem;
+ }
+
+ &.o_survey_session_navigation_previous {
+ left: 2rem;
+ }
+ }
+
+ .o_survey_manage_fontsize_14 {
+ font-size: 1.4rem;
+ }
+
+ .o_survey_question_header {
+ top: 1em;
+ > div {
+ width: 400px;
+ }
+ .progress {
+ height: 2rem;
+ border-radius: 0.6rem;
+ font-size: 1.2rem;
+ background-color: #cfcfcf;
+ .progress-bar {
+ width: 0%;
+ transition: width 1s ease;
+ }
+ }
+ }
+
+ .o_survey_session_manage_container {
+ .o_survey_choice_key {
+ display: none;
+ }
+
+ &.pt-6 {
+ padding-top: 5rem !important;
+ }
+
+ .o_survey_session_results {
+ display: flex; // here and not d-flex because we need to be able to fade-out
+
+ .mb-6 {
+ margin-bottom: 6rem;
+ }
+
+ .o_survey_session_text_answer {
+ .o_survey_session_text_answer_container {
+ border: solid 1.6px;
+ border-radius: 0.6rem;
+ font-size: 1.4rem;
+ width: 2rem;
+ opacity: .1;
+ transition: width .4s ease, opacity .4s ease;
+ overflow: hidden;
+ }
+
+ span {
+ white-space: nowrap;
+ }
+ }
+ }
+
+ .o_survey_session_leaderboard {
+ display: flex; // here and not d-flex because we need to be able to fade-out
+ .o_survey_leaderboard_buttons {
+ line-height: 4rem;
+ font-variant: small-caps;
+ }
+ }
+ }
+
+ .o_survey_session_copy {
+ cursor: pointer;
+ opacity: .75;
+ transition: opacity .3s ease;
+ &:hover {
+ opacity: 1;
+ }
+ }
+}
+
+.o_survey_session_leaderboard {
+ font-size: 1.4rem;
+
+ .o_survey_session_leaderboard_container {
+ height: calc(2.8rem * 15);
+ }
+
+ .o_survey_session_leaderboard_item {
+ line-height: 2.4rem;
+ width: 100%;
+ transition: top ease-in-out .3s;
+
+ .o_survey_session_leaderboard_score {
+ width: 6.5rem;
+ padding-top: .2rem;
+ height: 2.8rem;
+ }
+
+ .o_survey_session_leaderboard_bar, .o_survey_session_leaderboard_bar_question {
+ height: 2.8rem;
+ }
+
+ .o_survey_session_leaderboard_bar {
+ min-width: 3rem;
+ background-color: #007A77;
+ z-index: 2;
+ }
+
+ .o_survey_session_leaderboard_bar_question_score {
+ top: .2rem;
+ right: .5rem;
+ width: 20rem;
+ z-index: 1;
+ }
+
+ .o_survey_session_leaderboard_name {
+ padding-top: .2rem;
+ width: 7.5rem;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+}
+
+/**********************************************************
+ Print Specific Style
+ **********************************************************/
+
+.o_survey_print {
+ .o_survey_choice_btn {
+ background-color: $gray-500;
+ border-color: transparent;
+ cursor: default;
+ color: white; // not bootstrap to customize for survey_print only
+ font-weight: bold; // not bootstrap to customize for survey_print only
+
+ &.bg-success, &.bg-danger {
+ opacity: 0.6;
+ }
+ &.o_survey_selected {
+ background-color: $gray-600;
+ opacity: 1;
+ }
+ i.fa-square-o, i.fa-circle-thin {
+ display: none;
+ }
+ }
+ .o_survey_question_matrix {
+ th {
+ /* important needed to force override bg-primary set on th in the template */
+ background-color: $gray-600 !important;
+ }
+ td {
+ background-color: $gray-200;
+ &:hover {
+ cursor: default;
+ }
+ }
+ i.fa-check-square, i.fa-check-circle, i.o_survey_matrix_empty_checkbox {
+ color: $gray-600;
+ }
+ }
+}
diff --git a/addons/survey/static/src/scss/survey_reports.scss b/addons/survey/static/src/scss/survey_reports.scss
new file mode 100644
index 00000000..2cdb5a0a
--- /dev/null
+++ b/addons/survey/static/src/scss/survey_reports.scss
@@ -0,0 +1,196 @@
+@font-face {
+ font-family: certification-cursive;
+ src: url(/survey/static/src/fonts/MrDeHaviland-Regular.ttf);
+}
+@font-face {
+ font-family: certification-serif;
+ src: url(/survey/static/src/fonts/ETHOS-REGULAR.OTF);
+}
+@font-face {
+ font-family: certification-modern;
+ src: url(/survey/static/src/fonts/Oswald-Light.ttf);
+}
+
+#o_survey_certification.certification-wrapper {
+ width: 250mm;
+ height: 280mm;
+ display: flex;
+ background-size: 100% 100%;
+ background-color: #875A7B;
+
+ &.blue {
+ background-color: #4761e2;
+ }
+
+ &.gold {
+ background-color: #af881a;
+ }
+
+ .certification {
+ position: relative;
+ width: 100%;
+ height: 100%;
+
+ .test-entry {
+ top: 0px;
+ left: 0px;
+ position: absolute;
+ content: '';
+ height: 610px;
+ width: 860px;
+ background: url(/survey/static/src/img/watermark.png) no-repeat;
+ background-size: 100% 100%;
+ background-position: center;
+ }
+ }
+
+ &.classic {
+ padding: 5mm;
+ background-image: url(/survey/static/src/img/certification_bg_classic_default.jpg);
+ color: #3e2e3a;
+
+ &.blue {
+ background-image: url(/survey/static/src/img/certification_bg_classic_blue.jpg);
+ color: #272d4f;
+ }
+
+ &.gold {
+ background-image: url(/survey/static/src/img/certification_bg_classic_gold.jpg);
+ color: #5A4721;
+ }
+
+ .certification {
+ padding: 20mm;
+ font-family: certification-serif, serif;
+ font-family: Times;
+ text-align: center;
+ color: inherit;
+
+ .certification-name-label {
+ padding: 5mm 0 8mm;
+ }
+
+ .certification-name {
+ font-size: 45pt;
+ line-height: 0.9;
+ text-transform: uppercase;
+ letter-spacing: 0.2mm;
+ }
+
+ .user-name {
+ padding-bottom: 6mm;
+ padding-top: 3mm;
+ font-family: certification-cursive, cursive;
+ letter-spacing: -0.2mm;
+ word-spacing: 0.2mm;
+ font-size: 60pt;
+ }
+
+ hr {
+ border-color: inherit;
+ margin: 15mm auto;
+ opacity: 0.6;
+ width: 50mm;
+
+ &.small {
+ margin: 2mm auto;
+ }
+ }
+
+ .certification-description, .certification-date {
+ padding: 5mm 40mm 10mm;
+ }
+
+ .certificate-signature {
+ position: absolute;
+ bottom: 10mm;
+ right: 10mm;
+ left: 10mm;
+ font-size: 14pt;
+
+ img {
+ max-width: 40mm;
+ max-height: 40mm;
+ }
+ }
+ }
+ }
+
+ &.modern {
+ background-image: url(/survey/static/src/img/certification_bg_modern.png);
+
+ .certification {
+ padding-left: 40mm;
+ padding-right: 40mm;
+ font-family: certification-modern, sans-serif;
+ color: #223541;
+
+ .certification-bg-dark {
+ display: inline-block;
+ background-color: #223541;
+ background: rgba(34, 53, 65, 0.1);
+ }
+
+ .certification-top {
+ .certification-bg-dark {
+ margin-bottom: 10mm;
+ padding: 20mm 6mm 5mm;
+ text-align: center;
+ width: 56mm;
+ }
+
+ .certification-company-wrapper {
+ padding: 1mm 2mm;
+
+ img {
+ max-width: 40mm;
+ max-height: 30mm;
+ }
+ }
+
+ .certification-name {
+ text-transform: uppercase;
+ font-size: 40pt;
+ line-height: 0.9;
+ }
+ }
+
+ .certification-bottom {
+ padding: 60mm 0 10mm;
+ font-size: 16pt;
+
+ .user-name {
+ margin-bottom: 20mm;
+ font-family: certification-cursive, cursive;
+ font-size: 50pt;
+ }
+
+ .certification-bottom-group {
+ position: absolute;
+ bottom: 0;
+ right: 40mm;
+ left: 40mm;
+ top: 220mm;
+
+ > div {
+ display: inline-block;
+ height: 100%;
+ float: left;
+ bottom: 0;
+ top: 0;
+ }
+
+ .certification-bg-dark {
+ width: 56mm;
+ max-height: 100%;
+ }
+
+ .certification-date {
+ padding-right: 30mm;
+ padding-left: 15mm;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/addons/survey/static/src/scss/survey_views.scss b/addons/survey/static/src/scss/survey_views.scss
new file mode 100644
index 00000000..6a0f4ddb
--- /dev/null
+++ b/addons/survey/static/src/scss/survey_views.scss
@@ -0,0 +1,26 @@
+.o_kanban_card_survey {
+ & > .row {
+ min-height: 60px;
+ }
+}
+
+.o_kanban_card_survey_successed{
+ background-image:
+ linear-gradient(rgba(255,255,255,.9),
+ rgba(255,255,255,.9)),
+ url(/survey/static/src/img/trophy-solid.svg);
+ background-repeat: no-repeat;
+ background-position: bottom 6px left -45px;
+ background-size: 100%, 100px;
+}
+
+table.o_section_list_view tr.o_data_row.o_is_section {
+ font-weight: bold;
+ background-color: #DDD;
+ border-top: 1px solid #BBB;
+ border-bottom: 1px solid #BBB;
+}
+
+.icon_rotates {
+ transform: rotate(180deg);
+}