[REF] web: dialog, simplify scss

Part of the overall v16 SCSS optimization/restyle (task-2704984).
Additionally, this commit will fix the border-radius of modals that
should be rounded in community.

task-2734531

closes odoo/odoo#83128

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
xlu-odoo
2022-03-02 18:45:55 +00:00
committed by stefanorigano (SRI)
parent 05fc9a6733
commit bc4127ad69
4 changed files with 10 additions and 65 deletions
+6 -51
View File
@@ -1,52 +1,7 @@
.o_dialog {
> .modal {
display: block;
}
}
.modal.o_technical_modal {
.modal-content {
border-radius: 0;
.modal-header .modal-title {
word-break: break-word;
}
.modal-footer {
flex-wrap: wrap;
text-align: left;
justify-content: flex-start;
footer {
> :not(:first-child) {
margin-left: 0.25rem;
}
> :not(:last-child) {
margin-right: 0.25rem;
}
button {
margin-bottom: 0.5rem;
}
}
}
}
@include media-breakpoint-up(sm) {
.modal-dialog .modal-content.o_dialog_error .modal-body {
overflow: visible;
display: flex;
flex-flow: column nowrap;
> .alert,
> button {
flex: 0 0 auto;
}
> .o_error_detail {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
}
}
}
.modal.o_technical_modal .modal-footer {
gap: map-get($spacers, 1);
button {
margin: 0; // Reset boostrap.
}
}
+3 -3
View File
@@ -3,7 +3,7 @@
<t t-name="web.Dialog" owl="1">
<div class="o_dialog" t-att-class="{ o_inactive_modal: !props.isActive }" t-on-dialog-closed="close">
<div role="dialog" class="modal"
<div role="dialog" class="modal d-block"
tabindex="-1"
t-att-class="{ o_technical_modal: technical, o_modal_full: fullscreen }"
t-ref="modal"
@@ -11,7 +11,7 @@
<div class="modal-dialog" t-att-class="size">
<div class="modal-content" t-att-class="contentClass">
<header t-if="renderHeader" class="modal-header">
<h4 class="modal-title">
<h4 class="modal-title text-break">
<t t-esc="title"/>
</h4>
<button type="button" class="close" aria-label="Close" tabindex="-1" t-on-click="close">×</button>
@@ -19,7 +19,7 @@
<main class="modal-body">
<t t-call="{{ constructor.bodyTemplate }}"/>
</main>
<footer t-if="renderFooter" class="modal-footer">
<footer t-if="renderFooter" class="modal-footer justify-content-start">
<t t-call="{{ constructor.footerTemplate }}" />
</footer>
</div>
@@ -1,7 +1,5 @@
.modal.o_technical_modal {
.modal-content {
border-radius: 0;
.modal-header .o_subtitle {
margin-left: 10px;
@@ -54,14 +52,6 @@
> div, > footer {
flex: 1 1 auto;
}
footer {
> :not(:first-child) { margin-left: .25rem; }
> :not(:last-child) { margin-right: .25rem; }
button {
margin-bottom: .5rem;
}
}
}
}
@@ -5,7 +5,7 @@
<xpath expr="//header/h4[contains(concat(' ',normalize-space(@class),' '),' modal-title ')]" position="before">
<DebugMenu t-if="env.debug" />
</xpath>
<xpath expr="//main[@class='modal-body']" position="attributes">
<xpath expr="//main[hasclass('modal-body')]" position="attributes">
<attribute name="t-att-class">
{"o_act_window": actionType === "ir.actions.act_window"}
</attribute>