diff --git a/management/univention-management-console-frontend/umc/widgets/Button.js b/management/univention-management-console-frontend/umc/widgets/Button.js index af539ba..938a2f0 100644 --- a/management/univention-management-console-frontend/umc/widgets/Button.js +++ b/management/univention-management-console-frontend/umc/widgets/Button.js @@ -95,19 +95,16 @@ define([ }, _setDescriptionAttr: function(description) { - if (description && this.handlesTooltips) { + if (!this._tooltip) { + // create the tooltip for the first time this._tooltip = new Tooltip({ label: description, connectId: [ this.domNode ] }); - // destroy the tooltip when the widget is destroyed this.own(this._tooltip); - } else { - if (this._tooltip) { - //deactivate tooltip - this._tooltip.set('label', ''); - } } + + this._tooltip.set('label', description || ''); } }); diff --git a/management/univention-management-console-frontend/umc/widgets/Uploader.js b/management/univention-management-console-frontend/umc/widgets/Uploader.js index f75f33c..cfec073 100644 --- a/management/univention-management-console-frontend/umc/widgets/Uploader.js +++ b/management/univention-management-console-frontend/umc/widgets/Uploader.js @@ -326,19 +326,16 @@ define([ _setDescriptionAttr: function(description) { - if (description && this.handlesTooltips) { + if (!this._tooltip) { + // create the tooltip for the first time this._tooltip = new Tooltip({ label: description, connectId: [ this.domNode ] }); - // destroy the tooltip when the widget is destroyed - this.own(this.tooltip); - } else { - if (this._tooltip) { - //deactivate tooltip - this._tooltip.set('label', ''); - } + this.own(this._tooltip); } + + this._tooltip.set('label', description || ''); }, _setDisabledAttr: function(newVal) {