|
Lines 326-344
define([
Link Here
|
| 326 |
|
326 |
|
| 327 |
|
327 |
|
| 328 |
_setDescriptionAttr: function(description) { |
328 |
_setDescriptionAttr: function(description) { |
| 329 |
if (description && this.handlesTooltips) { |
329 |
if (!this._tooltip) { |
|
|
330 |
// create the tooltip for the first time |
| 330 |
this._tooltip = new Tooltip({ |
331 |
this._tooltip = new Tooltip({ |
| 331 |
label: description, |
332 |
label: description, |
| 332 |
connectId: [ this.domNode ] |
333 |
connectId: [ this.domNode ] |
| 333 |
}); |
334 |
}); |
| 334 |
// destroy the tooltip when the widget is destroyed |
335 |
this.own(this._tooltip); |
| 335 |
this.own(this.tooltip); |
|
|
| 336 |
} else { |
| 337 |
if (this._tooltip) { |
| 338 |
//deactivate tooltip |
| 339 |
this._tooltip.set('label', ''); |
| 340 |
} |
| 341 |
} |
336 |
} |
|
|
337 |
|
| 338 |
this._tooltip.set('label', description || ''); |
| 342 |
}, |
339 |
}, |
| 343 |
|
340 |
|
| 344 |
_setDisabledAttr: function(newVal) { |
341 |
_setDisabledAttr: function(newVal) { |