diff options
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_renderer.js | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_renderer.js b/addons/web/static/src/js/views/basic/basic_renderer.js index 3d5c14e0b10..322b284a742 100644 --- a/addons/web/static/src/js/views/basic/basic_renderer.js +++ b/addons/web/static/src/js/views/basic/basic_renderer.js @@ -280,14 +280,7 @@ var BasicRenderer = AbstractRenderer.extend(WidgetAdapterMixin, { // should be attached if not given, the tooltip is attached on the // widget's $el $node = $node.length ? $node : widget.$el; - $node.tooltip({ - title: function () { - return qweb.render('WidgetLabel.tooltip', { - debug: config.isDebug(), - widget: widget, - }); - } - }); + $node.tooltip(this._getTooltipOptions(widget)); }, /** * Does the necessary DOM updates to match the given modifiers data. The @@ -414,6 +407,22 @@ var BasicRenderer = AbstractRenderer.extend(WidgetAdapterMixin, { return null; }, /** + * Get the options for the tooltip. This allow to change this options in another module. + * @param widget + * @return {{}} + * @private + */ + _getTooltipOptions: function (widget) { + return { + title: function () { + return qweb.render('WidgetLabel.tooltip', { + debug: config.isDebug(), + widget: widget, + }); + } + }; + }, + /** * @private * @param {jQueryElement} $el * @param {Object} node |
