bind_events: function() {
var self = this;
this.$el.on('mouseenter', '.oe_systray > div:not([data-toggle=tooltip])', function() {
- $(this).attr('data-toggle', 'tooltip').tooltip({placement: 'bottom', html: true}).trigger('mouseenter');
+ $(this).attr('data-toggle', 'tooltip').tooltip().trigger('mouseenter');
});
this.$el.on('click', '.oe_dropdown_toggle', function(ev) {
ev.preventDefault();
return $.unblockUI.apply($, arguments);
};
+
+/* Bootstrap defaults overwrite */
+$.fn.tooltip.Constructor.DEFAULTS.placement = 'auto top';
+$.fn.tooltip.Constructor.DEFAULTS.html = true;
+
/**
* Registry for all the client actions key: tag value: widget
*/
var self = this;
this.$el.find('.oe_view_manager_switch a').click(function() {
self.switch_mode($(this).data('view-type'));
- }).tooltip({
- placement: 'bottom',
- html: true,
- });
+ }).tooltip();
var views_ids = {};
_.each(this.views_src, function(view) {
self.views[view.view_type] = $.extend({}, view, {
$(this).toggle(!!$(this).find('li').length);
});
self.$("[title]").tooltip({
- html: true,
- placement: 'bottom',
delay: { show: 500, hide: 0}
});
},
},
on_record_moved : function(record, old_group, old_index, new_group, new_index) {
var self = this;
- record.$el.children().find('[title]').tooltip('destroy');
+ record.$el.find('[title]').tooltip('destroy');
$(old_group.$el).add(new_group.$el).find('.oe_kanban_aggregates, .oe_kanban_group_length').hide();
if (old_group === new_group) {
new_group.records.splice(old_index, 1);
this.$records.data('widget', this);
this.$has_been_started.resolve();
var add_btn = this.$el.find('.oe_kanban_add');
- add_btn.tooltip({html: true, delay: { show: 500, hide:1000 }});
+ add_btn.tooltip({delay: { show: 500, hide:1000 }});
this.$records.find(".oe_kanban_column_cards").click(function (ev) {
if (ev.target == ev.currentTarget) {
if (!self.state.folded) {
return (new instance.web.Model(field.relation)).query([options.tooltip_on_group_by])
.filter([["id", "=", this.value]]).first().then(function(res) {
self.tooltip = res[options.tooltip_on_group_by];
- self.$(".oe_kanban_group_title_text").attr("title", self.tooltip || self.title || "").tooltip({html: true, placement: 'bottom'});
+ self.$(".oe_kanban_group_title_text").attr("title", self.tooltip || self.title || "").tooltip();
});
}
},
}
return self.view.qweb.render(template, self.qweb_context);
},
- placement: 'bottom',
- html: true,
});
// If no draghandle is found, make the whole card as draghandle (provided one can edit)
}
}, self.options);
self.$el.sparkline(value, sparkline_options);
- self.$el.tooltip({delay: {show: self.options.delayIn || 0, hide: 0}, html: true, title: function(){return title}, placement: 'bottom'});
+ self.$el.tooltip({delay: {show: self.options.delayIn || 0, hide: 0}, title: function(){return title}});
}, 0);
},
});