[MIG] web_save_discard_button: Migration to 17.0

This commit is contained in:
joepsanders
2024-08-05 10:57:13 +02:00
parent 7e0b155bb5
commit cc8b9b3317
6 changed files with 30 additions and 80 deletions

View File

@@ -60,8 +60,11 @@ Authors
Contributors
------------
- Synconics Technologies Pvt. Ltd.
- `Synconics Technologies Pvt. Ltd. <https://www.synconics.com>`__:
- Synconics Technologies Pvt. Ltd. (https://www.synconics.com)
- Codeforward (https://www.codeforward.nl/):
- Joep Sanders <joep.sanders@codeforward.nl>
Maintainers
-----------

View File

@@ -3,7 +3,7 @@
{
"name": "Save & Discard Buttons",
"version": "16.0.1.0.2",
"version": "17.0.1.0.0",
"summary": "Save & Discard Buttons",
"license": "AGPL-3",
"category": "Tools",
@@ -12,14 +12,9 @@
"maintainers": ["synconics"],
"depends": ["web"],
"data": [],
"images": ["static/description/main_screen.png"],
"assets": {
"web.assets_backend": [
"web_save_discard_button/static/src/scss/indicator_button.scss",
"web_save_discard_button/static/src/xml/template.xml",
],
},
"installable": True,
"application": False,
"auto_install": False,
}

View File

@@ -1,2 +1,4 @@
- Synconics Technologies Pvt. Ltd.
- [Synconics Technologies Pvt. Ltd.](https://www.synconics.com):
- Synconics Technologies Pvt. Ltd. (https://www.synconics.com)
- Codeforward (https://www.codeforward.nl/):
> - Joep Sanders \<<joep.sanders@codeforward.nl>\>

View File

@@ -402,9 +402,16 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul>
<li><p class="first">Synconics Technologies Pvt. Ltd. (<a class="reference external" href="https://www.synconics.com">https://www.synconics.com</a>)</p>
</li>
<li><p class="first">Codeforward (<a class="reference external" href="https://www.codeforward.nl/">https://www.codeforward.nl/</a>):</p>
<blockquote>
<ul class="simple">
<li>Synconics Technologies Pvt. Ltd.</li>
<li><a class="reference external" href="https://www.synconics.com">Synconics Technologies Pvt. Ltd.</a>:</li>
<li>Joep Sanders &lt;<a class="reference external" href="mailto:joep.sanders&#64;codeforward.nl">joep.sanders&#64;codeforward.nl</a>&gt;</li>
</ul>
</blockquote>
</li>
</ul>
</div>
<div class="section" id="maintainers">

View File

@@ -1,65 +0,0 @@
.o_form_status_indicator_buttons {
margin-left: 10px;
.o_form_button_save,
.o_form_button_cancel {
width: 100%;
&.o_form_button_save {
background-color: $primary;
&:hover {
filter: brightness(0.9);
}
}
&.o_form_button_cancel {
margin-left: 5px;
&:hover {
background-color: #f6f7fa;
border-color: #e0e2e6;
}
}
.save_button {
width: 100%;
font-weight: 500;
color: white;
display: inline-block;
text-align: center;
vertical-align: middle;
user-select: none;
background-color: transparent;
border: 1px solid transparent;
padding: 0.3rem 2px;
font-size: 1.08333333rem;
line-height: 1.5;
border-radius: 0;
transition: none;
width: 100%;
text-transform: uppercase;
font-family: $o-system-fonts;
}
.discard_button {
width: 100%;
font-weight: 500;
color: white;
display: inline-block;
text-align: center;
vertical-align: middle;
user-select: none;
color: $primary;
background-color: transparent;
padding: 0.3rem 2px;
font-size: 1.08333333rem;
line-height: 1.5;
border-radius: 0;
transition: none;
width: 100%;
text-transform: uppercase;
font-family: $o-system-fonts;
}
}
}

View File

@@ -5,13 +5,21 @@
t-name="web_save_discard_button.FormStatusIndicator"
t-inherit="web.FormStatusIndicator"
t-inherit-mode="extension"
owl="1"
>
<xpath
expr="//div[(hasclass('o_form_status_indicator_buttons'))]"
position="attributes"
>
<attribute name="class" add="gap-1" separator=" " />
</xpath>
<xpath expr="//button[(hasclass('o_form_button_save'))]" position="attributes">
<attribute name="class">o_form_button_save btn btn-primary</attribute>
</xpath>
<xpath expr="//button/i[(hasclass('fa-cloud-upload'))]" position="replace">
<span class="save_button">Save</span>
<span>Save</span>
</xpath>
<xpath expr="//button/i[(hasclass('fa-undo'))]" position="replace">
<span class="discard_button">Discard</span>
<span>Discard</span>
</xpath>
</t>
</templates>