forked from Techsystech/web
Merge PR #2365 into 15.0
Signed-off-by pedrobaeza15.0-ocabot-merge-pr-2789-by-pedrobaeza-bump-patch
commit
ee4577967b
|
@ -19,9 +19,9 @@ Web Refresher
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_refresher
|
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_refresher
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||||
:target: https://runbot.odoo-community.org/runbot/162/15.0
|
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/web&target_branch=15.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
|
@ -51,6 +51,7 @@ Authors
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
* Compassion Switzerland
|
* Compassion Switzerland
|
||||||
|
* Tecnativa
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
@ -59,6 +60,8 @@ Contributors
|
||||||
* `Tecnativa <https://www.tecnativa.com>`__:
|
* `Tecnativa <https://www.tecnativa.com>`__:
|
||||||
|
|
||||||
* João Marques
|
* João Marques
|
||||||
|
* Alexandre D. Díaz
|
||||||
|
* Carlos Roca
|
||||||
|
|
||||||
* Thanakrit Pintana
|
* Thanakrit Pintana
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,21 @@
|
||||||
{
|
{
|
||||||
"name": "Web Refresher",
|
"name": "Web Refresher",
|
||||||
"version": "15.0.1.0.0",
|
"version": "15.0.1.0.0",
|
||||||
"author": "Compassion Switzerland, Odoo Community Association (OCA)",
|
"author": "Compassion Switzerland, Tecnativa, Odoo Community Association (OCA)",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"website": "https://github.com/OCA/web",
|
"website": "https://github.com/OCA/web",
|
||||||
"depends": ["web"],
|
"depends": ["web"],
|
||||||
"installable": True,
|
"installable": True,
|
||||||
"auto_install": False,
|
"auto_install": False,
|
||||||
"assets": {"web.assets_qweb": ["web_refresher/static/src/xml/pager_button.xml"]},
|
"assets": {
|
||||||
|
"web.assets_backend": [
|
||||||
|
"web_refresher/static/src/scss/refresher.scss",
|
||||||
|
"web_refresher/static/src/js/refresher.esm.js",
|
||||||
|
"web_refresher/static/src/js/control_panel.esm.js",
|
||||||
|
],
|
||||||
|
"web.assets_qweb": [
|
||||||
|
"web_refresher/static/src/xml/refresher.xml",
|
||||||
|
"web_refresher/static/src/xml/control_panel.xml",
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,7 @@
|
||||||
* `Tecnativa <https://www.tecnativa.com>`__:
|
* `Tecnativa <https://www.tecnativa.com>`__:
|
||||||
|
|
||||||
* João Marques
|
* João Marques
|
||||||
|
* Alexandre D. Díaz
|
||||||
|
* Carlos Roca
|
||||||
|
|
||||||
* Thanakrit Pintana
|
* Thanakrit Pintana
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||||
<title>Web Refresher</title>
|
<title>Web Refresher</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_refresher"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_refresher"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_refresher"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_refresher"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runboat.odoo-community.org/webui/builds.html?repo=OCA/web&target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>Adds a button next to the pager (in trees/kanban views) to refresh the displayed list.</p>
|
<p>Adds a button next to the pager (in trees/kanban views) to refresh the displayed list.</p>
|
||||||
<img alt="https://raw.githubusercontent.com/OCA/web/15.0/web_refresher/static/description/refresh.png" src="https://raw.githubusercontent.com/OCA/web/15.0/web_refresher/static/description/refresh.png" />
|
<img alt="https://raw.githubusercontent.com/OCA/web/15.0/web_refresher/static/description/refresh.png" src="https://raw.githubusercontent.com/OCA/web/15.0/web_refresher/static/description/refresh.png" />
|
||||||
<p><strong>Table of contents</strong></p>
|
<p><strong>Table of contents</strong></p>
|
||||||
|
@ -396,6 +396,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||||
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
|
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Compassion Switzerland</li>
|
<li>Compassion Switzerland</li>
|
||||||
|
<li>Tecnativa</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="contributors">
|
<div class="section" id="contributors">
|
||||||
|
@ -404,6 +405,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||||
<li>Samuel Fringeli</li>
|
<li>Samuel Fringeli</li>
|
||||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||||
<li>João Marques</li>
|
<li>João Marques</li>
|
||||||
|
<li>Alexandre D. Díaz</li>
|
||||||
|
<li>Carlos Roca</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>Thanakrit Pintana</li>
|
<li>Thanakrit Pintana</li>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
/** @odoo-module **/
|
||||||
|
/* Copyright 2022 Tecnativa - Alexandre D. Díaz
|
||||||
|
* Copyright 2022 Tecnativa - Carlos Roca
|
||||||
|
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||||
|
import LegacyControlPanel from "web.ControlPanel";
|
||||||
|
import {Refresher} from "./refresher.esm";
|
||||||
|
|
||||||
|
// Patch control panel to initialize refresher component
|
||||||
|
LegacyControlPanel.components = Object.assign({}, LegacyControlPanel.components, {
|
||||||
|
Refresher,
|
||||||
|
});
|
|
@ -0,0 +1,16 @@
|
||||||
|
/** @odoo-module **/
|
||||||
|
/* Copyright 2022 Tecnativa - Alexandre D. Díaz
|
||||||
|
* Copyright 2022 Tecnativa - Carlos Roca
|
||||||
|
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||||
|
|
||||||
|
const {Component} = owl;
|
||||||
|
|
||||||
|
export class Refresher extends Component {
|
||||||
|
_doRefresh() {
|
||||||
|
// Note: here we use the pager props, see xml
|
||||||
|
const {limit, currentMinimum} = this.props;
|
||||||
|
this.trigger("pager-changed", {currentMinimum, limit});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Refresher.template = "web_refresher.Button";
|
|
@ -0,0 +1,7 @@
|
||||||
|
.oe_cp_refresher {
|
||||||
|
margin: auto 0 auto auto;
|
||||||
|
padding-left: 5px;
|
||||||
|
text-align: right;
|
||||||
|
user-select: none;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!-- Copyright 2022 Tecnativa - Alexandre Díaz
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||||
|
<template>
|
||||||
|
<t
|
||||||
|
t-name="web_refresher.ControlPanel"
|
||||||
|
t-inherit="web.Legacy.ControlPanel"
|
||||||
|
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="props.pager" />
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
</t>
|
||||||
|
</template>
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!-- Copyright 2021 Tecnativa - João Marques
|
|
||||||
License AGPL-3.0 or later (https://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">
|
|
||||||
<span class="btn-group" aria-atomic="true">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="fa fa-refresh btn btn-secondary o_pager_refresh"
|
|
||||||
aria-label="Refresh"
|
|
||||||
title="Refresh"
|
|
||||||
tabindex="-1"
|
|
||||||
t-on-click="_changeSelection(0)"
|
|
||||||
style="margin-right: 5px;"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
</xpath>
|
|
||||||
</t>
|
|
||||||
</template>
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!-- Copyright 2022 Tecnativa - Alexandre Díaz
|
||||||
|
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>
|
||||||
|
</t>
|
||||||
|
</template>
|
Loading…
Reference in New Issue