Files
aowow/template/bricks/tooltip.tpl.php
Sarjuuk 26226e2bad Template/Update (Part 18)
* convert dbtype 'item'
 * StatsContainer::toJson - exclude empty values in listviews + xml
2025-09-25 15:56:47 +02:00

50 lines
1.9 KiB
PHP

<?php
namespace Aowow\Template;
use \Aowow\Lang;
[$icName, $icStack, $hasBuff] = $this->tooltip;
?>
<div id="ic<?=$this->typeId; ?>" style="float: left"></div>
<div id="tt<?=$this->typeId; ?>" class="wowhead-tooltip" style="float: left; padding-top: 1px"></div>
<div style="clear: left"></div>
<div id="sl<?=$this->typeId; ?>" style="margin-left: 70px; margin-top: 4px;"></div>
<div id="ks<?=$this->typeId; ?>" style="margin-left: 70px; margin-top: 4px;"></div>
<?php
if ($hasBuff):
?>
<h3><?=Lang::spell('_aura'); ?></h3>
<div id="btt<?=$this->typeId; ?>" class="wowhead-tooltip"></div>
<?php
endif;
/*
tt: Tooltip
btt: Buff-Tooltip
sl: Slider for CharLevel
ks: Known Spells
*/
?>
<script type="text/javascript">//<![CDATA[
$WH.ge('ic<?=$this->typeId; ?>').appendChild(Icon.create('<?=$icName; ?>', 2, null, 0, <?=$icStack; ?>));
var
tt = $WH.ge('tt<?=$this->typeId; ?>'),
<?php if ($hasBuff): ?>
btt = $WH.ge('btt<?=$this->typeId; ?>'),
<?php endif; ?>
sl = $WH.ge('sl<?=$this->typeId; ?>'),
ks = $WH.ge('ks<?=$this->typeId; ?>');
tt.innerHTML = '<table><tr><td>' + ($WH.g_enhanceTooltip.bind(tt))(<?=$this->typeId; ?>, true, true, sl, null, [<?=$this->typeId; ?>], ks) + '</td><th style="background-position: top right"></th></tr><tr><th style="background-position: bottom left"></th><th style="background-position: bottom right"></th></tr></table>';
<?php if ($hasBuff): ?>
btt.innerHTML = '<table><tr><td>' + ($WH.g_enhanceTooltip.bind(btt))(<?=$this->typeId; ?>, true, true, sl, tt, [<?=$this->typeId; ?>], ks) + '</td><th style="background-position: top right"></th></tr><tr><th style="background-position: bottom left"></th><th style="background-position: bottom right"></th></tr></table>';
<?php endif; ?>
$WH.Tooltip.fixSafe(tt, 1, 1);
<?php if ($hasBuff): ?>
$WH.Tooltip.fixSafe(btt, 1, 1);
<?php endif; ?>
//]]></script>