[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": {
"web.assets_backend": [
"document_url/static/src/js/url.esm.js",
"document_url/static/src/scss/document_url.scss",
],
"web.assets_qweb": [
"document_url/static/src/xml/url.xml",

View File

@ -1,31 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- 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). -->
<templates>
<t t-inherit="mail.AttachmentBox" t-inherit-mode="extension" owl="1">
<xpath
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
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 expr="//button[hasclass('o_AttachmentBox_buttonAdd')]" position="after">
<button
type="button"
class="o_add_url_button btn btn-link"
t-on-click="_onAddUrl"
>
<i class="fa fa-plus-square" />
Add URL
</button>
</xpath>
</t>