[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,31 +1,18 @@
<?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')]" <button
position="replace" type="button"
> class="o_add_url_button btn btn-link"
<div align="center"> t-on-click="_onAddUrl"
<button >
class="o_AttachmentBox_buttonAdd btn btn-link" <i class="fa fa-plus-square" />
type="button" Add URL
t-on-click="_onClickAdd" </button>
>
<i class="fa fa-plus-square" />
Add attachments
</button>
<button
type="button"
class="o_add_url_button btn btn-link"
t-on-click="_onAddUrl"
>
<i class="fa fa-plus-square" />
Add URL
</button>
</div>
</xpath> </xpath>
</t> </t>