[FIX]tooltip: overwrite bootstrap default for tooltip
bzr revid: csn@openerp.com-20140417085954-mirh4eeotsorlyeo
This commit is contained in:
parent
37fab3d03d
commit
347985e050
|
@ -1076,7 +1076,7 @@ instance.web.Client = instance.web.Widget.extend({
|
|||
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();
|
||||
|
|
|
@ -788,6 +788,11 @@ instance.web.unblockUI = function() {
|
|||
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
|
||||
*/
|
||||
|
|
|
@ -1876,8 +1876,6 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
|
|||
widget: widget
|
||||
});
|
||||
},
|
||||
placement: "auto top",
|
||||
html: true,
|
||||
}, options || {});
|
||||
$(trigger).tooltip(options);
|
||||
},
|
||||
|
|
|
@ -581,10 +581,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
|||
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, {
|
||||
|
@ -1161,8 +1158,6 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
|||
$(this).toggle(!!$(this).find('li').length);
|
||||
});
|
||||
self.$("[title]").tooltip({
|
||||
html: true,
|
||||
placement: 'bottom',
|
||||
delay: { show: 500, hide: 0}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -441,7 +441,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
},
|
||||
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);
|
||||
|
@ -648,7 +648,7 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
|
|||
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) {
|
||||
|
@ -688,7 +688,7 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
|
|||
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();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -934,8 +934,6 @@ instance.web_kanban.KanbanRecord = instance.web.Widget.extend({
|
|||
}
|
||||
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)
|
||||
|
|
|
@ -29,7 +29,7 @@ instance.web_kanban.SparklineBarWidget = instance.web_kanban.AbstractField.exten
|
|||
}
|
||||
}, 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);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue