[FIX] survey: ensure same color in community and enterprise while taking surveys

Use $primary to always get same color in COM and ENT. The goal of using color
variable for styling is to get always the same color, no matter if we are in
community or on enterprise.

Before this commit, *$o-brand-primary* was used in survey stylesheet but this
variable is not matching the same colors in COM and in ENT.

After this commit, *$primary* is used to render the same color no matter the
environment (COM or ENT).

Triggered by task ID 1972640 (live sessions on survey)
PR #44205
This commit is contained in:
David Beguin
2020-01-29 14:33:36 +00:00
committed by Thibault Delavallée
parent 6ff7c59a02
commit a8b3800a9c
2 changed files with 14 additions and 12 deletions
+11 -11
View File
@@ -21,14 +21,14 @@
.o_survey_question_datetime,
.o_survey_question_numerical_box {
border: 0px;
border-bottom: 2px solid $o-brand-primary;
border-bottom: 2px solid $primary;
&:disabled {
color: black !important;
border-color: $gray-600;
border-bottom: 2px solid $gray-600;
}
&:focus {
border-color: $o-brand-primary;
border-color: $primary;
}
}
@@ -96,16 +96,16 @@
min-height: 100%;
.o_survey_choice_btn {
background-color: rgba($o-brand-primary, 0.5);
border: 2px solid $o-brand-primary;
background-color: rgba($primary, 0.5);
border: 2px solid $primary;
cursor: pointer;
&.o_survey_selected {
background-color: $o-brand-primary;
background-color: $primary;
}
&:hover {
background-color: rgba($o-brand-primary, 0.8);
background-color: rgba($primary, 0.8);
.o_survey_choice_key span.o_survey_key {
opacity: 1;
}
@@ -115,14 +115,14 @@
.o_survey_choice_key {
width: 25px;
height: 25px;
border: 2px solid $o-brand-primary;
border: 2px solid $primary;
span {
font-size: smaller;
top: -2px;
&.o_survey_key {
width: inherit;
right: 10px;
border: 2px solid $o-brand-primary;
border: 2px solid $primary;
border-right: 0px;
height: 25px;
opacity: 0;
@@ -134,13 +134,13 @@
.o_survey_question_matrix {
th {
background-color: $o-brand-primary;
background-color: $primary;
}
td {
background-color: rgba($o-brand-primary, 0.2);
background-color: rgba($primary, 0.2);
&:hover {
background-color: rgba($o-brand-primary, 0.5);
background-color: rgba($primary, 0.5);
cursor: pointer;
.o_survey_choice_key span.o_survey_key {
opacity: 1;
+3 -1
View File
@@ -13,7 +13,9 @@
<script type="text/javascript" src="/survey/static/src/js/survey_print.js" />
<script type="text/javascript" src="/survey/static/src/js/survey_result.js" />
<t t-call="web._assets_helpers"/>
<t t-call="web._assets_helpers">
<t t-call="web._assets_frontend_helpers"/>
</t>
<link href="/survey/static/src/css/survey_print.css" rel="stylesheet" type="text/css"/>
<link href="/survey/static/src/css/survey_result.css" rel="stylesheet" type="text/css"></link>
<link rel="stylesheet" type="text/scss" href="/survey/static/src/scss/survey_form.scss"/>