56 if (in_array($a_orientation,
59 $this->orientation = $a_orientation;
70 return $this->orientation;
80 $this->containerclass = $a_containerclass;
90 return $this->containerclass;
100 $this->icontainerclass = $a_containerclass;
110 return $this->icontainerclass;
120 $this->headerclass = $a_headerclass;
130 return $this->headerclass;
140 $this->active_headerclass = $a_h_class;
150 return $this->active_headerclass;
160 $this->contentclass = $a_contentclass;
170 return $this->contentclass;
180 $this->contentwidth = $a_contentwidth;
190 return $this->contentwidth;
200 $this->contentheight = $a_contentheight;
210 return $this->contentheight;
220 $this->behaviour = $a_val;
230 return $this->behaviour;
240 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
245 $tpl->addJavaScript(
"./Services/Accordion/js/accordion.js",
true, 3);
255 $tpl->addCss(
"./Services/Accordion/css/accordion.css");
263 $this->items[] = array(
"header" => $a_header,
264 "content" => $a_content);
282 self::$accordion_cnt++;
302 $this->addJavascript();
305 $tpl =
new ilTemplate(
"tpl.accordion.html",
true,
true,
"Services/Accordion");
306 foreach ($this->
getItems() as $item)
308 $tpl->setCurrentBlock(
"item");
309 $tpl->setVariable(
"HEADER", $item[
"header"]);
310 $tpl->setVariable(
"CONTENT", $item[
"content"]);
315 $tpl->setVariable(
"OR_SHORT", $or_short);
323 $tpl->setVariable(
"HEIGHT",
"height:".$height.
"px;");
327 $tpl->setVariable(
"HHEIGHT",
"height:".$height.
"px;");
329 $tpl->parseCurrentBlock();
332 $tpl->setVariable(
"CNT", self::$accordion_cnt);
339 include_once(
"./Services/Accordion/classes/class.ilAccordionPropertiesStorage.php");
341 $ctab = $stor->getProperty($this->
getId(), $ilUser->getId(),
343 $tpl->setVariable(
"BEHAVIOUR", $ctab);
344 $tpl->setVariable(
"SAVE_URL",
"./ilias.php?baseClass=ilaccordionpropertiesstorage&cmd=setOpenedTab".
345 "&accordion_id=".$this->
getId().
"&user_id=".$ilUser->getId());
351 $tpl->setVariable(
"OR2_SHORT", $or_short);
354 $tpl->setVariable(
"WIDTH", $width);
358 $tpl->setVariable(
"WIDTH",
"null");
362 $tpl->setVariable(
"CWIDTH",
'style="width:'.$width.
'px;"');
365 if ($this->head_class_set)
373 $tpl->setVariable(
"ACTIVE_HEAD_CLASS",
"il_HAccordionHeadActive");
377 $tpl->setVariable(
"ACTIVE_HEAD_CLASS",
"il_VAccordionHeadActive");