ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilYuiUtil Class Reference

Yahoo YUI Library Utility functions. More...

+ Collaboration diagram for ilYuiUtil:

Static Public Member Functions

static initConnection ()
 Init YUI Connection module.
static initEvent ()
 Init YUI Event.
static initDom ()
 Init YUI Dom.
static initAnimation ()
 Init YUI Animation.
static initDragDrop ()
 Init YUI Drag and Drop.
static initDomEvent ()
 Init YUI DomEvent.
static initPanel ($a_resize=false)
 Init yui panel.
static initConnectionWithAnimation ()
 Init YUI Connection module.
static initMenu ()
 Init YUI Menu module.
static initOverlay ()
 Init YUI Overlay module.
static initSimpleDialog ()
 Init YUI Simple Dialog.
static initAssessmentWizard ()
 Init assessment wizard.
static initDragDropList ()
 init drag & drop list
static initDragDropAnimation ()
 init drag & drop and animation
static initElementSelection ()
 init element selection
static getDragDropList ($id_source, $title_source, $source, $id_dest, $title_dest, $dest)
 get a drag & drop list
static addYesNoDialog ($dialogname, $headertext, $message, $yesaction, $noaction, $defaultyes, $icon="help")
static initCalendar ()
 init calendar
static initButtonControl ()
 init button control In the moment used for calendar color picker button
static initColorPicker ()
 init color picker button
static initTabView ()
 Init YUI TabView component.
static initAutoComplete ()
 Init YUI AutoComplete component.
static initJson ()
 Init YUI JSON component.
static initLayout ()
 Init layout (alpha!)
static initTreeView ()
 Init treeView.
static initTooltip ()
 Init YUI Event.
static getLocalPath ($a_name="")
 Get local path of a YUI js file.

Static Protected Member Functions

static addContainerCss ()
 Add container css.

Static Private Attributes

static $ver = "2_9_0"

Detailed Description

Yahoo YUI Library Utility functions.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilYuiUtil.php.

Member Function Documentation

static ilYuiUtil::addContainerCss ( )
staticprotected

Add container css.

Definition at line 451 of file class.ilYuiUtil.php.

References $tpl.

Referenced by initAssessmentWizard(), initOverlay(), initPanel(), initSimpleDialog(), and initTooltip().

{
global $tpl;
$tpl->addCss(self::getLocalPath("container/assets/skins/sam/container.css"));
}

+ Here is the caller graph for this function:

static ilYuiUtil::addYesNoDialog (   $dialogname,
  $headertext,
  $message,
  $yesaction,
  $noaction,
  $defaultyes,
  $icon = "help" 
)
static

Definition at line 243 of file class.ilYuiUtil.php.

References $lng, $tpl, and initSimpleDialog().

{
global $tpl, $lng;
$template = new ilTemplate("tpl.yes_no_dialog.js", TRUE, TRUE, "Services/YUI");
$template->setVariable("DIALOGNAME", $dialogname);
$template->setVariable("YES_ACTION", $yesaction);
$template->setVariable("NO_ACTION", $noaction);
$template->setVariable("DIALOG_HEADER", $headertext);
$template->setVariable("DIALOG_MESSAGE", $message);
$template->setVariable("TEXT_YES", $lng->txt("yes"));
$template->setVariable("TEXT_NO", $lng->txt("no"));
switch ($icon)
{
case "warn":
$template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_WARN");
break;
case "tip":
$template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_TIP");
break;
case "info":
$template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_INFO");
break;
case "block":
$template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_BLOCK");
break;
case "alarm":
$template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_ALARM");
break;
case "help":
default:
$template->setVariable("ICON", "YAHOO.widget.SimpleDialog.ICON_HELP");
break;
}
if ($defaultyes)
{
$template->touchBlock("isDefaultYes");
}
else
{
$template->touchBlock("isDefaultNo");
}
$tpl->setCurrentBlock("HeadContent");
$tpl->setVariable("CONTENT_BLOCK", $template->get());
$tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

static ilYuiUtil::getDragDropList (   $id_source,
  $title_source,
  $source,
  $id_dest,
  $title_dest,
  $dest 
)
static

get a drag & drop list

Definition at line 211 of file class.ilYuiUtil.php.

References initDragDropList().

{
$template = new ilTemplate("tpl.dragdroplist.html", TRUE, TRUE, "Services/YUI");
foreach ($source as $id => $name)
{
$template->setCurrentBlock("source_element");
$template->setVariable("ELEMENT_ID", $id);
$template->setVariable("ELEMENT_NAME", $name);
$template->parseCurrentBlock();
$template->setCurrentBlock("element");
$template->setVariable("ELEMENT_ID", $id);
$template->parseCurrentBlock();
}
foreach ($dest as $id => $name)
{
$template->setCurrentBlock("dest_element");
$template->setVariable("ELEMENT_ID", $id);
$template->setVariable("ELEMENT_NAME", $name);
$template->parseCurrentBlock();
$template->setCurrentBlock("element");
$template->setVariable("ELEMENT_ID", $id);
$template->parseCurrentBlock();
}
$template->setVariable("TITLE_LIST_1", $title_source);
$template->setVariable("TITLE_LIST_2", $title_dest);
$template->setVariable("LIST_1", $id_source);
$template->setVariable("LIST_2", $id_dest);
return $template->get();
}

+ Here is the call graph for this function:

static ilYuiUtil::getLocalPath (   $a_name = "")
static

Get local path of a YUI js file.

Definition at line 443 of file class.ilYuiUtil.php.

Referenced by ilSCORM13Player\debugGUI(), ilCOPageHTMLExport\exportSupportScripts(), ilObjForumGUI\getForumExplorer(), ilSCORM13Player\getPlayer(), and ilObjContentObject\getSupplyingExportFiles().

{
return "./Services/YUI/js/".self::$ver."/".$a_name;
}

+ Here is the caller graph for this function:

static ilYuiUtil::initAnimation ( )
static

Init YUI Animation.

Definition at line 51 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilAccordionGUI\addJavaScript(), and ilPropertyFormGUI\getContent().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/animation/animation-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initAssessmentWizard ( )
static

Init assessment wizard.

Definition at line 160 of file class.ilYuiUtil.php.

References $tpl, and addContainerCss().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/button/button-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container-min.js");
$tpl->addCss("./Services/YUI/js/".self::$ver."/button/assets/skins/sam/button.css");
}

