28 $this->overlay_el_id = $a_overlay_el_id;
38 function setAnchor($a_anchor_el_id, $a_ov_corner =
"tl", $a_anch_corner =
"bl")
40 $this->anchor_el_id = $a_anchor_el_id;
41 $this->anchor_ov_corner = $a_ov_corner;
42 $this->anchor_anch_corner = $a_anch_corner;
51 function setSize($a_width =
"", $a_height =
"")
53 $this->width = $a_width;
54 $this->height = $a_height;
64 $this->fixed_center = $a_fixed_center;
74 $this->visible = $a_visible;
83 function setTrigger($a_el_id, $a_event =
"click", $a_trigger_anchor_el_id = null)
85 $this->trigger_el_id = $a_el_id;
86 $this->trigger_event = $a_event;
87 $this->trigger_anchor_el_id = $a_trigger_anchor_el_id;
97 $this->auto_hide = $a_val;
117 $this->close_el = $a_val;
136 $yuicfg[
"visible"] = $this->visible ? true :
false;
138 if ($this->width !=
"")
143 if ($this->height !=
"")
147 $yuicfg[
"fixedcenter"] = $this->fixed_center ? true :
false;
148 if ($this->anchor_el_id !=
"")
150 $yuicfg[
"context"] =
array($this->anchor_el_id, $this->anchor_ov_corner,
151 $this->anchor_anch_corner,
array(
"beforeShow",
"windowResize"));
154 $cfg[
"yuicfg"] = $yuicfg;
155 $cfg[
"trigger"] = $this->trigger_el_id;
156 $cfg[
"trigger_event"] = $this->trigger_event;
157 $cfg[
"anchor_id"] = $this->trigger_anchor_el_id;
161 include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
163 return 'il.Overlay.add("'.$this->overlay_el_id.
'", '.
173 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
175 self::initJavascript();
189 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
191 $tpl->addJavascript(
"./Services/UIComponent/Overlay/js/ilOverlay.js");
202 $a_ov_corner =
"tl", $a_anch_corner =
"bl")
204 $center = ($a_center) ?
"true" :
"false";
205 return 'il.Overlay.addTrigger("'.$a_tr_id.
'","'.$a_tr_event.
'","'.$this->overlay_el_id.
'","'.
206 $a_anchor_el_id.
'", '.$center.
',"'.$a_ov_corner.
'","'.$a_anch_corner.
'"); ';
212 function addTrigger($a_tr_id, $a_tr_event, $a_anchor_el_id, $a_center =
false,
213 $a_ov_corner =
"tl", $a_anch_corner =
"bl")
216 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
218 self::initJavascript();
219 $tpl->addOnLoadCode($this->
getTriggerOnLoadCode($a_tr_id, $a_tr_event, $a_anchor_el_id, $a_center,
220 $a_ov_corner, $a_anch_corner));
setAutoHide($a_val)
Set auto hiding.
setFixedCenter($a_fixed_center=true)
Set fixed center.
setCloseElementId($a_val)
Set close element id.
add()
Makes an existing HTML element an overlay.
setTrigger($a_el_id, $a_event="click", $a_trigger_anchor_el_id=null)
Set trigger element.
static encode($mixed, $suppress_native=false)
This is a utility class for the yui overlays.
addTrigger($a_tr_id, $a_tr_event, $a_anchor_el_id, $a_center=false, $a_ov_corner="tl", $a_anch_corner="bl")
Add trigger.
setAnchor($a_anchor_el_id, $a_ov_corner="tl", $a_anch_corner="bl")
Set anchor element.
getOnLoadCode()
Makes an existing HTML element an overlay.
Create styles array
The data for the language used.
static initOverlay()
Init YUI Overlay module.
setSize($a_width="", $a_height="")
Set size.
getTriggerOnLoadCode($a_tr_id, $a_tr_event, $a_anchor_el_id, $a_center=false, $a_ov_corner="tl", $a_anch_corner="bl")
Get trigger onload code.
__construct($a_overlay_el_id)
Constructor.
setVisible($a_visible=true)
Set visible.
getCloseElementId()
Get close element id.
getAutoHide()
Get auto_hide.
static initJavascript()
Init javascript.