mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-16 11:38:02 +02:00
Add tooltip for Tab's header, it can be set as attribute 'hint' in openTab framework app object too
This commit is contained in:
@ -308,6 +308,7 @@ function egw_fw_ui_tab(_parent, _contHeaderDiv, _contDiv, _icon, _callback,
|
||||
this.position = _pos;
|
||||
this.status = _status;
|
||||
this.notification = 0;
|
||||
this.hint = '';
|
||||
|
||||
//Create the header div and set its "click" function and "hover" event
|
||||
this.headerDiv = document.createElement("span");
|
||||
@ -439,6 +440,17 @@ egw_fw_ui_tab.prototype.setTitle = function(_title)
|
||||
jQuery(this.headerH1).text(_title);
|
||||
};
|
||||
|
||||
/**
|
||||
* setHint sets tooltip of this tab. An existing tooltip will be removed.
|
||||
*
|
||||
* @param {string} _hint Text which should be displayed.
|
||||
*/
|
||||
egw_fw_ui_tab.prototype.setHint = function(_hint)
|
||||
{
|
||||
this.hint = _hint;
|
||||
egw().tooltipBind(jQuery(this.headerDiv), _hint);
|
||||
};
|
||||
|
||||
/**
|
||||
* setTitle sets the content of this tab. Existing content is removed.
|
||||
*
|
||||
|
Reference in New Issue
Block a user