[REF] website_links: adapt code after jQuery update
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
This commit is contained in:
committed by
Aaron Bohy
co-authored by
Aaron Bohy
Christophe Matthieu
Mathieu Duckerts-Antoine
David Monjoie
Martin Geubelle
svs-odoo
parent
f0b527591a
commit
6928bfb6c7
@@ -37,7 +37,7 @@ var SelectBox = publicWidget.Widget.extend({
|
||||
return {id: val.id, text: val.name};
|
||||
});
|
||||
}));
|
||||
return $.when.apply($, defs);
|
||||
return Promise.all(defs);
|
||||
},
|
||||
/**
|
||||
* @override
|
||||
@@ -376,7 +376,7 @@ publicWidget.registry.websiteLinks = publicWidget.Widget.extend({
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
return $.when.apply($, defs);
|
||||
return Promise.all(defs);
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -177,7 +177,13 @@ publicWidget.registry.websiteLinksCharts = publicWidget.Widget.extend({
|
||||
|
||||
this.animating_copy = false;
|
||||
|
||||
return $.when.apply($, defs).then(function (_totalClicks, _clicksByDay, _clicksByCountry, _lastWeekClicksByCountry, _lastMonthClicksByCountry) {
|
||||
return Promise.all(defs).then(function (results) {
|
||||
var _totalClicks = results[0];
|
||||
var _clicksByDay = results[1];
|
||||
var _clicksByCountry = results[2];
|
||||
var _lastWeekClicksByCountry = results[3];
|
||||
var _lastMonthClicksByCountry = results[4];
|
||||
|
||||
if (!_totalClicks) {
|
||||
$('#all_time_charts').prepend(_t("There is no data to show"));
|
||||
$('#last_month_charts').prepend(_t("There is no data to show"));
|
||||
|
||||
@@ -43,7 +43,7 @@ publicWidget.registry.websiteLinksCodeEditor = publicWidget.Widget.extend({
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @returns {Deferred}
|
||||
* @returns {Promise}
|
||||
*/
|
||||
_submitCode: function () {
|
||||
var initCode = $('#edit-code-form #init_code').val();
|
||||
@@ -75,7 +75,7 @@ publicWidget.registry.websiteLinksCodeEditor = publicWidget.Widget.extend({
|
||||
});
|
||||
}
|
||||
|
||||
return $.when();
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user