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 =
"onclick", $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 'ilOverlay.add("'.$this->overlay_el_id.
'", '.
173 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
176 $tpl->addJavascript(
"./Services/UIComponent/Overlay/js/ilOverlay.js");
187 $a_ov_corner =
"tl", $a_anch_corner =
"bl")
189 $center = ($a_center) ?
"true" :
"false";
190 return 'ilOverlay.addTrigger("'.$a_tr_id.
'","'.$a_tr_event.
'","'.$this->overlay_el_id.
'","'.
191 $a_anchor_el_id.
'", '.$center.
',"'.$a_ov_corner.
'","'.$a_anch_corner.
'"); ';
197 function addTrigger($a_tr_id, $a_tr_event, $a_anchor_el_id, $a_center =
false,
198 $a_ov_corner =
"tl", $a_anch_corner =
"bl")
201 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
204 $tpl->addJavascript(
"./Services/UIComponent/Overlay/js/ilOverlay.js");
205 $tpl->addOnLoadCode($this->
getTriggerOnLoadCode($a_tr_id, $a_tr_event, $a_anchor_el_id, $a_center,
206 $a_ov_corner, $a_anch_corner));