[IMP] *: adapt for dark-mode

*: hr, hr_holidays, project, purchase, point_of_sale, rating,
spreadsheet_dashboard, stock, survey

This commit adapts modules and components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
This commit is contained in:
stefanorigano (SRI)
2022-10-11 13:15:54 +02:00
committed by Pierre Paridans
parent f84b9b7ef3
commit d53d432361
17 changed files with 38 additions and 26 deletions
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M83.13,35.69a7.9,7.9,0,0,0-4.94-7.33L34.33,72.22H47.06L83.13,36.15Z" style="fill:#bb86fc"/><path d="M53.39,27.78,16.87,64.3h0a7.9,7.9,0,0,0,5.21,7.43l44-44Z" style="fill:#bb86fc"/><path d="M24.78,27.78a7.91,7.91,0,0,0-7.91,7.91V51.57L40.66,27.78Z" style="fill:#bb86fc"/><path d="M59.78,72.22H75.22a7.91,7.91,0,0,0,7.91-7.91V48.87Z" style="fill:#bb86fc"/></svg>

After

Width:  |  Height:  |  Size: 432 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M21.93,55H78.07a5,5,0,0,0,0-10H21.93a5,5,0,0,0,0,10Z" style="fill:#bb86fc"/></svg>

After

Width:  |  Height:  |  Size: 154 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="16.87" y="27.78" width="66.26" height="44.44" rx="7.91" style="fill:#bb86fc"/></svg>

After

Width:  |  Height:  |  Size: 156 B

