当前位置: 首页>>代码示例>>PHP>>正文


PHP iljQueryUtil类代码示例

本文整理汇总了PHP中iljQueryUtil的典型用法代码示例。如果您正苦于以下问题:PHP iljQueryUtil类的具体用法?PHP iljQueryUtil怎么用?PHP iljQueryUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了iljQueryUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * @param ilObjectGUI $a_parent_obj
  * @param string      $a_parent_cmd
  */
 public function __construct(ilObjectGUI $a_parent_obj, $a_parent_cmd)
 {
     /**
      * @var $ilCtrl ilCtrl
      */
     global $ilCtrl;
     $this->ctrl = $ilCtrl;
     // Call this immediately in constructor
     $this->setId('tos_agreement_by_lng');
     $this->setDefaultOrderDirection('ASC');
     $this->setDefaultOrderField('language');
     $this->setExternalSorting(false);
     $this->setExternalSegmentation(false);
     parent::__construct($a_parent_obj, $a_parent_cmd);
     $this->setTitle($this->lng->txt('tos_agreement_by_lng'));
     $this->addColumn($this->lng->txt('language'), 'language');
     $this->addColumn($this->lng->txt('tos_agreement'), 'agreement');
     $this->addColumn($this->lng->txt('tos_agreement_document'), 'agreement_document');
     $this->optionalColumns = (array) $this->getSelectableColumns();
     $this->visibleOptionalColumns = (array) $this->getSelectedColumns();
     foreach ($this->visibleOptionalColumns as $column) {
         $this->addColumn($this->optionalColumns[$column]['txt'], $column);
     }
     $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, 'applyAgreementByLanguageFilter'));
     $this->setRowTemplate('tpl.tos_agreement_by_lng_table_row.html', 'Services/TermsOfService');
     $this->setShowRowsSelector(true);
     require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     require_once 'Services/YUI/classes/class.ilYuiUtil.php';
     iljQueryUtil::initjQuery();
     ilYuiUtil::initPanel();
     ilYuiUtil::initOverlay();
     $this->initFilter();
     $this->setFilterCommand('applyAgreementByLanguageFilter');
     $this->setResetCommand('resetAgreementByLanguageFilter');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilTermsOfServiceAgreementByLanguageTableGUI.php

