diff options
| author | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-03-27 10:08:43 +0000 |
|---|---|---|
| committer | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-05-08 07:56:09 +0000 |
| commit | 68584351e4be49b0b0085e582271c655bdfb1585 (patch) | |
| tree | e95d377c568aee8e44432b2be41a29b794660153 /addons/web/static/src | |
| parent | 7c00503008d9e5e9e17e62bfefc267ce87aa78d1 (diff) | |
[IMP] web: Allow hide/show stroke in signature
In the sign application, it appeared that when using the default signature
in a signature SignItem that was higher the stroke at the bottom was doubbled.
This was caused by the fact that the bottom stroke is always added to the
template and that the default signature image had it already.
In order to solve this, we have added a setting 'show-stroke' that allows
controlling the stroke presence in the signature.
Task Id 2216067
Closes #48529
Related odoo/enterprise#9538
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/widgets/name_and_signature.js | 3 | ||||
| -rw-r--r-- | addons/web/static/src/scss/name_and_signature.scss | 8 | ||||
| -rw-r--r-- | addons/web/static/src/xml/name_and_signature.xml | 6 |
3 files changed, 14 insertions, 3 deletions
diff --git a/addons/web/static/src/js/widgets/name_and_signature.js b/addons/web/static/src/js/widgets/name_and_signature.js index 5a20ea4fa22..9d2ae3bff8c 100644 --- a/addons/web/static/src/js/widgets/name_and_signature.js +++ b/addons/web/static/src/js/widgets/name_and_signature.js @@ -250,7 +250,8 @@ var NameAndSignature = Widget.extend({ .empty() .jSignature({ 'decor-color': '#D1D0CE', - 'background-color': '#FFF', + 'background-color': 'rgba(255,255,255,0)', + 'show-stroke': false, 'color': this.fontColor, 'lineWidth': 2, 'width': width, diff --git a/addons/web/static/src/scss/name_and_signature.scss b/addons/web/static/src/scss/name_and_signature.scss index 439e9e0bcb1..63296bf0855 100644 --- a/addons/web/static/src/scss/name_and_signature.scss +++ b/addons/web/static/src/scss/name_and_signature.scss @@ -47,3 +47,11 @@ cursor: pointer; } } + +.o_signature_stroke { + position: absolute; + border-top: #D1D0CE solid 2px; + bottom: 16%; + width: 72%; + left: 14%; +} diff --git a/addons/web/static/src/xml/name_and_signature.xml b/addons/web/static/src/xml/name_and_signature.xml index ff891e04a39..aecffdfa295 100644 --- a/addons/web/static/src/xml/name_and_signature.xml +++ b/addons/web/static/src/xml/name_and_signature.xml @@ -49,7 +49,7 @@ border, but we remove the padding from the body, so the canvas will overflow on the corners without this rule. --> - <div class="o_web_sign_signature_group card mt-3" style="overflow: hidden;"> + <div class="o_web_sign_signature_group bg-white card mt-3" style="overflow: hidden;"> <div class="card-header"> <div class="row no-gutters"> <div class="col-auto"> @@ -83,7 +83,9 @@ </div> </div> - <div class="o_web_sign_signature card-body p-0"/> + <div class="o_signature_stroke position-absolute"/> + + <div class="o_web_sign_signature p-0 bg-transparent position-relative"/> <div t-attf-class="o_web_sign_load_invalid card-footer d-none"> <div class="alert alert-danger mb-0" role="alert"> |
