12 const YUI_BASE =
"./libs/bower/bower_components/yui2/build";
22 if ($a_main_tpl == null) {
27 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
28 $tpl->addJavaScript(self::YUI_BASE .
"/connection/connection-min.js");
41 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
54 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
67 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
68 $tpl->addJavaScript(self::YUI_BASE .
"/animation/animation-min.js");
81 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
82 $tpl->addJavaScript(self::YUI_BASE .
"/dragdrop/dragdrop-min.js");
83 $tpl->addJavaScript(self::YUI_BASE .
"/element/element-min.js");
96 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
113 if ($a_main_tpl != null) {
119 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
120 $tpl->addJavaScript(self::YUI_BASE .
"/container/container-min.js");
121 self::addContainerCss(
$tpl);
122 $tpl->addCss(
"./Services/Calendar/css/panel_min.css");
125 $tpl->addCss(self::YUI_BASE .
"/resize/assets/skins/sam/resize.css");
126 $tpl->addJavaScript(self::YUI_BASE .
"/utilities/utilities-min.js");
127 $tpl->addJavaScript(self::YUI_BASE .
"/resize/resize-min.js");
141 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
142 $tpl->addJavaScript(self::YUI_BASE .
"/animation/animation-min.js");
143 $tpl->addJavaScript(self::YUI_BASE .
"/connection/connection-min.js");
156 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
157 $tpl->addJavaScript(self::YUI_BASE .
"/container/container_core.js");
158 $tpl->addJavaScript(self::YUI_BASE .
"/menu/menu-min.js");
159 $tpl->addCss(self::YUI_BASE .
"/menu/assets/menu.css");
170 if ($a_main_tpl == null) {
176 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
177 $tpl->addJavaScript(self::YUI_BASE .
"/container/container_core-min.js");
178 self::addContainerCss(
$tpl);
191 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
192 $tpl->addJavaScript(self::YUI_BASE .
"/container/container-min.js");
193 $tpl->addJavaScript(self::YUI_BASE .
"/dragdrop/dragdrop-min.js");
194 self::addContainerCss();
195 $tpl->addCss(
"./Services/YUI/templates/default/tpl.simpledialog.css");
208 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
209 $tpl->addJavaScript(self::YUI_BASE .
"/element/element-min.js");
210 $tpl->addJavaScript(self::YUI_BASE .
"/button/button-min.js");
211 $tpl->addJavaScript(self::YUI_BASE .
"/container/container-min.js");
212 $tpl->addCss(self::YUI_BASE .
"/button/assets/skins/sam/button.css");
213 self::addContainerCss();
226 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
227 $tpl->addJavaScript(self::YUI_BASE .
"/animation/animation-min.js");
228 $tpl->addJavaScript(self::YUI_BASE .
"/dragdrop/dragdrop-min.js");
229 $tpl->addCss(
"./Services/YUI/templates/default/DragDropList.css");
242 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
243 $tpl->addJavaScript(self::YUI_BASE .
"/animation/animation-min.js");
244 $tpl->addJavaScript(self::YUI_BASE .
"/dragdrop/dragdrop-min.js");
257 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
258 $tpl->addJavaScript(self::YUI_BASE .
"/element/element-min.js");
267 self::initDragDropList();
271 $template->setCurrentBlock(
"source_element");
280 $template->setCurrentBlock(
"dest_element");
288 $template->setVariable(
"TITLE_LIST_1", $title_source);
289 $template->setVariable(
"TITLE_LIST_2", $title_dest);
290 $template->setVariable(
"LIST_1", $id_source);
291 $template->setVariable(
"LIST_2", $id_dest);
297 public static function addYesNoDialog($dialogname, $headertext,
$message, $yesaction, $noaction, $defaultyes, $icon =
"help")
302 $lng = $DIC->language();
304 self::initSimpleDialog();
307 $template->setVariable(
"DIALOGNAME", $dialogname);
308 $template->setVariable(
"YES_ACTION", $yesaction);
309 $template->setVariable(
"NO_ACTION", $noaction);
310 $template->setVariable(
"DIALOG_HEADER", $headertext);
316 $template->setVariable(
"ICON",
"YAHOO.widget.SimpleDialog.ICON_WARN");
319 $template->setVariable(
"ICON",
"YAHOO.widget.SimpleDialog.ICON_TIP");
322 $template->setVariable(
"ICON",
"YAHOO.widget.SimpleDialog.ICON_INFO");
325 $template->setVariable(
"ICON",
"YAHOO.widget.SimpleDialog.ICON_BLOCK");
328 $template->setVariable(
"ICON",
"YAHOO.widget.SimpleDialog.ICON_ALARM");
332 $template->setVariable(
"ICON",
"YAHOO.widget.SimpleDialog.ICON_HELP");
340 $tpl->setCurrentBlock(
"HeadContent");
342 $tpl->parseCurrentBlock();
359 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
360 $tpl->addJavaScript(self::YUI_BASE .
"/calendar/calendar-min.js");
362 $tpl->addCss(self::YUI_BASE .
"/calendar/assets/skins/sam/calendar.css");
363 $tpl->addCss(
"./Services/Calendar/css/calendar.css");
381 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
382 $tpl->addJavaScript(self::YUI_BASE .
"/element/element-min.js");
384 $tpl->addJavaScript(self::YUI_BASE .
"/container/container_core-min.js");
385 $tpl->addJavaScript(self::YUI_BASE .
"/menu/menu-min.js");
387 $tpl->addJavaScript(self::YUI_BASE .
"/button/button-min.js");
389 $tpl->addCss(self::YUI_BASE .
"/button/assets/skins/sam/button.css");
390 $tpl->addCss(self::YUI_BASE .
"/menu/assets/skins/sam/menu.css");
407 self::initButtonControl();
409 $tpl->addJavaScript(self::YUI_BASE .
"/dragdrop/dragdrop-min.js");
410 $tpl->addJavaScript(self::YUI_BASE .
"/slider/slider-min.js");
411 $tpl->addJavaScript(self::YUI_BASE .
"/colorpicker/colorpicker-min.js");
413 $tpl->addCss(
'./Services/Form/css/color_picker.css');
414 $tpl->addCss(self::YUI_BASE .
"/colorpicker/assets/skins/sam/colorpicker.css");
427 $tpl->addCss(self::YUI_BASE .
"/tabview/assets/skins/sam/tabview.css");
428 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
429 $tpl->addJavaScript(self::YUI_BASE .
"/element/element-min.js");
430 $tpl->addJavaScript(self::YUI_BASE .
"/tabview/tabview-min.js");
444 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
445 $tpl->addJavaScript(self::YUI_BASE .
"/json/json-min.js");
458 $tpl->addCss(self::YUI_BASE .
"/assets/skins/sam/resize.css");
459 $tpl->addCss(self::YUI_BASE .
"/assets/skins/sam/layout.css");
461 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
462 $tpl->addJavaScript(self::YUI_BASE .
"/dragdrop/dragdrop-min.js");
463 $tpl->addJavaScript(self::YUI_BASE .
"/element/element-min.js");
464 $tpl->addJavaScript(self::YUI_BASE .
"/animation/animation-min.js");
465 $tpl->addJavaScript(self::YUI_BASE .
"/resize/resize-min.js");
466 $tpl->addJavaScript(self::YUI_BASE .
"/layout/layout-min.js");
479 $tpl->addJavaScript(self::getLocalPath() .
'/yahoo/yahoo-min.js');
480 $tpl->addJavaScript(self::getLocalPath() .
'/event/event-min.js');
481 $tpl->addJavaScript(self::getLocalPath() .
'/treeview/treeview.js');
494 self::addContainerCss();
495 $tpl->addJavaScript(self::YUI_BASE .
"/yahoo-dom-event/yahoo-dom-event.js");
496 $tpl->addJavaScript(self::YUI_BASE .
"/animation/animation-min.js");
497 $tpl->addJavaScript(self::YUI_BASE .
"/container/container-min.js");
504 public static function initCookie()
513 $tpl->addJavaScript(self::YUI_BASE .
"/cookie/cookie.js");
522 return self::YUI_BASE .
"/" . $a_name;
533 if ($a_main_tpl == null) {
539 $tpl->addCss(self::getLocalPath(
"container/assets/skins/sam/container.css"));
static initSimpleDialog()
Init YUI Simple Dialog.
static initTooltip()
Init YUI Event.
static initLayout()
Init layout (alpha!)
static initTreeView()
Init treeView.
static initAnimation()
Init YUI Animation.
static initElementSelection()
init element selection
static initConnection(ilTemplate $a_main_tpl=null)
Init YUI Connection module.
static initJson()
Init YUI JSON component.
if(!array_key_exists('StateId', $_REQUEST)) $id
static getDragDropList($id_source, $title_source, $source, $id_dest, $title_dest, $dest)
get a drag & drop list
static initMenu()
Init YUI Menu module.
static initAssessmentWizard()
Init assessment wizard.
static initDom()
Init YUI Dom.
static initOverlay(ilTemplate $a_main_tpl=null)
Init YUI Overlay module.
catch(Exception $e) $message
Yahoo YUI Library Utility functions.
special template class to simplify handling of ITX/PEAR
static initColorPicker()
init color picker button
static initDomEvent()
Init YUI DomEvent.
static initEvent()
Init YUI Event.
static initDragDropAnimation()
init drag & drop and animation
static getLocalPath($a_name="")
Get local path of a YUI js file.
static initButtonControl()
init button control In the moment used for calendar color picker button
static initDragDrop()
Init YUI Drag and Drop.
static addContainerCss(ilTemplate $a_main_tpl=null)
Add container css.
static initDragDropList()
init drag & drop list
static initPanel($a_resize=false, ilTemplate $a_main_tpl=null)
Init yui panel.
static addYesNoDialog($dialogname, $headertext, $message, $yesaction, $noaction, $defaultyes, $icon="help")
static initConnectionWithAnimation()
Init YUI Connection module.
static initTabView()
Init YUI TabView component.
static initCalendar()
init calendar