@@ -24,6 +24,7 @@
img {
height: 30px;
filter: var(--timeOffCard-icon-filter);
}
}
@@ -0,0 +1,15 @@
.o_calendar_filter img {
width:30px;
&.o_calendar_filter_plain {
content:var(--calendarFilter-icon--plain);
}
&.o_calendar_filter_hatched {
content:var(--calendarFilter-icon--hatched);
}
&.o_calendar_filter_line {
content:var(--calendarFilter-icon--line);
}
}
@@ -7,9 +7,9 @@
<h5>Legend</h5>
<div class="d-flex flex-column">
<span><img src="/hr/static/src/img/icons/plain.svg" width="30px"/> Validated</span>
<span><img src="/hr/static/src/img/icons/hatched.svg" width="30px"/> To Approve</span>
<span><img src="/hr/static/src/img/icons/line.svg" width="30px"/> Refused</span>
<span><img class="o_calendar_filter_plain" src="/hr/static/src/img/icons/plain.svg"/> Validated</span>
<span><img class="o_calendar_filter_hatched" src="/hr/static/src/img/icons/hatched.svg"/> To Approve</span>
<span><img class="o_calendar_filter_line" src="/hr/static/src/img/icons/line.svg"/> Refused</span>
</div>
</div>
</xpath>
+1 -2
View File
@@ -50,8 +50,7 @@
<xpath expr="//div[hasclass('o_kanban_card_lower_content')]" position="inside">
<t groups="hr_holidays.group_hr_holidays_user">
<div class="row o_kanban_primary_bottom bottom_block"
style="background-color: white"
<div class="row o_kanban_primary_bottom bottom_block bg-view"
t-if="record.absence_of_today.raw_value > 0">
<div class="col-3">
<a name="%(hr_employee_action_from_department)d" type="action" title="Absent Employee(s), Whose time off requests are either confirmed or validated on today">Absence</a>
@@ -19,7 +19,7 @@
</t>
<div class="app_settings_block" data-string="Point of sale" string="Point of Sale" data-key="point_of_sale" groups="point_of_sale.group_pos_manager">
<div class="app_settings_header pt-1 pb-1" style="background-color: #FEF0D0;">
<div class="app_settings_header pt-1 pb-1 bg-warning bg-opacity-25">
<div class="col-xs-12 col-md-6 ms-0 o_setting_box">
<div class="o_setting_right_pane border-start-0 ms-0 ps-0">
<div class="content-group">
@@ -2,7 +2,7 @@
<templates xml:space="preserve">
<t t-name="project.ProjectControlPanelContentBadge" owl="1">
<t t-tag="isProjectUser ? 'button' : 'span'" class="badge border d-flex p-2 ms-2 bg-white" data-hotkey="y">
<t t-tag="isProjectUser ? 'button' : 'span'" class="badge border d-flex p-2 ms-2 bg-view" data-hotkey="y">
<span t-attf-class="o_status_bubble o_color_bubble_{{data.color}}"/>
<span t-att-class="'fw-normal ms-1' + (data.color === 0 ? ' text-muted' : '')" t-esc="data.status"/>
</t>
@@ -2,7 +2,7 @@
<templates id="template" xml:space="preserve">
<t t-name="project.ProjectRightSidePanel" owl="1">
<div t-if="projectId" class="o_rightpanel pt-0 bg-white border-start overflow-auto">
<div t-if="projectId" class="o_rightpanel pt-0 bg-view border-start overflow-auto">
<ProjectRightSidePanelSection
name="'stat_buttons'"
header="false"
@@ -11,17 +11,17 @@
<div class="g-col-9 g-col-sm-10 grid gap-1">
<div class="g-col-4 p-0" t-on-click="setSearchContext" title="All Draft RFQs" filter_name="draft_rfqs">
<a href="#" class="btn btn-primary w-100 h-100 border-0 rounded-0 text-capitalize fw-normal">
<h2 t-out="purchaseData['all_to_send']"/>To Send
<div class="fs-2" t-out="purchaseData['all_to_send']"/>To Send
</a>
</div>
<div class="g-col-4 p-0" t-on-click="setSearchContext" title="All Waiting RFQs" filter_name="waiting_rfqs">
<a href="#" class="btn btn-primary w-100 h-100 border-0 rounded-0 text-capitalize fw-normal">
<h2 t-out="purchaseData['all_waiting']"/>Waiting
<div class="fs-2" t-out="purchaseData['all_waiting']"/>Waiting
</a>
</div>
<div class="g-col-4 p-0" t-on-click="setSearchContext" title="All Late RFQs" filter_name="late_rfqs">
<a href="#" class="btn btn-primary w-100 h-100 border-0 rounded-0 text-capitalize fw-normal">
<h2 t-out="purchaseData['all_late']"/>Late
<div class="fs-2" t-out="purchaseData['all_late']"/>Late
</a>
</div>
</div>
+1 -1
View File
@@ -93,7 +93,7 @@
<div class="oe_kanban_global_click d-flex align-items-center justify-content-center">
<div class="row oe_kanban_details">
<div class="col-4 my-auto">
<field name="rating_image" widget="image"/>
<field name="rating_image" widget="image" class="bg-view" />
</div>
<div class="col-8 ps-1">
<strong>
@@ -24,7 +24,7 @@
groups="getDashboardGroups()"/>
</t>
<t t-else="">
<div class="o_spreadsheet_dashboard_search_panel o_search_panel flex-grow-0 border-end flex-shrink-0 pe-2 pb-5 ps-4 h-100 bg-white overflow-auto">
<div class="o_spreadsheet_dashboard_search_panel o_search_panel flex-grow-0 border-end flex-shrink-0 pe-2 pb-5 ps-4 h-100 bg-view overflow-auto">
<section t-foreach="getDashboardGroups()" t-as="group" t-key="group.id" class="o_search_panel_section o_search_panel_category">
<header class="o_search_panel_section_header pt-4 pb-2 text-uppercase o_cursor_default user-select-none">
<b t-esc="group.name"/>
@@ -11,7 +11,7 @@
</button>
</div>
<div class="o_mobile_search_content">
<div class="o_search_panel flex-grow-0 flex-shrink-0 border-end pe-2 pb-5 ps-4 h-100 bg-white overflow-auto">
<div class="o_search_panel flex-grow-0 flex-shrink-0 border-end pe-2 pb-5 ps-4 h-100 bg-view overflow-auto">
<section t-foreach="props.groups" t-as="group" t-key="group.id" class="o_search_panel_section o_search_panel_category">
<header class="o_search_panel_section_header pt-4 pb-2 text-uppercase cursor-default">
<b t-esc="group.name"/>
@@ -8,9 +8,6 @@
}
}
.o_forecasted_row {
background-color: #dee2e6;
}
.o_priority {
display: inline-block;
@@ -29,5 +26,5 @@
}
.table td {
vertical-align: middle;
}
}
}
@@ -1 +1 @@
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="trophy" class="svg-inline--fa fa-trophy fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M552 64H448V24c0-13.3-10.7-24-24-24H152c-13.3 0-24 10.7-24 24v40H24C10.7 64 0 74.7 0 88v56c0 35.7 22.5 72.4 61.9 100.7 31.5 22.7 69.8 37.1 110 41.7C203.3 338.5 240 360 240 360v72h-48c-35.3 0-64 20.7-64 56v12c0 6.6 5.4 12 12 12h296c6.6 0 12-5.4 12-12v-12c0-35.3-28.7-56-64-56h-48v-72s36.7-21.5 68.1-73.6c40.3-4.6 78.6-19 110-41.7 39.3-28.3 61.9-65 61.9-100.7V88c0-13.3-10.7-24-24-24zM99.3 192.8C74.9 175.2 64 155.6 64 144v-16h64.2c1 32.6 5.8 61.2 12.8 86.2-15.1-5.2-29.2-12.4-41.7-21.4zM512 144c0 16.1-17.7 36.1-35.3 48.8-12.5 9-26.7 16.2-41.8 21.4 7-25 11.8-53.6 12.8-86.2H512v16z"></path></svg>
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="trophy" class="svg-inline--fa fa-trophy fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="#9DA1AA" d="M552 64H448V24c0-13.3-10.7-24-24-24H152c-13.3 0-24 10.7-24 24v40H24C10.7 64 0 74.7 0 88v56c0 35.7 22.5 72.4 61.9 100.7 31.5 22.7 69.8 37.1 110 41.7C203.3 338.5 240 360 240 360v72h-48c-35.3 0-64 20.7-64 56v12c0 6.6 5.4 12 12 12h296c6.6 0 12-5.4 12-12v-12c0-35.3-28.7-56-64-56h-48v-72s36.7-21.5 68.1-73.6c40.3-4.6 78.6-19 110-41.7 39.3-28.3 61.9-65 61.9-100.7V88c0-13.3-10.7-24-24-24zM99.3 192.8C74.9 175.2 64 155.6 64 144v-16h64.2c1 32.6 5.8 61.2 12.8 86.2-15.1-5.2-29.2-12.4-41.7-21.4zM512 144c0 16.1-17.7 36.1-35.3 48.8-12.5 9-26.7 16.2-41.8 21.4 7-25 11.8-53.6 12.8-86.2H512v16z"></path></svg>

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 808 B

@@ -3,8 +3,8 @@
// Common: left semi-trophy icon for certifications
.o_survey_kanban_card_certification {
background-image:
linear-gradient(rgba(255,255,255,.9),
rgba(255,255,255,.9)),
linear-gradient(rgba($o-view-background-color,.75),
rgba($o-view-background-color,.75)),
url(/survey/static/src/img/trophy-solid.svg);
background-repeat: no-repeat;
background-position: bottom 6px left -45px;
@@ -31,9 +31,6 @@
width: 100%;
margin: 0px;
border-top: 0px !important;
&:first-child {
border-bottom: 1px solid #dee2e6 !important;
}
}
}
@@ -65,8 +62,8 @@
// Left semi-trophy icon for certifications: tweak display for list view
.o_survey_kanban_card_certification {
background-position: bottom 6px left -30px;
background-size: 100%, 65px;
background-position: center left -35px;
background-size: auto 75%;
}
// Due to activity widget crashing if present twice, have to set absolute and tweak