forked from Techsystech/web
[IMP] web_refresher: black, isort, prettier
parent
166a40c100
commit
90a68d83c0
|
@ -1,16 +1,13 @@
|
|||
# pylint: disable=C8101
|
||||
|
||||
{
|
||||
'name': 'Web Refresher',
|
||||
'version': '12.0.1.0.0',
|
||||
'author': 'Compassion Switzerland, '
|
||||
'Odoo Community Association (OCA)',
|
||||
'license': 'AGPL-3',
|
||||
'website': 'https://github.com/OCA/web',
|
||||
'data': [
|
||||
'templates/assets.xml'
|
||||
],
|
||||
'depends': ['web'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
"name": "Web Refresher",
|
||||
"version": "12.0.1.0.0",
|
||||
"author": "Compassion Switzerland, " "Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"website": "https://github.com/OCA/web",
|
||||
"data": ["templates/assets.xml"],
|
||||
"depends": ["web"],
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
}
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
// initial pager is located in source/addons/web/static/src/js/chrome/pager.js
|
||||
// Initial pager is located in source/addons/web/static/src/js/chrome/pager.js
|
||||
|
||||
odoo.define('refresher.pager', function(require) {
|
||||
'use strict';
|
||||
odoo.define("refresher.pager", function(require) {
|
||||
"use strict";
|
||||
|
||||
var pager = require('web.Pager');
|
||||
var pager = require("web.Pager");
|
||||
pager.include({
|
||||
start: function() {
|
||||
var self = this;
|
||||
var res = self._super();
|
||||
|
||||
var $button = $('<span>', {
|
||||
var $button = $("<span>", {
|
||||
class: "fa fa-refresh btn btn-icon o_pager_refresh",
|
||||
css: {"margin-right": "8px"},
|
||||
"aria-label": "Refresh"
|
||||
"aria-label": "Refresh",
|
||||
});
|
||||
$button.on('click', function(){
|
||||
$button.on("click", function() {
|
||||
self._changeSelection(0);
|
||||
});
|
||||
|
||||
self.$el.prepend($button);
|
||||
return res;
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
<odoo>
|
||||
<template id="page_refresher" name="Refresh button" inherit_id="web.assets_backend">
|
||||
<xpath expr="//script[last()]" position="after">
|
||||
<script src="/web_refresher/static/src/js/refresher.js" type="text/javascript"/>
|
||||
<script
|
||||
src="/web_refresher/static/src/js/refresher.js"
|
||||
type="text/javascript"
|
||||
/>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
Loading…
Reference in New Issue