[IMP] document_url: Add .scss + improve xpath selector (remove replace)

This commit is contained in:
Víctor Martínez 2023-03-01 08:44:11 +01:00
parent 49f38ca4aa
commit 05ed61b9b6
2 changed files with 11 additions and 23 deletions

View File

@ -15,6 +15,7 @@
"assets": { "assets": {
"web.assets_backend": [ "web.assets_backend": [
"document_url/static/src/js/url.esm.js", "document_url/static/src/js/url.esm.js",
"document_url/static/src/scss/document_url.scss",
], ],
"web.assets_qweb": [ "web.assets_qweb": [
"document_url/static/src/xml/url.xml", "document_url/static/src/xml/url.xml",

View File

@ -1,22 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2018 Tecnativa - Ernesto Tejeda <!-- Copyright 2018 Tecnativa - Ernesto Tejeda
Copyright 2021 Tecnativa - Víctor Martínez Copyright 2021-2023 Tecnativa - Víctor Martínez
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<templates> <templates>
<t t-inherit="mail.AttachmentBox" t-inherit-mode="extension" owl="1"> <t t-inherit="mail.AttachmentBox" t-inherit-mode="extension" owl="1">
<xpath <xpath expr="//button[hasclass('o_AttachmentBox_buttonAdd')]" position="after">
expr="//button[hasclass('o_AttachmentBox_buttonAdd')]"
position="replace"
>
<div align="center">
<button
class="o_AttachmentBox_buttonAdd btn btn-link"
type="button"
t-on-click="_onClickAdd"
>
<i class="fa fa-plus-square" />
Add attachments
</button>
<button <button
type="button" type="button"
class="o_add_url_button btn btn-link" class="o_add_url_button btn btn-link"
@ -25,7 +13,6 @@
<i class="fa fa-plus-square" /> <i class="fa fa-plus-square" />
Add URL Add URL
</button> </button>
</div>
</xpath> </xpath>
</t> </t>