예제 #1
0
 /**
  * Adds a tooltip to an HTML element
  *
  * @param string $a_el_id element id
  * @param string $a_el_id tooltip text
  * @param string $a_el_id element id of container the tooltip should be added to
  */
 static function addTooltip($a_el_id, $a_text, $a_container = "", $a_my = "bottom center", $a_at = "top center", $a_use_htmlspecialchars = true)
 {
     global $tpl;
     self::initLibrary();
     if (!self::$initialized) {
         $tpl->addJavascript("./Services/UIComponent/Tooltip/js/ilTooltip.js");
         $tpl->addOnLoadCode('il.Tooltip.init();', 3);
         self::$initialized = true;
     }
     $code = self::getTooltip($a_el_id, $a_text, $a_container, $a_my, $a_at, $a_use_htmlspecialchars);
     $tpl->addOnLoadCode($code);
 }
 /**
  * Adds a tooltip to an HTML element
  *
  * @param string $a_el_id element id
  * @param string $a_el_id tooltip text
  * @param string $a_el_id element id of container the tooltip should be added to
  */
 static function addTooltip($a_el_id, $a_text, $a_container = "", $a_my = "bottom center", $a_at = "top center", $a_use_htmlspecialchars = true)
 {
     global $tpl;
     if (!self::$initialized) {
         //			include_once("./Services/YUI/classes/class.ilYuiUtil.php");
         //			ilYuiUtil::initTooltip();
         $tpl->addCss("./Services/UIComponent/Tooltip/lib/qtip_2_0_nightly/jquery.qtip.min.css");
         $tpl->addJavascript("./Services/UIComponent/Tooltip/lib/qtip_2_0_nightly/jquery.qtip.min.js");
         $tpl->addJavascript("./Services/UIComponent/Tooltip/js/ilTooltip.js");
         $tpl->addOnLoadCode('il.Tooltip.init();', 3);
         self::$initialized = true;
     }
     $code = self::getTooltip($a_el_id, $a_text, $a_container, $a_my, $a_at, $a_use_htmlspecialchars);
     $tpl->addOnLoadCode($code);
 }