From 48cba4274b2fd7c1b29933de41542d27f025e152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=84=B1?= Date: Mon, 15 Apr 2024 17:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=A0=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=BF=85=E5=A1=AB=E8=80=8C=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/js/custom_form_status_indicator.js | 3 +-- jikimo_frontend/static/src/scss/custom_style.scss | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/jikimo_frontend/static/src/js/custom_form_status_indicator.js b/jikimo_frontend/static/src/js/custom_form_status_indicator.js index 100542b8..de50eddc 100644 --- a/jikimo_frontend/static/src/js/custom_form_status_indicator.js +++ b/jikimo_frontend/static/src/js/custom_form_status_indicator.js @@ -128,8 +128,7 @@ patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', { this.allColumns.forEach(_ => { if( tableRequiredList.indexOf(_.name) >= 0 ) { const dom = $(`th[data-name=${_.name}]`) - let t = dom.html() - dom.html('*' + t) + dom.addClass('addRequired') } }) } diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss index f7195534..3c106665 100644 --- a/jikimo_frontend/static/src/scss/custom_style.scss +++ b/jikimo_frontend/static/src/scss/custom_style.scss @@ -478,4 +478,14 @@ div:has(.o_required_modifier) > label::before { width: auto !important; flex: unset; } - +.addRequired { + padding-left: calc(0.3rem + 2px)!important; +} +.addRequired:before { + content: '*'; + color: red; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); +} \ No newline at end of file