Static Public Member Functions

ilYuiUtil Class Reference

Yahoo YUI Library Utility functions. More...

Static Public Member Functions

static initConnection ()
 Init YUI Connection module.
static initMenu ()
 Init YUI Menu module.
static initOverlay ()
 Init YUI Overlay module.
static initSimpleDialog ()
 Init YUI Simple Dialog.
static addYesNoDialog ($dialogname, $headertext, $message, $yesaction, $noaction, $defaultyes, $icon="help")

Detailed Description

Yahoo YUI Library Utility functions.

Author:
Alex Killing <alex.killing@gmx.de>
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 88 of file class.ilYuiUtil.php.

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

Referenced by ilObjTestGUI::participantsObject().

        {
                global $tpl, $lng;
                
                ilYuiUtil::initSimpleDialog();
                
                $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::initConnection (  )  [static]

Init YUI Connection module.

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

References $tpl.

Referenced by ilBlockGUI::ilBlockGUI().

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

Here is the caller graph for this function:

static ilYuiUtil::initMenu (  )  [static]

Init YUI Menu module.

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

References $tpl.

Referenced by ilObjTestGUI::questionBrowser().

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

Here is the caller graph for this function:

static ilYuiUtil::initOverlay (  )  [static]

Init YUI Overlay module.

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

References $tpl.

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

static ilYuiUtil::initSimpleDialog (  )  [static]

Init YUI Simple Dialog.

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

References $tpl.

Referenced by addYesNoDialog().

        {
                global $tpl;

                $tpl->addJavaScript("./Services/YUI/js/2_2_2/yahoo/yahoo-min.js");
                $tpl->addJavaScript("./Services/YUI/js/2_2_2/event/event.js");
                $tpl->addJavaScript("./Services/YUI/js/2_2_2/dom/dom.js");
                $tpl->addJavaScript("./Services/YUI/js/2_2_2/container/container.js");
                $tpl->addJavaScript("./Services/YUI/js/2_2_2/dragdrop/dragdrop.js");
                $tpl->addCss("./Services/YUI/js/2_2_2/container/assets/container.css");
                $tpl->addCss("./Services/YUI/templates/default/tpl.simpledialog.css");
        }

Here is the caller graph for this function:


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