mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_pwa_oca: black, isort, prettier
This commit is contained in:
@@ -5,20 +5,20 @@
|
||||
// This is a hack, not a complete implementation!
|
||||
// only expected to be used by boot.js
|
||||
|
||||
(function() {
|
||||
(function () {
|
||||
"use strict";
|
||||
function JQuery(selector, context) {
|
||||
return new JQuery.prototype.init(selector, context);
|
||||
}
|
||||
|
||||
JQuery.prototype = {
|
||||
init: function(selector) {
|
||||
init: function (selector) {
|
||||
if (typeof selector === "function") {
|
||||
selector();
|
||||
}
|
||||
},
|
||||
|
||||
deparam: function(data) {
|
||||
deparam: function (data) {
|
||||
const params = data.split(",");
|
||||
const res = [];
|
||||
for (const param of params) {
|
||||
@@ -28,14 +28,14 @@
|
||||
},
|
||||
|
||||
param: {
|
||||
querystring: function() {
|
||||
querystring: function () {
|
||||
return "debug=1";
|
||||
},
|
||||
},
|
||||
|
||||
when: function(tasks) {
|
||||
when: function (tasks) {
|
||||
return Promise.all(tasks instanceof Array ? tasks : [tasks]).then(
|
||||
results => {
|
||||
(results) => {
|
||||
return results.length === 1 ? results[0] : results;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
* this class is instantiated.
|
||||
*/
|
||||
|
||||
odoo.define("web_pwa_oca.PWA", function(require) {
|
||||
odoo.define("web_pwa_oca.PWA", function (require) {
|
||||
"use strict";
|
||||
|
||||
const OdooClass = require("web.Class");
|
||||
|
||||
const PWA = OdooClass.extend({
|
||||
// eslint-disable-next-line
|
||||
init: function(params) {
|
||||
init: function (params) {
|
||||
// To be overridden
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns {Promise}
|
||||
*/
|
||||
installWorker: function() {
|
||||
installWorker: function () {
|
||||
// To be overridden
|
||||
return Promise.resolve();
|
||||
},
|
||||
@@ -30,7 +30,7 @@ odoo.define("web_pwa_oca.PWA", function(require) {
|
||||
/**
|
||||
* @returns {Promise}
|
||||
*/
|
||||
activateWorker: function() {
|
||||
activateWorker: function () {
|
||||
// To be overridden
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user