+ Here is the call graph for this function:

static ilYuiUtil::initAutoComplete ( )
static

Init YUI AutoComplete component.

Author
jposs.nosp@m.elt@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

Definition at line 372 of file class.ilYuiUtil.php.

References $tpl, and initJson().

Referenced by ilTextInputGUI\render(), and ilMailAddressbookGUI\showAddressbook().

{
global $tpl;
$tpl->addCss("./Services/YUI/js/".self::$ver."/autocomplete/assets/skins/sam/autocomplete.css");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/datasource/datasource-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/connection/connection-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/autocomplete/autocomplete-min.js");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilYuiUtil::initButtonControl ( )
static

init button control In the moment used for calendar color picker button

public

Returns
void

Definition at line 318 of file class.ilYuiUtil.php.

References $tpl.

Referenced by initColorPicker().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container_core-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/menu/menu-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/button/button-min.js");
$tpl->addCss("./Services/YUI/js/".self::$ver."/button/assets/skins/sam/button.css");
$tpl->addCss("./Services/YUI/js/".self::$ver."/menu/assets/skins/sam/menu.css");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initCalendar ( )
static

init calendar

public

Returns

Definition at line 299 of file class.ilYuiUtil.php.

References $tpl.

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/calendar/calendar-min.js");
$tpl->addCss("./Services/YUI/js/".self::$ver."/calendar/assets/skins/sam/calendar.css");
$tpl->addCss("./Services/Calendar/css/calendar.css");
}
static ilYuiUtil::initColorPicker ( )
static

init color picker button

public

Returns
void

Definition at line 341 of file class.ilYuiUtil.php.

References $tpl, and initButtonControl().

Referenced by ilColorPickerInputGUI\insert(), and ilTRBLColorPickerInputGUI\insert().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/dragdrop/dragdrop-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/slider/slider-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/colorpicker/colorpicker-min.js");
$tpl->addCss('./Services/Form/css/color_picker.css');
$tpl->addCss("./Services/YUI/js/".self::$ver."/colorpicker/assets/skins/sam/colorpicker.css");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilYuiUtil::initConnection ( )
static

Init YUI Connection module.

Definition at line 19 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilAccordionGUI\addJavaScript(), ilPCDataTableGUI\editData(), ilObjForumGUI\getForumExplorer(), ilInternalLinkGUI\getInitHTML(), ilExplorer\getOutput(), ilBlockGUI\ilBlockGUI(), ilTable2GUI\renderFilter(), ilAdvancedSelectionListGUI\setAsynch(), and ilPageObjectGUI\showPage().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/connection/connection-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initConnectionWithAnimation ( )
static

Init YUI Connection module.

Definition at line 109 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilTestOutputGUI\executeCommand(), and ilFlashFileInputGUI\insert().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/animation/animation-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/connection/connection-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initDom ( )
static

Init YUI Dom.

Definition at line 40 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilAccordionGUI\addJavaScript(), ilPropertyFormGUI\getContent(), and ilTemplate\show().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initDragDrop ( )
static

Init YUI Drag and Drop.

