diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2019-03-06 14:02:35 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-03-06 20:07:17 +0100 |
| commit | 3482e3a5a79fa3a950e506fb7afb9d1522c33ff8 (patch) | |
| tree | 2cc65b20c731c845dd3f0497175275ed51177f1b /addons/website_forum/static/src | |
| parent | f7917b1502e361701c22899227c5bdbb1cda4565 (diff) | |
[REF] website_forum: 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>
Diffstat (limited to 'addons/website_forum/static/src')
| -rw-r--r-- | addons/website_forum/static/src/js/website_forum.editor.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/website_forum/static/src/js/website_forum.editor.js b/addons/website_forum/static/src/js/website_forum.editor.js index 870878f0331..e2b19ba681f 100644 --- a/addons/website_forum/static/src/js/website_forum.editor.js +++ b/addons/website_forum/static/src/js/website_forum.editor.js @@ -21,7 +21,7 @@ WebsiteNewMenu.include({ * and redirects the user to this new forum. * * @private - * @returns {Deferred} Unresolved if there is a redirection + * @returns {Promise} Unresolved if there is a redirection */ _createNewForum: function () { var self = this; @@ -42,7 +42,9 @@ WebsiteNewMenu.include({ $add.find('label').append(_t("Add to menu")); $group.after($add); } - }).then(function (forum_name, field, $dialog) { + }).then(function (result) { + var forum_name = result.val; + var $dialog = result.dialog; if (!forum_name) { return; } @@ -55,7 +57,7 @@ WebsiteNewMenu.include({ }, }).then(function (url) { window.location.href = url; - return $.Deferred(); + return new Promise(function () {}); }); }); }, |
