From 0d7ff5dec8e6b800945d4616215b671a5e80bbd8 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 9 Feb 2012 11:54:01 +0100 Subject: [PATCH] [FIX] Fix some tipsy stuff Autobound on 'n' fails with absolute positioned elements. Make tipsy checks that it's element is still attached to another element bzr revid: fme@openerp.com-20120209105401-1jl11sy9z1qdwu3t --- addons/web/static/lib/jquery.tipsy/jquery.tipsy.js | 4 ++++ addons/web/static/src/js/view_form.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/web/static/lib/jquery.tipsy/jquery.tipsy.js b/addons/web/static/lib/jquery.tipsy/jquery.tipsy.js index 9567ed3bacc..d33cef28462 100644 --- a/addons/web/static/lib/jquery.tipsy/jquery.tipsy.js +++ b/addons/web/static/lib/jquery.tipsy/jquery.tipsy.js @@ -18,6 +18,10 @@ Tipsy.prototype = { show: function() { + $('div.tipsy').stop().remove(); + if (!this.$element.parent().length) { + return; + } var title = this.getTitle(); if (title && this.enabled) { var $tip = this.tip(); diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index de7b1667871..c1e5b055b7b 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -867,7 +867,7 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo debug: openerp.connection.debug, widget: widget })}, - gravity: $.fn.tipsy.autoBounds(50, 'n'), + gravity: $.fn.tipsy.autoBounds(50, 'nw'), html: true, opacity: 0.85, trigger: 'hover'