ILIAS  Release_3_10_x_branch Revision 61812
 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.

Static Public Member Functions

static initConnection ()
 Init YUI Connection module.
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 initDragDropList ()
 init drag & drop list
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.

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

Member Function Documentation

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

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

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

Referenced by ilObjTestGUI\participantsObject().

{
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:

+ Here is the caller 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 164 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::initButtonControl ( )
static

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

public

Returns
void

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

References $tpl.

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

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/2_5_0/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/element/element-beta-min.js");
$tpl->addJavaScript('./Services/YUI/js/2_5_0/container/container_core-min.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/menu/menu-min.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/button/button-min.js');
$tpl->addCss("./Services/YUI/js/2_5_0/button/assets/skins/sam/button.css");
$tpl->addCss("./Services/YUI/js/2_5_0/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 252 of file class.ilYuiUtil.php.

References $tpl.

{
global $tpl;
$tpl->addJavaScript('./Services/YUI/js/2_5_0/yahoo/yahoo.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/event/event.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/dom/dom.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/calendar/calendar.js');
$tpl->addCss('./Services/YUI/js/2_5_0/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 296 of file class.ilYuiUtil.php.

References $tpl, and initButtonControl().

Referenced by ilColorPickerInputGUI\insert().

{
global $tpl;
$tpl->addJavaScript('./Services/YUI/js/2_5_0/dragdrop/dragdrop-min.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/slider/slider-min.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/colorpicker/colorpicker-min.js');
$tpl->addCss('./Services/Form/css/color_picker.css');
$tpl->addCss("./Services/YUI/js/2_5_0/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 36 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilExplorer\getOutput(), ilBlockGUI\ilBlockGUI(), and ilPageObjectGUI\showPage().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/2_5_0/yahoo/yahoo-min.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/event/event-min.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/connection/connection-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initConnectionWithAnimation ( )
static

Init YUI Connection module.

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

References $tpl.

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

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

+ Here is the caller graph for this function:

static ilYuiUtil::initDomEvent ( )
static

Init YUI DomEvent.

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

References $tpl.

Referenced by assTextQuestionGUI\getTestOutput(), ilCalendarAppointmentGUI\initForm(), and ilObjSessionGUI\initForm().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/2_5_0/yahoo/yahoo-min.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/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 48 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilHierarchyFormGUI\__construct(), assMatchingQuestionGUI\getTestOutput(), ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), ilCalendarMonthGUI\show(), and ilPageObjectGUI\showPage().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/2_5_0/yahoo-dom-event/yahoo-dom-event.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/dragdrop/dragdrop-min.js");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initDragDropList ( )
static

init drag & drop list

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

References $tpl.

Referenced by getDragDropList().

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

+ Here is the caller graph for this function:

static ilYuiUtil::initMenu ( )
static

Init YUI Menu module.

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

References $tpl.

Referenced by ilObjTestGUI\questionBrowser().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/2_5_0/yahoo/yahoo-min.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/event/event.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/dom/dom.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/container/container_core.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/menu/menu.js");
$tpl->addCss("./Services/YUI/js/2_5_0/menu/assets/menu.css");
}

+ Here is the caller graph for this function:

static ilYuiUtil::initOverlay ( )
static

Init YUI Overlay module.

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

References $tpl.

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

Init yui panel.

public

Parameters
void
Returns
void

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

References $tpl.

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

{
global $tpl;
$tpl->addJavaScript('./Services/YUI/js/2_5_0/yahoo-dom-event/yahoo-dom-event.js');
// optional
//$tpl->addJavaScript('./Services/YUI/js/2_5_0/animation/animation-min.js');
// optional
//$tpl->addJavaScript('./Services/YUI/js/2_5_0/dragdrop/dragdrop-min.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/container/container-min.js');
$tpl->addCss("./Services/YUI/js/2_5_0/container/assets/skins/sam/container.css");
#$tpl->addCss("./Services/YUI/js/2_5_0/container/assets/container-core.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 135 of file class.ilYuiUtil.php.

References $tpl.

Referenced by addYesNoDialog().

{
global $tpl;
$tpl->addJavaScript("./Services/YUI/js/2_5_0/yahoo/yahoo-min.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/event/event.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/dom/dom.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/container/container.js");
$tpl->addJavaScript("./Services/YUI/js/2_5_0/dragdrop/dragdrop.js");
$tpl->addCss("./Services/YUI/js/2_5_0/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 313 of file class.ilYuiUtil.php.

References $tpl.

Referenced by ilPageObjectGUI\showPage().

{
global $tpl;
$tpl->addCss("./Services/YUI/js/2_5_0/tabview/assets/skins/sam/tabview.css");
$tpl->addJavaScript('./Services/YUI/js/2_5_0/yahoo-dom-event/yahoo-dom-event.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/element/element-beta-min.js');
$tpl->addJavaScript('./Services/YUI/js/2_5_0/tabview/tabview-min.js');
//<script type="text/javascript" src="http://yui.yahooapis.com/2.5.1/build/tabview/tabview-min.js"></script>
}

+ Here is the caller graph for this function:


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