Browse Source

publish muk_web_utils - 12.0

pull/48/head
MuK IT GmbH 6 years ago
parent
commit
2f335349cf
  1. 2
      muk_web_utils/__manifest__.py
  2. 4
      muk_web_utils/static/src/js/core/async.js

2
muk_web_utils/__manifest__.py

@ -20,7 +20,7 @@
{ {
"name": "MuK Web Utils", "name": "MuK Web Utils",
"summary": """Utility Features""", "summary": """Utility Features""",
"version": "12.0.2.8.6",
"version": "12.0.2.8.7",
"category": "Extra Tools", "category": "Extra Tools",
"license": "AGPL-3", "license": "AGPL-3",
"author": "MuK IT", "author": "MuK IT",

4
muk_web_utils/static/src/js/core/async.js

@ -27,14 +27,14 @@ var QWeb = core.qweb;
var syncLoop = function(items, func, callback) { var syncLoop = function(items, func, callback) {
items.reduce(function(promise, item) { items.reduce(function(promise, item) {
return promise.then(func);
return promise.then(func.bind(this, item));
}, $.Deferred().resolve()).then(callback); }, $.Deferred().resolve()).then(callback);
}; };
var syncProgress = function(items, func, callback, update) { var syncProgress = function(items, func, callback, update) {
var progress = 0; var progress = 0;
items.reduce(function(promise, item) { items.reduce(function(promise, item) {
return promise.then(function() {
return promise.done(function() {
update(++progress / items.length); update(++progress / items.length);
return func(item); return func(item);
}); });

Loading…
Cancel
Save