summaryrefslogtreecommitdiff
path: root/addons/website_livechat/static
diff options
context:
space:
mode:
authorVincent Schippefilt <vsc@odoo.com>2019-03-06 14:02:36 +0100
committerAaron Bohy <aab@odoo.com>2019-03-06 20:07:17 +0100
commitbd88240d3fc981913a81f193882afc2e7c86bc2a (patch)
tree0e4f9e30514e675f4b1c8f18023606041d5f22e0 /addons/website_livechat/static
parent6928bfb6c7e7bffff5fc8855838a8b133c324c68 (diff)
[REF] website_livechat: 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_livechat/static')
-rw-r--r--addons/website_livechat/static/src/js/website_livechat.editor.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/website_livechat/static/src/js/website_livechat.editor.js b/addons/website_livechat/static/src/js/website_livechat.editor.js
index 2ec5bc2a793..288f2af0e97 100644
--- a/addons/website_livechat/static/src/js/website_livechat.editor.js
+++ b/addons/website_livechat/static/src/js/website_livechat.editor.js
@@ -21,14 +21,15 @@ WebsiteNewMenu.include({
* and redirects the user to this new channel.
*
* @private
- * @returns {Deferred} Unresolved if there is a redirection
+ * @returns {Promise} Unresolved if there is a redirection
*/
_createNewChannel: function () {
var self = this;
return wUtils.prompt({
window_title: _t("New Channel"),
input: _t("Name"),
- }).then(function (name) {
+ }).then(function (result) {
+ var name = result.val;
if (!name) {
return;
}
@@ -41,7 +42,7 @@ WebsiteNewMenu.include({
},
}).then(function (url) {
window.location.href = url;
- return $.Deferred();
+ return new Promise(function () {});
});
});
},