From 385fc1c7ebf503fb80a7924878e060b2083ee1fc Mon Sep 17 00:00:00 2001 From: Patrick Hoste Date: Thu, 30 Jun 2022 14:53:45 +0000 Subject: [PATCH] [IMP] web: allow custom 'modal-body' class on Dialog component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit simply enables a custom prop for the Dialog component so that it can have a hand-picked background instead of the default 'white'. Will notably be useful for the social images carousel where we need a dark background. Task-2855647 closes odoo/odoo#101505 X-original-commit: 8da44acadbd4ad4c03dba496daf317f1f2ab8371 Related: odoo/enterprise#31973 Signed-off-by: Thibault Delavallee (tde) Signed-off-by: Warnon Aurélien (awa) --- addons/web/static/src/core/dialog/dialog.js | 2 ++ addons/web/static/src/core/dialog/dialog.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/core/dialog/dialog.js b/addons/web/static/src/core/dialog/dialog.js index a63e686188f..f8790f5707f 100644 --- a/addons/web/static/src/core/dialog/dialog.js +++ b/addons/web/static/src/core/dialog/dialog.js @@ -30,6 +30,7 @@ export class Dialog extends Component { Dialog.template = "web.Dialog"; Dialog.props = { contentClass: { type: String, optional: true }, + bodyClass: { type: String, optional: true }, fullscreen: { type: Boolean, optional: true }, footer: { type: Boolean, optional: true }, header: { type: Boolean, optional: true }, @@ -48,6 +49,7 @@ Dialog.props = { }; Dialog.defaultProps = { contentClass: "", + bodyClass: "", fullscreen: false, footer: true, header: true, diff --git a/addons/web/static/src/core/dialog/dialog.xml b/addons/web/static/src/core/dialog/dialog.xml index 3a4a2a60c7e..c863985852a 100644 --- a/addons/web/static/src/core/dialog/dialog.xml +++ b/addons/web/static/src/core/dialog/dialog.xml @@ -30,7 +30,7 @@ -
+