summaryrefslogtreecommitdiff
path: root/addons/im_chat/static/src/js
diff options
context:
space:
mode:
authorJérome Maes <jem@openerp.com>2014-11-18 11:35:28 +0100
committerJérome Maes <jem@openerp.com>2014-11-18 11:35:28 +0100
commit7a7bf11e92ffdd2de06e444ddc77aeb528ed4764 (patch)
tree5f7b1650659143286182169825d3e4101a32fbd6 /addons/im_chat/static/src/js
parent171948a2b6af8a74f90f42f6d1dae367507df23c (diff)
[FIX] im_chat : momentjs undefined on external pages. Temporary fix by replacing moment() by window.moment(). The moment helper is defined in core.js, which is not imported in web_assets common. If refactoring, the dates will be pre-process in render_messages().
Diffstat (limited to 'addons/im_chat/static/src/js')
-rw-r--r--addons/im_chat/static/src/js/im_chat.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/im_chat/static/src/js/im_chat.js b/addons/im_chat/static/src/js/im_chat.js
index dd7d92a90bb..78ed6778a1f 100644
--- a/addons/im_chat/static/src/js/im_chat.js
+++ b/addons/im_chat/static/src/js/im_chat.js
@@ -373,6 +373,9 @@
}
});
// render and set the content of the chatview
+ // TODO jem : when refactoring this, don't forget to pre-process date in this function before render quweb template
+ // since, moment will not be define in qweb on the website pages, because the helper (see csn) is in core.js and cannot be
+ // imported in the frontend.
this.$('.oe_im_chatview_content_bubbles').html($(openerp.qweb.render("im_chat.Conversation_content", {"list": res})));
this._go_bottom();
},