示例2: getHTML

 public function getHTML()
 {
     global $ilCtrl, $tpl, $lng, $ilUser;
     if (!$this->isContainer) {
         #return '';
     }
     if ($_GET['baseClass'] == 'ilSearchController') {
         //			return '';
     }
     include_once "Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     iljQueryUtil::initjQueryUI();
     $this->tpl = new ilTemplate('tpl.main_menu_search.html', true, true, 'Services/Search');
     if ($ilUser->getId() != ANONYMOUS_USER_ID) {
         if (ilSearchSettings::getInstance()->isLuceneUserSearchEnabled() or (int) $_GET['ref_id']) {
             $this->tpl->setCurrentBlock("position");
             $this->tpl->setVariable('TXT_GLOBALLY', $lng->txt("search_globally"));
             $this->tpl->setVariable('ROOT_ID', ROOT_FOLDER_ID);
             $this->tpl->parseCurrentBlock();
         } else {
             $this->tpl->setCurrentBlock("position_hid");
             $this->tpl->setVariable('ROOT_ID_HID', ROOT_FOLDER_ID);
             $this->tpl->parseCurrentBlock();
         }
         if ((int) $_GET['ref_id']) {
             $this->tpl->setCurrentBlock('position_rep');
             $this->tpl->setVariable('TXT_CURRENT_POSITION', $lng->txt("search_at_current_position"));
             $this->tpl->setVariable('REF_ID', (int) $_GET["ref_id"]);
             $this->tpl->parseCurrentBlock();
         }
     }
     if ($ilUser->getId() != ANONYMOUS_USER_ID && ilSearchSettings::getInstance()->isLuceneUserSearchEnabled()) {
         $this->tpl->setCurrentBlock('usr_search');
         $this->tpl->setVariable('TXT_USR_SEARCH', $this->lng->txt('search_users'));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable('FORMACTION', 'ilias.php?baseClass=ilSearchController&cmd=post' . '&rtoken=' . $ilCtrl->getRequestToken() . '&fallbackCmd=remoteSearch');
     $this->tpl->setVariable('BTN_SEARCH', $this->lng->txt('search'));
     // $this->tpl->setVariable('ID_AUTOCOMPLETE', "mm_sr_auto");
     $this->tpl->setVariable('AC_DATASOURCE', "ilias.php?baseClass=ilSearchController&cmd=autoComplete");
     $this->tpl->setVariable('IMG_MM_SEARCH', ilUtil::img(ilUtil::getImagePath("icon_seas.svg"), $lng->txt("search")));
     if ($ilUser->getId() != ANONYMOUS_USER_ID) {
         $this->tpl->setVariable('HREF_SEARCH_LINK', "ilias.php?baseClass=ilSearchController");
         $this->tpl->setVariable('TXT_SEARCH_LINK', $lng->txt("last_search_result"));
     }
     // #10555 - we need the overlay for the autocomplete which is always active
     $this->tpl->setVariable('TXT_SEARCH', $lng->txt("search"));
     include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     $ov = new ilOverlayGUI("mm_search_menu");
     //$ov->setTrigger("main_menu_search", "none",
     //	"main_menu_search", "tr", "br");
     //$ov->setAnchor("main_menu_search", "tr", "br");
     $ov->setAutoHide(false);
     $ov->add();
     return $this->tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:56,代码来源:class.ilMainMenuSearchGUI.php

示例3: executeCommand

 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilDB, $lng, $ilPluginAdmin, $ilTabs, $tree;
     $ilTabs->clearTargets();
     $this->ctrl->saveParameter($this, "sequence");
     $this->ctrl->saveParameter($this, "active_id");
     $this->initAssessmentSettings();
     require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
     $this->dynamicQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig($tree, $ilDB, $ilPluginAdmin, $this->object);
     $this->dynamicQuestionSetConfig->loadFromDb();
     $testSessionFactory = new ilTestSessionFactory($this->object);
     $this->testSession = $testSessionFactory->getSession($_GET['active_id']);
     $this->ensureExistingTestSession($this->testSession);
     $this->initProcessLocker($this->testSession->getActiveId());
     $testSequenceFactory = new ilTestSequenceFactory($ilDB, $lng, $ilPluginAdmin, $this->object);
     $this->testSequence = $testSequenceFactory->getSequenceByTestSession($this->testSession);
     $this->testSequence->loadFromDb();
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnectionWithAnimation();
     if ($this->object->getKioskMode()) {
         include_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
         ilOverlayGUI::initJavascript();
     }
     $this->handlePasswordProtectionRedirect();
     $cmd = $this->ctrl->getCmd();
     $nextClass = $this->ctrl->getNextClass($this);
     switch ($nextClass) {
         case 'ilassquestionpagegui':
             $questionId = $this->testSequence->getQuestionForSequence($this->calculateSequence());
             require_once "./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
             $page_gui = new ilAssQuestionPageGUI($questionId);
             $ret = $this->ctrl->forwardCommand($page_gui);
             break;
         case 'ilassquestionhintrequestgui':
             $questionGUI = $this->object->createQuestionGUI("", $this->testSequenceFactory->getSequenceByTestSession()->getQuestionForSequence($this->calculateSequence()));
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
             $gui = new ilAssQuestionHintRequestGUI($this, self::CMD_SHOW_QUESTION, $this->testSession, $questionGUI);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ildynamicquestionsetstatistictablegui':
             $this->ctrl->forwardCommand($this->buildQuestionSetFilteredStatisticTableGUI());
             break;
         case 'iltestpasswordprotectiongui':
             require_once 'Modules/Test/classes/class.ilTestPasswordProtectionGUI.php';
             $gui = new ilTestPasswordProtectionGUI($this->ctrl, $this->tpl, $this->lng, $this, $this->passwordChecker);
             $ret = $this->ctrl->forwardCommand($gui);
             break;
         default:
             $cmd .= 'Cmd';
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:59,代码来源:class.ilTestPlayerDynamicQuestionSetGUI.php

示例4: render

 /**
  * Render html
  */
 function render($a_mode = "")
 {
     global $lng, $tpl, $ilUser;
     $quota_exceeded = $quota_legend = false;
     if (self::$check_wsp_quota) {
         include_once "Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
         if (!ilDiskQuotaHandler::isUploadPossible()) {
             $lng->loadLanguageModule("file");
             return $lng->txt("personal_workspace_quota_exceeded_warning");
         } else {
             $quota_legend = ilDiskQuotaHandler::getStatusLegend();
         }
     }
     // make sure jQuery is loaded
     iljQueryUtil::initjQuery();
     // add file upload scripts
     include_once "./Services/FileUpload/classes/class.ilFileUploadGUI.php";
     ilFileUploadGUI::initFileUpload();
     // load template
     $this->tpl = new ilTemplate("tpl.prop_dndfiles.html", true, true, "Services/Form");
     // general variables
     $this->tpl->setVariable("UPLOAD_ID", $this->uniqueId);
     // input
     $this->tpl->setVariable("FILE_SELECT_ICON", ilUtil::getImagePath('icon_fold.png'));
     $this->tpl->setVariable("TXT_SHOW_ALL_DETAILS", $lng->txt('show_all_details'));
     $this->tpl->setVariable("TXT_HIDE_ALL_DETAILS", $lng->txt('hide_all_details'));
     $this->tpl->setVariable("TXT_SELECTED_FILES", $lng->txt('selected_files'));
     $this->tpl->setVariable("TXT_DRAG_FILES_HERE", $lng->txt('drag_files_here'));
     $this->tpl->setVariable("TXT_NUM_OF_SELECTED_FILES", $lng->txt('num_of_selected_files'));
     $this->tpl->setVariable("TXT_SELECT_FILES_FROM_COMPUTER", $lng->txt('select_files_from_computer'));
     $this->tpl->setVariable("TXT_OR", $lng->txt('logic_or'));
     $this->tpl->setVariable("INPUT_ACCEPT_SUFFIXES", $this->getInputAcceptSuffixes($this->getSuffixes()));
     // info
     $this->tpl->setCurrentBlock("max_size");
     $this->tpl->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " . $this->getMaxFileSizeString());
     $this->tpl->parseCurrentBlock();
     if ($quota_legend) {
         $this->tpl->setVariable("TXT_MAX_SIZE", $quota_legend);
         $this->tpl->parseCurrentBlock();
     }
     $this->outputSuffixes($this->tpl);
     // create file upload object
     $upload = new ilFileUploadGUI("ilFileUploadDropZone_" . $this->uniqueId, $this->uniqueId, false);
     $upload->enableFormSubmit("ilFileUploadInput_" . $this->uniqueId, $this->submit_button_name, $this->cancel_button_name);
     $upload->setDropAreaId("ilFileUploadDropArea_" . $this->uniqueId);
     $upload->setFileListId("ilFileUploadList_" . $this->uniqueId);
     $upload->setFileSelectButtonId("ilFileUploadFileSelect_" . $this->uniqueId);
     $this->tpl->setVariable("FILE_UPLOAD", $upload->getHTML());
     return $this->tpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:53,代码来源:class.ilDragDropFileInputGUI.php

示例5: getImageMapTableHTML

 /**
  * Get trigger table
  */
 function getImageMapTableHTML()
 {
     global $tpl, $ilToolbar, $lng, $ilCtrl;
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQueryUI();
     $tpl->addJavascript("./Services/COPage/js/ilCOPagePres.js");
     $tpl->addJavascript("./Services/COPage/js/ilCOPagePCInteractiveImage.js");
     include_once "./Services/Accordion/classes/class.ilAccordionGUI.php";
     ilAccordionGUI::addJavaScript();
     ilAccordionGUI::addCss();
     $ilToolbar->addText($lng->txt("cont_drag_element_click_save"));
     $ilToolbar->setId("drag_toolbar");
     $ilToolbar->setHidden(true);
     $ilToolbar->addButton($lng->txt("save"), "#", "", "", "", "save_pos_button");
     $ilToolbar->addButton($lng->txt("cancel"), $ilCtrl->getLinkTarget($this, "editMapAreas"));
     include_once "./Services/COPage/classes/class.ilPCIIMTriggerTableGUI.php";
     $image_map_table = new ilPCIIMTriggerTableGUI($this, "editMapAreas", $this->content_obj, $this->getParentNodeName());
     return $image_map_table->getHTML();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:22,代码来源:class.ilPCIIMTriggerEditorGUI.php

示例6: executeCommand

 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilDB, $lng, $ilPluginAdmin, $ilTabs, $tree;
     $ilTabs->clearTargets();
     $this->ctrl->saveParameter($this, "sequence");
     $this->ctrl->saveParameter($this, "active_id");
     require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
     $this->dynamicQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig($tree, $ilDB, $ilPluginAdmin, $this->object);
     $this->dynamicQuestionSetConfig->loadFromDb();
     $testSessionFactory = new ilTestSessionFactory($this->object);
     $this->testSession = $testSessionFactory->getSession($_GET['active_id']);
     $testSequenceFactory = new ilTestSequenceFactory($ilDB, $lng, $ilPluginAdmin, $this->object);
     $this->testSequence = $testSequenceFactory->getSequence($this->testSession);
     $this->testSequence->loadFromDb();
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnectionWithAnimation();
     if ($this->object->getKioskMode()) {
         include_once 'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
         ilOverlayGUI::initJavascript();
     }
     $cmd = $this->ctrl->getCmd();
     $nextClass = $this->ctrl->getNextClass($this);
     switch ($nextClass) {
         case 'ilassquestionhintrequestgui':
             $questionGUI = $this->object->createQuestionGUI("", $this->testSequenceFactory->getSequence()->getQuestionForSequence($this->calculateSequence()));
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
             $gui = new ilAssQuestionHintRequestGUI($this, $this->testSession, $questionGUI);
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ilfilteredquestionstablegui':
             $this->ctrl->forwardCommand($this->buildFilteredQuestionsTableGUI());
             break;
         default:
             $cmd .= 'Cmd';
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:44,代码来源:class.ilTestPlayerDynamicQuestionSetGUI.php

示例7: getHtml

 /**
  * @return string
  */
 public function getHtml()
 {
     /**
      * @var $lng    ilLanguage
      * @var $tpl ilTemplate
      */
     global $lng, $tpl;
     if ($this->getSessionReminder()->isActive()) {
         require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
         iljQueryUtil::initjQuery();
         require_once 'Services/YUI/classes/class.ilYuiUtil.php';
         ilYuiUtil::initCookie();
         $tpl->addJavaScript('./Services/Authentication/js/session_reminder.js');
         $reminder_tpl = new ilTemplate('tpl.session_reminder.html', true, true, 'Services/Authentication');
         $reminder_tpl->setVariable('DEBUG', defined('DEVMODE') && DEVMODE ? 1 : 0);
         $reminder_tpl->setVariable('CLIENT_ID', CLIENT_ID);
         $reminder_tpl->setVariable('SESSION_NAME', session_name());
         $reminder_tpl->setVariable('FREQUENCY', 60);
         $reminder_tpl->setVariable('SESSION_ID', session_id());
         $reminder_tpl->setVariable('URL', './sessioncheck.php?client_id=' . CLIENT_ID . '&lang=' . $lng->getLangKey());
         return $reminder_tpl->get();
     }
     return '';
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:27,代码来源:class.ilSessionReminderGUI.php

示例8: executeCommand

 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilUser;
     $cmd = $this->ctrl->getCmd();
     $next_class = $this->ctrl->getNextClass($this);
     $this->ctrl->saveParameter($this, "sequence");
     $this->ctrl->saveParameter($this, "active_id");
     if (preg_match("/^gotoquestion_(\\d+)\$/", $cmd, $matches)) {
         $cmd = "gotoquestion";
         if (strlen($matches[1])) {
             $this->ctrl->setParameter($this, 'gotosequence', $matches[1]);
         }
     }
     if ($_GET["active_id"]) {
         $this->object->setTestSession($_GET["active_id"]);
     } else {
         $this->object->setTestSession();
     }
     include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
     iljQueryUtil::initjQuery();
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnectionWithAnimation();
     $cmd = $this->getCommand($cmd);
     switch ($next_class) {
         case 'ilassquestionhintrequestgui':
             $questionGUI = $this->object->createQuestionGUI("", $this->object->getTestSequence()->getQuestionForSequence($this->calculateSequence()));
             require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionHintRequestGUI.php';
             $gui = new ilAssQuestionHintRequestGUI($this, $this->object->getTestSession(), $questionGUI);
             $ret = $this->ctrl->forwardCommand($gui);
             break;
         default:
             $ret =& $this->{$cmd}();
             break;
     }
     return $ret;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:39,代码来源:class.ilTestOutputGUI.php

示例9: exportSupportScripts

 /**
  * Export support scripts
  *
  * @param
  * @return
  */
 function exportSupportScripts()
 {
     // export flv/mp3 player
     //copy(ilPlayerUtil::getFlashVideoPlayerFilename(true),
     //	$this->js_dir."/".ilPlayerUtil::getFlashVideoPlayerFilename());
     //copy("./Services/MediaObjects/flash_mp3_player/mp3player.swf",
     //	$this->mp3_dir."/mp3player.swf");
     // basic js
     copy('./Services/JavaScript/js/Basic.js', $this->js_dir . '/Basic.js');
     copy('./Services/UIComponent/Overlay/js/ilOverlay.js', $this->js_dir . '/ilOverlay.js');
     // jquery
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     copy(iljQueryUtil::getLocaljQueryPath(), $this->js_dir . '/jquery.js');
     copy(iljQueryUtil::getLocaljQueryUIPath(), $this->js_dir . '/jquery-ui-min.js');
     copy(iljQueryUtil::getLocalMaphilightPath(), $this->js_dir . '/maphilight.js');
     // yui stuff we use
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     copy(ilYuiUtil::getLocalPath('yahoo/yahoo-min.js'), $this->js_yahoo_dir . '/yahoo-min.js');
     copy(ilYuiUtil::getLocalPath('yahoo-dom-event/yahoo-dom-event.js'), $this->js_yahoo_dir . '/yahoo-dom-event.js');
     copy(ilYuiUtil::getLocalPath('animation/animation-min.js'), $this->js_yahoo_dir . '/animation-min.js');
     copy(ilYuiUtil::getLocalPath('container/container-min.js'), $this->js_yahoo_dir . '/container-min.js');
     copy(ilYuiUtil::getLocalPath('container/assets/skins/sam/container.css'), $this->css_dir . '/container.css');
     // accordion
     copy('./Services/Accordion/js/accordion.js', $this->js_dir . '/accordion.js');
     copy('./Services/Accordion/css/accordion.css', $this->css_dir . '/accordion.css');
     // page presentation js
     copy('./Services/COPage/js/ilCOPagePres.js', $this->js_dir . '/ilCOPagePres.js');
     // tooltip
     copy('./Services/UIComponent/Tooltip/js/ilTooltip.js', $this->js_dir . '/ilTooltip.js');
     // mediaelement.js
     include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php";
     ilPlayerUtil::copyPlayerFilesToTargetDirectory($this->flv_dir);
     //		copy(ilPlayerUtil::getLocalMediaElementCssPath(),
     //			$this->css_dir.'/mediaelementplayer.css');
     //		copy(ilPlayerUtil::getLocalMediaElementJsPath(),
     //			$this->js_dir.'/mediaelement-and-player.js');
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:43,代码来源:class.ilCOPageHTMLExport.php

示例10: setTemplateVars

 /**
  * set all template variables (images, scripts, target frames, ...)
  */
 function setTemplateVars()
 {
     global $rbacsystem, $lng, $ilias, $tree, $ilUser, $ilSetting, $ilPluginAdmin;
     if ($this->logo_only) {
         $this->tpl->setVariable("HEADER_URL", $this->getHeaderURL());
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.svg"));
         return;
     }
     // get user interface plugins
     $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
     if ($this->getMode() != self::MODE_TOPBAR_REDUCED && $this->getMode() != self::MODE_TOPBAR_MEMBERVIEW) {
         // search
         include_once 'Services/Search/classes/class.ilSearchSettings.php';
         if ($rbacsystem->checkAccess('search', ilSearchSettings::_getSearchSettingRefId())) {
             include_once './Services/Search/classes/class.ilMainMenuSearchGUI.php';
             $main_search = new ilMainMenuSearchGUI();
             $html = "";
             // user interface plugin slot + default rendering
             include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
             $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_search", array("main_menu_gui" => $this, "main_menu_search_gui" => $main_search));
             if (!$uip->replaced()) {
                 $html = $main_search->getHTML();
             }
             $html = $uip->getHTML($html);
             if (strlen($html)) {
                 $this->tpl->setVariable('SEARCHBOX', $html);
             }
         }
         $this->renderStatusBox($this->tpl);
         // online help
         $this->renderHelpButtons();
     }
     if ($this->getMode() == self::MODE_FULL) {
         $mmle_html = "";
         // user interface plugin slot + default rendering
         include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
         $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_list_entries", array("main_menu_gui" => $this));
         if (!$uip->replaced()) {
             $mmle_tpl = new ilTemplate("tpl.main_menu_list_entries.html", true, true, "Services/MainMenu");
             $mmle_html = $this->renderMainMenuListEntries($mmle_tpl);
         }
         $mmle_html = $uip->getHTML($mmle_html);
         $this->tpl->setVariable("MAIN_MENU_LIST_ENTRIES", $mmle_html);
     }
     if ($this->getMode() != self::MODE_TOPBAR_MEMBERVIEW) {
         $link_dir = defined("ILIAS_MODULE") ? "../" : "";
         // login stuff
         if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
             include_once 'Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
             if (ilRegistrationSettings::_lookupRegistrationType() != IL_REG_DISABLED) {
                 $this->tpl->setCurrentBlock("registration_link");
                 $this->tpl->setVariable("TXT_REGISTER", $lng->txt("register"));
                 $this->tpl->setVariable("LINK_REGISTER", $link_dir . "register.php?client_id=" . rawurlencode(CLIENT_ID) . "&lang=" . $ilias->account->getCurrentLanguage());
                 $this->tpl->parseCurrentBlock();
             }
             // language selection
             $selection = self::getLanguageSelection();
             if ($selection) {
                 // bs-patch start
                 global $ilUser, $lng;
                 $this->tpl->setVariable("TXT_LANGSELECT", $lng->txt("language"));
                 // bs-patch end
                 $this->tpl->setVariable("LANG_SELECT", $selection);
             }
             $this->tpl->setCurrentBlock("userisanonymous");
             $this->tpl->setVariable("TXT_NOT_LOGGED_IN", $lng->txt("not_logged_in"));
             $this->tpl->setVariable("TXT_LOGIN", $lng->txt("log_in"));
             // #13058
             $target_str = $this->getLoginTargetPar() != "" ? $this->getLoginTargetPar() : ilTemplate::buildLoginTarget();
             $this->tpl->setVariable("LINK_LOGIN", $link_dir . "login.php?target=" . $target_str . "&client_id=" . rawurlencode(CLIENT_ID) . "&cmd=force_login&lang=" . $ilias->account->getCurrentLanguage());
             $this->tpl->parseCurrentBlock();
         } else {
             if ($this->getMode() != self::MODE_TOPBAR_REDUCED) {
                 $notificationSettings = new ilSetting('notifications');
                 $chatSettings = new ilSetting('chatroom');
                 /**
                  * @var $tpl ilTemplate
                  */
                 global $tpl;
                 if ($chatSettings->get('chat_enabled') && $notificationSettings->get('enable_osd')) {
                     $this->tpl->touchBlock('osd_enabled');
                     $this->tpl->touchBlock('osd_container');
                     include_once "Services/jQuery/classes/class.iljQueryUtil.php";
                     iljQueryUtil::initjQuery();
                     include_once 'Services/MediaObjects/classes/class.ilPlayerUtil.php';
                     ilPlayerUtil::initMediaElementJs();
                     $tpl->addJavaScript('Services/Notifications/templates/default/notifications.js');
                     $tpl->addCSS('Services/Notifications/templates/default/osd.css');
                     require_once 'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
                     require_once 'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
                     $notifications = ilNotificationOSDHandler::getNotificationsForUser($ilUser->getId());
                     $this->tpl->setVariable('NOTIFICATION_CLOSE_HTML', json_encode(ilGlyphGUI::get(ilGlyphGUI::CLOSE, $lng->txt('close'))));
                     $this->tpl->setVariable('INITIAL_NOTIFICATIONS', json_encode($notifications));
                     $this->tpl->setVariable('OSD_POLLING_INTERVALL', $notificationSettings->get('osd_polling_intervall') ? $notificationSettings->get('osd_polling_intervall') : '5');
                     $this->tpl->setVariable('OSD_PLAY_SOUND', $chatSettings->get('play_invitation_sound') && $ilUser->getPref('chat_play_invitation_sound') ? 'true' : 'false');
                     foreach ($notifications as $notification) {
                         if ($notification['type'] == 'osd_maint') {
//.........这里部分代码省略.........
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:101,代码来源:class.ilMainMenuGUI.php

示例11: addBlockSorting

 /**
  *
  */
 protected function addBlockSorting()
 {
     if ($this->getSide() == IL_COL_CENTER && $this->getEnableMovement()) {
         /**
          * @var $ilBrowser ilBrowser
          * @var $tpl ilTemplate
          * @var $ilCtrl ilCtrl
          */
         global $ilBrowser, $tpl, $ilCtrl;
         include_once 'Services/jQuery/classes/class.iljQueryUtil.php';
         iljQueryUtil::initjQuery();
         iljQueryUtil::initjQueryUI();
         if ($ilBrowser->isMobile() || $ilBrowser->isIpad()) {
             $tpl->addJavaScript('./Services/jQuery/js/jquery.ui.touch-punch.min.js');
         }
         $tpl->addJavaScript('./Services/Block/js/block_sorting.js');
         // set the col_side parameter to pass the ctrl structure flow
         $ilCtrl->setParameter($this, 'col_side', IL_COL_CENTER);
         $this->tpl->setVariable('BLOCK_SORTING_STORAGE_URL', $ilCtrl->getLinkTarget($this, 'saveBlockSortingAsynch', '', true, false));
         $this->tpl->setVariable('BLOCK_COLUMNS', json_encode(array('il_left_col', 'il_right_col')));
         $this->tpl->setVariable('BLOCK_COLUMNS_SELECTOR', '#il_left_col,#il_right_col');
         $this->tpl->setVariable('BLOCK_COLUMNS_PARAMETERS', json_encode(array(IL_COL_LEFT, IL_COL_RIGHT)));
         // restore col_side parameter
         $ilCtrl->setParameter($this, 'col_side', $this->getSide());
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:29,代码来源:class.ilColumnGUI.php

示例12: printView

    /**
     * Print View
     *
     * @param
     * @return
     */
    function printView()
    {
        global $ilAccess, $tpl;
        if (!$ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
            return;
        }
        $terms = array();
        switch ($_POST["sel_type"]) {
            case "glossary":
                $ts = $this->glossary->getTermList();
                foreach ($ts as $t) {
                    $terms[] = $t["id"];
                }
                break;
            case "sel_topic":
                include_once "./Services/Taxonomy/classes/class.ilObjTaxonomy.php";
                $t_id = $this->glossary->getTaxonomyId();
                $items = ilObjTaxonomy::getSubTreeItems("glo", $this->glossary->getId(), "term", $t_id, (int) $_POST["topic"]);
                foreach ($items as $i) {
                    if ($i["item_type"] == "term") {
                        $terms[] = $i["item_id"];
                    }
                }
                break;
            case "selection":
                if (is_array($_POST["obj_id"])) {
                    $terms = $_POST["obj_id"];
                } else {
                    $terms = array();
                }
                break;
            case "term":
                $terms = array($this->term_id);
                break;
        }
        $tpl = new ilTemplate("tpl.main.html", true, true);
        $tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
        /*
        		// syntax style
        		$this->tpl->setCurrentBlock("SyntaxStyle");
        		$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
        			ilObjStyleSheet::getSyntaxStylePath());
        		$this->tpl->parseCurrentBlock();
        
        		// content style
        		$this->tpl->setCurrentBlock("ContentStyle");
        		$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
        			ilObjStyleSheet::getContentStylePath($this->glossary->getStyleSheetId()));
        		$this->tpl->parseCurrentBlock();*/
        include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
        iljQueryUtil::initjQuery($tpl);
        // determine target frames for internal links
        foreach ($terms as $t_id) {
            $page_content .= $this->listDefinitions($_GET["ref_id"], $t_id, true);
        }
        $tpl->setVariable("CONTENT", $page_content . '<script type="text/javascript" language="javascript1.2">
		<!--
			il.Util.addOnLoad(function () {
				il.Util.print();
			});
		//-->
		</script>');
        $tpl->show(false);
        exit;
    }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:71,代码来源:class.ilGlossaryPresentationGUI.php

示例13: showTree

 /**
  * Show Editing Tree
  */
 function showTree()
 {
     global $ilUser, $ilias, $ilCtrl, $lng;
     $mtree = new ilTree($this->object->getId());
     $mtree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
     $mtree->setTreeTablePK("slm_id");
     if ($_POST["expandAll"] != "") {
         $_GET["scexpand"] = "";
         $stree = $mtree->getSubTree($mtree->getNodeData($mtree->readRootId()));
         $n_arr = array();
         foreach ($stree as $n) {
             $n_arr[] = $n["child"];
         }
         $_SESSION["scexpand"] = $n_arr;
     }
     if ($_POST["collapseAll"] != "") {
         $_GET["scexpand"] = "";
         $_SESSION["scexpand"] = array($mtree->readRootId());
     }
     $this->tpl = new ilTemplate("tpl.main.html", true, true);
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
     $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
     $this->tpl->setVariable("IMG_SPACE", ilUtil::getImagePath("spacer.png", false));
     $this->tpl->setCurrentBlock("exp2_button");
     $this->tpl->setVariable("CMD_EXP2_BTN", "expandAll");
     $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("expand_all"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("exp2_button");
     $this->tpl->setVariable("CMD_EXP2_BTN", "collapseAll");
     $this->tpl->setVariable("TXT_EXP2_BTN", $lng->txt("collapse_all"));
     $this->tpl->parseCurrentBlock();
     require_once "./Modules/Scorm2004/classes/class.ilSCORM2004EditorExplorer.php";
     $exp = new ilSCORM2004EditorExplorer($this->ctrl->getLinkTarget($this, "edit"), $this->object);
     $exp->setFrameUpdater("content", "ilHierarchyFormUpdater");
     $exp->setTargetGet("obj_id");
     $exp->setExpandTarget($this->ctrl->getLinkTarget($this, "showTree"));
     if ($_GET["scexpand"] == "") {
         $expanded = $mtree->readRootId();
     } else {
         $expanded = $_GET["scexpand"];
     }
     //echo "-".$_GET["active_node"]."-";
     if ($_GET["active_node"] != "") {
         $path = $mtree->getPathId($_GET["active_node"]);
         $exp->setForceOpenPath($path);
         $exp->highlightNode($_GET["active_node"]);
     }
     $exp->setExpand($expanded);
     // build html-output
     $exp->setOutput(0);
     $output = $exp->getOutput();
     // asynchronous output
     if ($ilCtrl->isAsynch()) {
         echo $output;
         exit;
     }
     $this->tpl->setCurrentBlock("content");
     $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("sahs_organization"));
     $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
     $this->tpl->setVariable("EXPLORER", $output);
     $this->ctrl->setParameter($this, "scexpand", $_GET["scexpand"]);
     $this->tpl->setVariable("ACTION", $this->ctrl->getLinkTarget($this, "showTree"));
     $this->tpl->parseCurrentBlock();
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery($this->tpl);
     $this->tpl->show(false);
     exit;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:72,代码来源:class.ilObjSCORM2004LearningModuleGUI.php

示例14: showTree

 /**
  * display tree view
  */
 function showTree()
 {
     global $ilCtrl, $tree, $ilSetting, $lng;
     $ilCtrl->setParameter($this, "active_node", $_GET["active_node"]);
     $this->tpl = new ilTemplate("tpl.main.html", true, true);
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $this->tpl->addBlockFile("CONTENT", "content", "tpl.explorer.html");
     include_once "./Services/Repository/classes/class.ilRepositoryExplorer.php";
     $active_node = $_GET["active_node"] > 1 ? $_GET["active_node"] : $_GET["ref_id"] > 1 ? $_GET["ref_id"] : 0;
     $top_node = 0;
     if ($ilSetting->get("rep_tree_limit_grp_crs") && $active_node > 0) {
         $path = $tree->getPathId($active_node);
         foreach ($path as $n) {
             if ($top_node > 0) {
                 break;
             }
             if (in_array(ilObject::_lookupType(ilObject::_lookupObjId($n)), array("crs", "grp"))) {
                 $top_node = $n;
             }
         }
     }
     $exp = new ilRepositoryExplorer("ilias.php?baseClass=ilRepositoryGUI&amp;cmd=goto", $top_node);
     $exp->setUseStandardFrame(false);
     $exp->setExpandTarget($ilCtrl->getLinkTarget($this, "showTree"));
     $exp->setFrameUpdater("tree", "updater");
     $exp->setTargetGet("ref_id");
     if ($_GET["repexpand"] == "") {
         $expanded = $this->tree->readRootId();
     } else {
         $expanded = $_GET["repexpand"];
     }
     $exp->setExpand($expanded);
     if ($active_node > 0) {
         $path = $tree->getPathId($active_node);
         if ($top_node > 0) {
             $exp->setForceOpenPath($path);
             $exp->setExpand($expanded);
         } else {
             $exp->setForceOpenPath($path + array($top_node));
         }
         $exp->highlightNode($active_node);
     }
     // build html-output
     if ($top_node > 0) {
         $head_tpl = new ilTemplate("tpl.cont_tree_head.html", true, true, "Services/Repository");
         $path = ilObject::_getIcon(ROOT_FOLDER_ID, "tiny", "root");
         $nd = $tree->getNodeData(ROOT_FOLDER_ID);
         $title = $nd["title"];
         if ($title == "ILIAS") {
             $title = $lng->txt("repository");
         }
         $head_tpl->setVariable("IMG_SRC", $path);
         $head_tpl->setVariable("ALT_IMG", $lng->txt("icon") . " " . $title);
         $head_tpl->setVariable("LINK_TXT", $title);
         $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", "1");
         $head_tpl->setVariable("LINK_HREF", $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"));
         $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
         $exp->setTreeLead($head_tpl->get());
         $exp->initItemCounter(1);
         $exp->setOutput($tree->getParentId($top_node), 1, ilObject::_lookupObjId($tree->getParentId($top_node)));
     } else {
         $exp->setOutput(0);
     }
     $output = $exp->getOutput(false);
     //if ($GLOBALS["ilUser"]->getLogin() == "alex") echo "topnode:$top_node:activenode:$active_node:";
     // asynchronous output
     if ($ilCtrl->isAsynch()) {
         echo $output;
         exit;
     }
     $this->tpl->setCurrentBlock("content");
     $this->tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("overview"));
     $this->tpl->setVariable("EXP_REFRESH", $this->lng->txt("refresh"));
     $this->tpl->setVariable("EXPLORER", $output);
     $ilCtrl->setParameter($this, "repexpand", $_GET["repexpand"]);
     $this->tpl->setVariable("ACTION", $ilCtrl->getLinkTarget($this, "showTree", "", false, false));
     $this->tpl->parseCurrentBlock();
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery($this->tpl);
     $this->tpl->show(false);
     exit;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:85,代码来源:class.ilRepositoryGUI.php

示例15: initStartUpTemplate

 /**
  * This method enriches the global template with some user interface elements (language selection, headlines, back buttons, ...) for public service views
  * @param mixed   $a_tmpl The template file as a string of as an array (index 0: template file, index 1: template directory)
  * @param bool    $a_show_back
  * @param bool    $a_show_logout
  */
 public static function initStartUpTemplate($a_tmpl, $a_show_back = false, $a_show_logout = false)
 {
     /**
      * @var $tpl       ilTemplate
      * @var $lng       ilLanguage
      * @var $ilCtrl    ilCtrl
      * @var $ilSetting ilSetting
      * @var $ilAccess  ilAccessHandler
      */
     global $tpl, $lng, $ilCtrl, $ilSetting, $ilAccess;
     // #13574 - basic.js is included with ilTemplate, so jQuery is needed, too
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     // framework is needed for language selection
     include_once "./Services/UICore/classes/class.ilUIFramework.php";
     ilUIFramework::init();
     $tpl->addBlockfile('CONTENT', 'content', 'tpl.startup_screen.html', 'Services/Init');
     $tpl->setVariable('HEADER_ICON', ilUtil::getImagePath('HeaderIcon.svg'));
     if ($a_show_back) {
         // #13400
         $param = 'client_id=' . $_COOKIE['ilClientId'] . '&lang=' . $lng->getLangKey();
         $tpl->setCurrentBlock('link_item_bl');
         $tpl->setVariable('LINK_TXT', $lng->txt('login_to_ilias'));
         $tpl->setVariable('LINK_URL', 'login.php?cmd=force_login&' . $param);
         $tpl->parseCurrentBlock();
         if ($ilSetting->get('pub_section') && $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, 'read', '', ROOT_FOLDER_ID)) {
             $tpl->setVariable('LINK_URL', 'index.php?' . $param);
             $tpl->setVariable('LINK_TXT', $lng->txt('home'));
             $tpl->parseCurrentBlock();
         }
     } else {
         if ($a_show_logout) {
             $tpl->setCurrentBlock('link_item_bl');
             $tpl->setVariable('LINK_TXT', $lng->txt('logout'));
             $tpl->setVariable('LINK_URL', ILIAS_HTTP_PATH . '/logout.php');
             $tpl->parseCurrentBlock();
         }
     }
     if (is_array($a_tmpl)) {
         $template_file = $a_tmpl[0];
         $template_dir = $a_tmpl[1];
     } else {
         $template_file = $a_tmpl;
         $template_dir = 'Services/Init';
     }
     //Header Title
     include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
     $header_top_title = ilObjSystemFolder::_getHeaderTitle();
     if (trim($header_top_title) != "" && $tpl->blockExists("header_top_title")) {
         $tpl->setCurrentBlock("header_top_title");
         $tpl->setVariable("TXT_HEADER_TITLE", $header_top_title);
         $tpl->parseCurrentBlock();
     }
     // language selection
     $selection = self::getLanguageSelection();
     if ($selection) {
         $tpl->setCurrentBlock("lang_select");
         $tpl->setVariable("TXT_LANGSELECT", $lng->txt("language"));
         $tpl->setVariable("LANG_SELECT", $selection);
         $tpl->parseCurrentBlock();
     }
     $tpl->addBlockFile('STARTUP_CONTENT', 'startup_content', $template_file, $template_dir);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:69,代码来源:class.ilStartUpGUI.php


注:本文中的iljQueryUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。