diff options
| author | qsm-odoo <qsm@odoo.com> | 2015-09-18 15:35:59 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2015-09-18 16:45:21 +0200 |
| commit | 0f95a92e15984fe4220a08ba14502e82fdf3f81e (patch) | |
| tree | 95856d0d1d1e18f44147a6b9dbddce7a0f208832 /addons/web_tip/static/src | |
| parent | 5955b2ef2a711dca84502268a6356c9cd7460a9b (diff) | |
[FIX] web_tip,web_kanban: tip color and position
The hightlight element when a tip is clicked was placed over a white
rectangle. This induced a problem if the element was itself white.
Also the dimension of the helper were badly computed.
+ remove specific tip style in kanban view
Diffstat (limited to 'addons/web_tip/static/src')
| -rw-r--r-- | addons/web_tip/static/src/js/tip.js | 12 | ||||
| -rw-r--r-- | addons/web_tip/static/src/less/tip.less | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/addons/web_tip/static/src/js/tip.js b/addons/web_tip/static/src/js/tip.js index d7687bb166c..518c337b225 100644 --- a/addons/web_tip/static/src/js/tip.js +++ b/addons/web_tip/static/src/js/tip.js @@ -207,6 +207,14 @@ var Tip = Class.extend({ this._set_helper_position(); this.scroll_to_tip(); + var $bgElem = this.$element; + var bgColor = $bgElem.css('background-color'); + while($bgElem.length > 0 && (bgColor === 'transparent' || bgColor === 'rgba(0, 0, 0, 0)')) { + $bgElem = $bgElem.parent(); + bgColor = $bgElem.css('background-color'); + } + this.$helper.css('background-color', bgColor || "white"); + $('body').append(this.$overlay); this.$element.addClass('oe_tip_show_element'); @@ -302,8 +310,8 @@ var Tip = Class.extend({ var _height = this.$element.outerHeight() + 10; this.$helper.offset({top: _top, left: _left}); - this.$helper.width(_width); - this.$helper.height(_height); + this.$helper.css('width', _width); + this.$helper.css('height', _height); }, _set_popover_position: function() { diff --git a/addons/web_tip/static/src/less/tip.less b/addons/web_tip/static/src/less/tip.less index e71e44f8e0d..9980a0dc83a 100644 --- a/addons/web_tip/static/src/less/tip.less +++ b/addons/web_tip/static/src/less/tip.less @@ -18,8 +18,7 @@ .oe_tip_helper { position: absolute; z-index: 1008; - background-color: @odoo-view-background-color; - border: 1px solid @odoo-brand-secondary; + border: 5px solid @odoo-view-background-color; border-radius: @border-radius-base; box-shadow: 0 2px 15px rgba(0,0,0,.4); .o-transition(all, 300ms, ease-out); @@ -39,7 +38,8 @@ .oe_tip_show_element { z-index: 1011 !important; - position: relative; + position: relative !important; + border: none !important; } .oe_breathing { |
