Fix options not available

This commit is contained in:
Hadi Nategh 2022-06-02 17:59:43 +02:00
parent f6340e21d0
commit 2b85b0b920

View File

@ -116,7 +116,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
* @param {string} _html * @param {string} _html
* @param {boolean} _isHtml if set to true content gets appended as html * @param {boolean} _isHtml if set to true content gets appended as html
*/ */
function prepare(_html, _isHtml) function prepare(_html, _isHtml, _options)
{ {
// Free and null the old tooltip_div // Free and null the old tooltip_div
hide(); hide();
@ -137,7 +137,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
//The tooltip should automatically hide when the mouse comes over it //The tooltip should automatically hide when the mouse comes over it
tooltip_div.mouseenter(function() { tooltip_div.mouseenter(function() {
if (options.hideonhover) hide(); if (_options.hideonhover) hide();
}); });
} }
@ -183,7 +183,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
if (_elem != current_elem) if (_elem != current_elem)
{ {
//Prepare the tooltip //Prepare the tooltip
prepare(_html, _isHtml); prepare(_html, _isHtml, options);
// Set the current element the mouse is over and // Set the current element the mouse is over and
// initialize the position variables // initialize the position variables