diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-01-26 15:14:08 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-01-26 15:14:08 +0100 |
| commit | 0a692eb7dea761617e9cb67fe0fd53a9ea91c1f8 (patch) | |
| tree | ed17cdbd2873de432cd034e20270eda29ba1b676 /addons/web/static/src/js | |
| parent | b0008792c4261f9346a0cd35274179ff8e2f9c3a (diff) | |
| parent | 06061d4872518dafa5d1a2305303d35a64981847 (diff) | |
[FIX] Changed tooltip plugin that caused problems under firefox
bzr revid: fme@openerp.com-20120126141408-zdkf21qqjxx019pq
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 9bec955c3d9..6ceb91973a6 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -798,17 +798,13 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo return QWeb.render(template, { "widget": this }); }, do_attach_tooltip: function(widget, trigger, options) { - if ($.browser.mozilla) { - // Unknown bug in old version of firefox : - // input type=text onchange event not fired when tootip is shown - return; - } widget = widget || this; trigger = trigger || this.$element; options = _.extend({ - delay: 1000, - maxWidth: '500px', - content: function() { + delayIn: 500, + delayOut: 0, + fade: true, + title: function() { var template = widget.template + '.tooltip'; if (!QWeb.has_template(template)) { template = 'WidgetLabel.tooltip'; @@ -816,10 +812,13 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo return QWeb.render(template, { debug: openerp.connection.debug, widget: widget - }); - } + })}, + gravity: $.fn.tipsy.autoNS, + html: true, + opacity: 0.85, + trigger: 'hover' }, options || {}); - trigger.tipTip(options); + trigger.tipsy(options); }, _build_view_fields_values: function(blacklist) { var a_dataset = this.view.dataset; @@ -998,7 +997,7 @@ openerp.web.form.WidgetNotebook = openerp.web.form.Widget.extend({ this.view.on_button_new.add_first(this.do_select_first_visible_tab); if (openerp.connection.debug) { this.do_attach_tooltip(this, this.$element.find('ul:first'), { - defaultPosition: 'top' + gravity: 's' }); } }, @@ -1218,9 +1217,7 @@ openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.f this.$element.find('.oe_field_translate').click(this.on_translate); } if (this.nolabel && openerp.connection.debug) { - this.do_attach_tooltip(this, this.$element, { - defaultPosition: 'top' - }); + this.do_attach_tooltip(this, this.$element); } }, set_value: function(value) { |