Definition at line 62 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilHierarchyFormGUI\__construct(), ilPCDataTableGUI\editData(), ilInternalLinkGUI\getInitHTML(), assMatchingQuestionGUI\getPreviewJS(), assMatchingQuestionGUI\getTestOutputJS(), ilSurveyPageGUI\renderPage(), ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), ilCalendarMonthGUI\show(), and ilPageObjectGUI\showPage().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/dragdrop/dragdrop-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initDragDropAnimation ( )
static

init drag & drop and animation

Definition at line 188 of file class.ilYuiUtil.php.

References $tpl.

Referenced by assOrderingHorizontalGUI\getPreview(), and assOrderingHorizontalGUI\getTestOutput().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/animation/animation-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/dragdrop/dragdrop-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initDragDropList ( )
static

init drag & drop list

Definition at line 175 of file class.ilYuiUtil.php.

References $tpl.

Referenced by getDragDropList().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/animation/animation-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/dragdrop/dragdrop-min.js");
$tpl->addCss("./Services/YUI/templates/default/DragDropList.css");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initElementSelection ( )
static

init element selection

Definition at line 200 of file class.ilYuiUtil.php.

References $tpl.

Referenced by assErrorTextGUI\getPreview(), and assErrorTextGUI\getTestOutput().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initEvent ( )
static

Init YUI Event.

Definition at line 30 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilAccordionGUI\addJavaScript(), and ilPropertyFormGUI\getContent().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initJson ( )
static

Init YUI JSON component.

Author
jposs.nosp@m.elt@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

Definition at line 390 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilChatroomBlockGUI\getHTML(), and initAutoComplete().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/json/json-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initLayout ( )
static

Init layout (alpha!)

Definition at line 400 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilTemplate\enableAdvancedColumnLayout().

{
global $tpl;
$tpl->addCss("./Services/YUI/js/".self::$ver."/assets/skins/sam/resize.css");
$tpl->addCss("./Services/YUI/js/".self::$ver."/assets/skins/sam/layout.css");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/dragdrop/dragdrop-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/animation/animation-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/resize/resize-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/layout/layout-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initMenu ( )
static

Init YUI Menu module.

Definition at line 121 of file class.ilYuiUtil.php.

References $tpl.

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container_core.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/menu/menu-min.js");
$tpl->addCss("./Services/YUI/js/".self::$ver."/menu/assets/menu.css");
}
static ilYuiUtil::initOverlay ( )
static

Init YUI Overlay module.

Definition at line 134 of file class.ilYuiUtil.php.

References $tpl, and addContainerCss().

Referenced by ilAdvancedSelectionListGUI\getHTML(), and ilOverlayGUI\initJavascript().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container_core-min.js");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilYuiUtil::initPanel (   $a_resize = false)
static

Init yui panel.

public

Parameters
void
Returns
void

Definition at line 88 of file class.ilYuiUtil.php.

References $tpl, and addContainerCss().

Referenced by ilPCDataTableGUI\editData(), ilInternalLinkGUI\getInitHTML(), ilTaggingGUI\initJavascript(), ilNoteGUI\initJavascript(), ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), ilCalendarMonthGUI\show(), and ilPageObjectGUI\showPage().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container-min.js");
$tpl->addCss("./Services/Calendar/css/panel_min.css");
if ($a_resize)
{
$tpl->addCss("./Services/YUI/js/".self::$ver."/resize/assets/skins/sam/resize.css");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/utilities/utilities-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/resize/resize-min.js");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilYuiUtil::initSimpleDialog ( )
static

Init YUI Simple Dialog.

Definition at line 146 of file class.ilYuiUtil.php.

References $tpl, and addContainerCss().

Referenced by addYesNoDialog().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/dragdrop/dragdrop-min.js");
$tpl->addCss("./Services/YUI/templates/default/tpl.simpledialog.css");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilYuiUtil::initTabView ( )
static

Init YUI TabView component.

Definition at line 358 of file class.ilYuiUtil.php.

References $tpl.

{
global $tpl;
$tpl->addCss("./Services/YUI/js/".self::$ver."/tabview/assets/skins/sam/tabview.css");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/tabview/tabview-min.js");
}
static ilYuiUtil::initTooltip ( )
static

Init YUI Event.

Definition at line 430 of file class.ilYuiUtil.php.

References $tpl, and addContainerCss().

Referenced by ilTooltipGUI\addTooltip().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/animation/animation-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container-min.js");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilYuiUtil::initTreeView ( )
static

Init treeView.

Definition at line 418 of file class.ilYuiUtil.php.

References $tpl.

{
global $tpl;
$tpl->addJavaScript(self::getLocalPath().'/yahoo/yahoo-min.js');
$tpl->addJavaScript(self::getLocalPath().'/event/event-min.js');
$tpl->addJavaScript(self::getLocalPath().'/treeview/treeview.js');
}

Field Documentation

ilYuiUtil::$ver = "2_9_0"
staticprivate

Definition at line 14 of file class.ilYuiUtil.php.


The documentation for this class was generated from the following file: