From 171d1e7bc3bf1df28c6c4aaf8e39abb3e0e9b75e Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Mon, 7 Jan 2019 10:43:40 +0000 Subject: [FIX] web_editor: Media dialog next btn reload page opw-1910505 Before this commit, the next button in the media dialog widget reloaded the page and opened only the iframe of the widget. Now, the button only update the media dialog widget. closes odoo/odoo#29981 --- addons/web_editor/static/src/js/widgets/widgets.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web_editor/static/src/js') diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index 7c33ab53b97..30de8171e53 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -1288,6 +1288,7 @@ var MediaDialog = Dialog.extend({ * @private */ _onPagerClick: function (ev) { + ev.preventDefault(); this.active.goToPage(this.active.page + ($(ev.currentTarget).hasClass('previous') ? -1 : 1)); this._updateControlPanel(); }, -- cgit v1.2.3 From b87879c1f64c91a925f4814a03687d717791346c Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 9 Jan 2019 14:32:04 +0000 Subject: [FIX] web_editor: icon widget complies to api the search method should return a Deferred as explicit in MediaDialog OPW 1919549 closes odoo/odoo#30077 --- addons/web_editor/static/src/js/widgets/widgets.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web_editor/static/src/js') diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index 3fe18ab503e..b9e2a3289a0 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -724,6 +724,7 @@ var IconWidget = MediaWidget.extend({ this.$('div.font-icons-icons').html( QWeb.render('web_editor.dialog.font-icons.icons', {iconsParser: iconsParser}) ); + return $.when(); }, //-------------------------------------------------------------------------- -- cgit v1.2.3