[IMP] web_refresher: Backport refresh way from v17

This commit is contained in:
Carlos Roca
2024-03-28 17:10:26 +01:00
parent baf589950a
commit 8ffee9f78e
10 changed files with 169 additions and 90 deletions

View File

@@ -8,14 +8,9 @@
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//div[hasclass('o_cp_bottom_right')]" position="after">
<div
t-if="!display['bottom-right']"
class="o_cp_bottom_right oe_cp_refresher"
role="search"
t-ref="refresher"
>
<Refresher />
<xpath expr="//div[hasclass('o_cp_pager')]" position="before">
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher t-props="refresherProps" />
</div>
</xpath>
</t>
@@ -25,14 +20,21 @@
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//div[hasclass('o_cp_pager')]" position="after">
<div
t-if="!display['bottom-right']"
class="o_cp_bottom_right oe_cp_refresher"
role="search"
t-ref="refresher"
>
<Refresher />
<xpath expr="//div[hasclass('o_cp_pager')]" position="before">
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher t-props="refresherProps" />
</div>
</xpath>
</t>
<t
t-name="web_refresher.FormControlPanel"
t-inherit="web.FormControlPanel"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//div[hasclass('o_cp_pager')]" position="before">
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher t-props="refresherProps" />
</div>
</xpath>
</t>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2022 Tecnativa - Carlos Roca
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<template>
<t
t-name="web_refresher.Pager"
t-inherit="web.Pager"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//span[hasclass('o_pager_counter')]" position="before">
<div class="oe_cp_refresher" role="search" t-ref="refresher">
<Refresher t-props="props" />
</div>
</xpath>
</t>
</template>

View File

@@ -3,16 +3,19 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<template>
<t t-name="web_refresher.Button" owl="1">
<nav class="oe_refresher" aria-label="Pager">
<span aria-atomic="true">
<button
class="fa fa-refresh btn btn-icon oe_pager_refresh"
aria-label="Refresh"
t-on-click="_doRefresh"
title="Refresh"
tabindex="-1"
/>
</span>
<nav
class="oe_refresher"
aria-label="Refresher"
aria-atomic="true"
t-if="displayButton"
>
<button
class="fa fa-refresh btn btn-icon oe_pager_refresh"
aria-label="Refresh"
t-on-click="onClickRefresh"
title="Refresh"
tabindex="-1"
/>
</nav>
</t>
</template>