Skip to content

Commit

Permalink
[FIX]tooltip on kanban should be bind to element itself instead of bo…
Browse files Browse the repository at this point in the history
…dy to prevent tooltip to stay visible

bzr revid: csn@openerp.com-20140423073840-m85t30lwgt8uf465
  • Loading branch information
csnauwaert committed Apr 23, 2014
1 parent 058427d commit 7c02150
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions addons/web_kanban/static/src/js/kanban.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,15 +925,22 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
bind_events: function() {
var self = this;
this.setup_color_picker();
this.$el.find('[title]').tooltip({
delay: { show: 500, hide: 0},
title: function() {
var template = $(this).attr('tooltip');
if (!self.view.qweb.has_template(template)) {
return false;
}
return self.view.qweb.render(template, self.qweb_context);
},
this.$el.find('[title]').each(function(){
//in case of kanban, attach tooltip to the element itself
//otherwise it might stay on screen when kanban view reload
//since default container is body.
//(when clicking on ready for next stage for example)
$(this).tooltip({
delay: { show: 500, hide: 0},
container: $(this),
title: function() {
var template = $(this).attr('tooltip');
if (!self.view.qweb.has_template(template)) {
return false;
}
return self.view.qweb.render(template, self.qweb_context);
},
});
});

// If no draghandle is found, make the whole card as draghandle (provided one can edit)
Expand Down

0 comments on commit 7c02150

Please sign in to comment.