ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilYuiUtil Class Reference

Yahoo YUI Library Utility functions. More...

+ Collaboration diagram for ilYuiUtil:

Public Member Functions

 initPanel ()
 Init yui panel.
 getLocalPath ($a_name="")
 Get local path of a YUI js file.

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 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 Private Attributes

static $ver = "2_7_0b"

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::addYesNoDialog (   $dialogname,
  $headertext,
  $message,
  $yesaction,
  $noaction,
  $defaultyes,
  $icon = "help" 
)
static

Definition at line 234 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 202 of file class.ilYuiUtil.php.

References $name, and 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:

ilYuiUtil::getLocalPath (   $a_name = "")

Get local path of a YUI js file.

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

Referenced by ilSCORM2004Sco\exportHTML(), ilObjContentObject\exportHTML(), and ilSCORM13Player\getPlayer().

{
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 50 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 151 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."/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");
$tpl->addCss("./Services/YUI/js/".self::$ver."/container/assets/skins/sam/container.css");
}
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 377 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");
if (self::$ver == "2_5_0")
{
$tpl->addJavaScript('./Services/YUI/js/2_5_0/datasource/datasource-beta-min.js');
}
else
{
$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 309 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilCalendarCategoryGUI\edit(), and initColorPicker().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/yahoo-dom-event/yahoo-dom-event.js");
if (self::$ver == "2_5_0")
{
$tpl->addJavaScript("./Services/YUI/js/2_5_0/element/element-beta-min.js");
}
else
{
$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 290 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 339 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 18 of file class.ilYuiUtil.php.

References $tpl.

Referenced by 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 101 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 39 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 61 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilHierarchyFormGUI\__construct(), assMatchingQuestionGUI\getPreviewJS(), assMatchingQuestionGUI\getTestOutputJS(), ilCalendarDayGUI\show(), ilCalendarMonthGUI\show(), ilCalendarWeekGUI\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 179 of file class.ilYuiUtil.php.

References $tpl.

Referenced by assOrderingHorizontalGUI\getPreview(), assOrderingQuestionGUI\getPreview(), assOrderingHorizontalGUI\getTestOutput(), and assOrderingQuestionGUI\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 166 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 191 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 29 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 402 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilChatBlockGUI\getHTML(), initAutoComplete(), and ilObjChatGUI\showUserFrameObject().

{
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 412 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilTemplate\enableAdvancedColumnLayout().

{
global $tpl;
// $tpl->addCss("./Services/YUI/js/2_5_0/reset-fonts-grids/reset-fonts-grids.css");
$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");
if (self::$ver == "2_5_0")
{
$tpl->addJavaScript("./Services/YUI/js/2_5_0/element/element-beta-min.js");
}
else
{
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
}
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/animation/animation-min.js");
if (self::$ver == "2_5_0")
{
$tpl->addJavaScript("./Services/YUI/js/2_5_0/resize/resize-beta-min.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/layout/layout-beta-min.js");
}
else
{
$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 113 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilObjChatGUI\showUserFrameObject().

{
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");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initOverlay ( )
static

Init YUI Overlay module.

Definition at line 126 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-min.js");
}
ilYuiUtil::initPanel ( )

Init yui panel.

public

Parameters
void
Returns
void

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

References $tpl.

Referenced by ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), and ilCalendarMonthGUI\show().

{
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/YUI/js/".self::$ver."/container/assets/skins/sam/container.css");
$tpl->addCss("./Services/Calendar/css/panel_min.css");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initSimpleDialog ( )
static

Init YUI Simple Dialog.

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

References $tpl.

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/js/".self::$ver."/container/assets/container.css");
$tpl->addCss("./Services/YUI/templates/default/tpl.simpledialog.css");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initTabView ( )
static

Init YUI TabView component.

Definition at line 356 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");
if (self::$ver == "2_5_0")
{
$tpl->addJavaScript("./Services/YUI/js/2_5_0/element/element-beta-min.js");
}
else
{
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/element/element-min.js");
}
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/tabview/tabview-min.js");
}

Field Documentation

ilYuiUtil::$ver = "2_7_0b"
staticprivate

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


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