ILIAS  Release_4_4_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:

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 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 445 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 242 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 210 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 437 of file class.ilYuiUtil.php.

Referenced by ilForumExplorer\__construct(), ilSCORM13Player\debugGUI(), ilCOPageHTMLExport\exportSupportScripts(), 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 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 159 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::initButtonControl ( )
static

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

public

Returns
void

Definition at line 317 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 298 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 340 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 ilForumExplorer\__construct(), ilAccordionGUI\addJavaScript(), ilPCDataTableGUI\editData(), ilInternalLinkGUI\getInitHTML(), ilMediaPlayerGUI\getMp3PlayerHtml(), ilExplorer\getOutput(), ilBlockGUI\ilBlockGUI(), ilCloudPluginInitGUI\initGUI(), 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 108 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilTestOutputGUI\executeCommand(), ilTestPlayerDynamicQuestionSetGUI\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(), 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 187 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 174 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 199 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 371 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilChatroomBlockGUI\getHTML().

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

References $tpl.

{
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");
}
static ilYuiUtil::initMenu ( )
static

Init YUI Menu module.

Definition at line 120 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 133 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 87 of file class.ilYuiUtil.php.

References $tpl, and addContainerCss().

Referenced by ilPCDataTableGUI\editData(), ilInternalLinkGUI\getInitHTML(), ilTaggingGUI\initJavascript(), ilNoteGUI\initJavascript(), ilLPObjectStatisticsLPTableGUI\initLearningProgressDetailsLayer(), ilExplorerSelectInputGUI\render(), 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 145 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 357 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 411 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."/animation/animation-min.js");
$tpl->addJavaScript("./Services/YUI/js/".self::$ver."/container/container-min.js");
}

+ Here is the call graph for this function:

static ilYuiUtil::initTreeView ( )
static

Init treeView.

Definition at line 399 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: