Add header buttons directly to the parent element.

This commit is contained in:
kovacsv 2021-11-27 20:39:49 +01:00
parent 9024b71751
commit e88600afc3

View File

@ -136,7 +136,7 @@ OV.SetSvgIconImageElement = function (iconElement, iconName)
iconDiv.className = 'icon icon-' + iconName;
};
OV.CreateHeaderButton = function (iconName, title, link)
OV.CreateHeaderButton = function (parentElement, iconName, title, link)
{
let buttonLink = OV.CreateDomElement ('a');
buttonLink.setAttribute ('href', link);
@ -144,6 +144,7 @@ OV.CreateHeaderButton = function (iconName, title, link)
buttonLink.setAttribute ('rel', 'noopener noreferrer');
OV.InstallTooltip (buttonLink, title);
OV.AddSvgIconElement (buttonLink, iconName, 'header_button');
parentElement.appendChild (buttonLink);
return buttonLink;
};