Skip to content
Snippets Groups Projects
Commit 3d356f94 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] web_uservoice

bzr revid: chs@openerp.com-20120109133338-d6nngr32ob5x6bbw
parent a4211959
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,9 @@ instance.web_uservoice.UserVoice = instance.web.Widget.extend({
do_menu_click: function($clicked_menu, manual) {
var id = $clicked_menu.attr('data-menu');
if (id) {
var id = $clicked_menu.attr('data-menu'),
root = $clicked_menu.parents('div.menu').length === 1;
if (id && root) {
this.uservoiceOptions.forum = this.uservoiceForums[id] || this.default_forum;
}
},
......@@ -64,14 +65,26 @@ instance.web_uservoice.UserVoice = instance.web.Widget.extend({
});
instance.web.Header.include({
do_update: function() {
var self = this;
this._super();
this.update_promise.then(function() {
if (self.uservoice) {
self.uservoice.stop();
}
self.uservoice = new instance.web_uservoice.UserVoice(self);
self.uservoice.prependTo(self.$element.find('div.header_corner'));
});
}
});
if (instance.webclient) {
$(function() {
var src = ("https:" == document.location.protocol ? "https://" : "http://") + "cdn.uservoice.com/javascripts/widgets/tab.js";
$.getScript(src);
});
instance.webclient.uservoice = new instance.web_uservoice.UserVoice(instance.webclient);
instance.webclient.uservoice.prependTo('div.header_corner');
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment