[FIX] website_forum: wait templates are loaded before binding events

This is required since a4dc9a8032
This commit is contained in:
Christophe Simonis
2017-02-10 16:45:34 +01:00
parent cbdd0b20dc
commit 80c1d1e355
@@ -7,7 +7,7 @@ var base = require('web_editor.base');
var SocialShare = require('website.share');
var website = require('website.website');
var qweb = core.qweb;
ajax.loadXML('/website_forum/static/src/xml/website_forum_share_templates.xml', qweb);
var tmpl = ajax.loadXML('/website_forum/static/src/xml/website_forum_share_templates.xml', qweb);
if(!$('.website_forum').length) {
@@ -44,7 +44,7 @@ var ForumShare = SocialShare.extend({
}
});
base.ready().done(function() {
$.when(base.ready(), tmpl).done(function() {
// Store social share data to display modal on next page
$(document.body).on('click', ':not(.karma_required).oe_social_share_call', function() {