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


PHP iljQueryUtil::initjQueryUI方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: getTestOutput

 function getTestOutput($active_id, $pass = NULL, $is_postponed = FALSE, $user_post_solution = FALSE)
 {
     // shuffle output
     $keys = array();
     if (is_array($user_post_solution)) {
         $keys = $_SESSION["ordering_keys"];
     } else {
         $keys = array_keys($this->object->answers);
         shuffle($keys);
     }
     $_SESSION["ordering_keys"] = $keys;
     // generate the question output
     include_once "./Services/UICore/classes/class.ilTemplate.php";
     $template = new ilTemplate("tpl.il_as_qpl_ordering_output.html", TRUE, TRUE, "Modules/TestQuestionPool");
     if ($this->object->getOrderingType() == OQ_NESTED_TERMS || $this->object->getOrderingType() == OQ_NESTED_PICTURES) {
         $this->object->setOutputType(OUTPUT_JAVASCRIPT);
         include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
         include_once 'Modules/TestQuestionPool/classes/class.ilNestedOrderingGUI.php';
         $answers = new ilNestedOrderingGUI($this->lng->txt("answers"), "answers");
         $answers->setOrderingType($this->object->getOrderingType());
         $shuffle = 1;
         $answers->setObjAnswersArray($this->object->answers, $shuffle);
         if ($this->object->getOrderingType() == OQ_NESTED_PICTURES) {
             $answers->setImagePath($this->object->getImagePath());
             $answers->setImagePathWeb($this->object->getImagePathWeb());
             $answers->setThumbPrefix($this->object->getThumbPrefix());
         }
         $template->setCurrentBlock('nested_ordering_output');
         $template->setVariable('NESTED_ORDERING', $answers->getHtml($shuffle));
         $template->parseCurrentBlock();
         $questiontext = $this->object->getQuestion();
         $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
         $questionoutput = $template->get();
         $pageoutput = $this->outQuestionPage("", $is_postponed, $active_id, $questionoutput);
         return $pageoutput;
     } else {
         if ($this->object->getOutputType() == OUTPUT_JAVASCRIPT) {
             // BEGIN: add javascript code for javascript enabled ordering questions
             $this->tpl->addBlockFile("CONTENT_BLOCK", "head_content", "tpl.il_as_qpl_ordering_output_javascript.html", "Modules/TestQuestionPool");
             $this->tpl->touchBlock("head_content");
             require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
             iljQueryUtil::initjQuery();
             iljQueryUtil::initjQueryUI();
             // END: add javascript code for javascript enabled ordering questions
             // BEGIN: add additional stylesheet for javascript enabled ordering questions
             $this->tpl->setCurrentBlock("AdditionalStyle");
             $this->tpl->setVariable("LOCATION_ADDITIONAL_STYLESHEET", ilUtil::getStyleSheetLocation("output", "test_javascript.css", "Modules/TestQuestionPool"));
             $this->tpl->parseCurrentBlock();
             // END: add additional stylesheet for javascript enabled ordering questions
             // BEGIN: onsubmit form action for javascript enabled ordering questions
             $this->tpl->setVariable("ON_SUBMIT", "return saveOrder('orderlist');");
             // END: onsubmit form action for javascript enabled ordering questions
         }
         // get the solution of the user for the active pass or from the last pass if allowed
         if ($active_id) {
             $solutions = NULL;
             include_once "./Modules/Test/classes/class.ilObjTest.php";
             if (!ilObjTest::_getUsePreviousAnswers($active_id, true)) {
                 if (is_null($pass)) {
                     $pass = ilObjTest::_getPass($active_id);
                 }
             }
             if (is_array($user_post_solution)) {
                 $solutions = array();
                 foreach ($user_post_solution as $key => $value) {
                     if (preg_match("/order_(\\d+)/", $key, $matches)) {
                         foreach ($this->object->getAnswers() as $answeridx => $answer) {
                             if ($answer->getRandomID() == $matches[1]) {
                                 array_push($solutions, array("value1" => $answeridx, "value2" => $value));
                             }
                         }
                     }
                 }
             } else {
                 $solutions =& $this->object->getSolutionValues($active_id, $pass);
             }
             if ($this->object->getOutputType() == OUTPUT_JAVASCRIPT) {
                 $solution_script .= "";
                 $jssolutions = array();
                 foreach ($solutions as $idx => $solution_value) {
                     if (strcmp($solution_value["value2"], "") != 0 && strcmp($solution_value["value1"], "") != 0) {
                         $jssolutions[$solution_value["value2"]] = $solution_value["value1"];
                     }
                 }
                 if (count($jssolutions)) {
                     ksort($jssolutions);
                     $js = "";
                     foreach ($jssolutions as $key => $value) {
                         if (is_object($this->object->getAnswer($value))) {
                             $js .= "initialorder.push('id_" . $this->object->getAnswer($value)->getRandomID() . "');";
                         }
                     }
                     $js .= "restoreInitialOrder();";
                 }
                 if (strlen($js)) {
                     $template->setCurrentBlock("javascript_restore_order");
                     $template->setVariable("RESTORE_ORDER", $js);
                     $template->parseCurrentBlock();
                 }
             }
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.assOrderingQuestionGUI.php

示例5: layout

 /**
  * generates frame layout
  */
 function layout($a_xml = "main.xml", $doShow = true)
 {
     global $tpl, $ilSetting, $ilCtrl, $ilUser;
     $layout = $this->determineLayout();
     // xmldocfile is deprecated! Use domxml_open_file instead.
     // But since using relative pathes with domxml under windows don't work,
     // we need another solution:
     $xmlfile = file_get_contents("./Modules/LearningModule/layouts/lm/" . $layout . "/" . $a_xml);
     if (!($doc = domxml_open_mem($xmlfile))) {
         include_once "./Modules/LearningModule/exceptions/class.ilLMPresentationException.php";
         throw new ilLMPresentationException("ilLMPresentation: XML File invalid. Error reading " . $layout . "/" . $a_xml . ".");
     }
     $this->layout_doc = $doc;
     //echo ":".htmlentities($xmlfile).":$layout:$a_xml:";
     // get current frame node
     $xpc = xpath_new_context($doc);
     $path = empty($_GET["frame"]) || $_GET["frame"] == "_blank" ? "/ilLayout/ilFrame[1]" : "//ilFrame[@name='" . $_GET["frame"] . "']";
     $result = xpath_eval($xpc, $path);
     $found = $result->nodeset;
     if (count($found) != 1) {
         include_once "./Modules/LearningModule/exceptions/class.ilLMPresentationException.php";
         throw new ilLMPresentationException("ilLMPresentation: XML File invalid. Found " . count($found) . " nodes for " . " path " . $path . " in " . $layout . "/" . $a_xml . ". LM Layout is " . $this->lm->getLayout());
     }
     $node = $found[0];
     // ProcessFrameset
     // node is frameset, if it has cols or rows attribute
     $attributes = $this->attrib2arr($node->attributes());
     $this->frames = array();
     if (!empty($attributes["rows"]) || !empty($attributes["cols"])) {
         $content .= $this->buildTag("start", "frameset", $attributes);
         //$this->frames = array();
         $this->processNodes($content, $node);
         $content .= $this->buildTag("end", "frameset");
         $this->tpl = new ilTemplate("tpl.frameset.html", true, true, "Modules/LearningModule");
         $this->renderPageTitle();
         $this->tpl->setVariable("FS_CONTENT", $content);
         if (!$doshow) {
             $content = $this->tpl->get();
         }
     } else {
         // ProcessContentTag
         //if ((empty($attributes["template"]) || !empty($_GET["obj_type"])))
         if ((empty($attributes["template"]) || !empty($_GET["obj_type"])) && ($_GET["frame"] != "_blank" || $_GET["obj_type"] != "MediaObject")) {
             // we got a variable content frame (can display different
             // object types (PageObject, MediaObject, GlossarItem)
             // and contains elements for them)
             // determine object type
             if (empty($_GET["obj_type"])) {
                 $obj_type = "PageObject";
             } else {
                 $obj_type = $_GET["obj_type"];
             }
             // get object specific node
             $childs = $node->child_nodes();
             $found = false;
             foreach ($childs as $child) {
                 if ($child->node_name() == $obj_type) {
                     $found = true;
                     $attributes = $this->attrib2arr($child->attributes());
                     $node = $child;
                     //echo "<br>2node:".$node->node_name();
                     break;
                 }
             }
             if (!$found) {
                 echo "ilLMPresentation: No template specified for frame '" . $_GET["frame"] . "' and object type '" . $obj_type . "'.";
                 exit;
             }
         }
         // get template
         $in_module = $attributes["template_location"] == "module" ? true : false;
         if ($in_module) {
             $this->tpl = new ilTemplate($attributes["template"], true, true, $in_module);
             $this->tpl->setBodyClass("");
         } else {
             $this->tpl = $tpl;
         }
         // set style sheets
         if (!$this->offlineMode()) {
             $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
         } else {
             $style_name = $ilUser->getPref("style") . ".css";
             $this->tpl->setVariable("LOCATION_STYLESHEET", "./style/" . $style_name);
         }
         include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
         iljQueryUtil::initjQuery($this->tpl);
         iljQueryUtil::initjQueryUI($this->tpl);
         include_once "./Services/UICore/classes/class.ilUIFramework.php";
         ilUIFramework::init($this->tpl);
         // to make e.g. advanced seletions lists work:
         $GLOBALS["tpl"] = $this->tpl;
         $childs = $node->child_nodes();
         foreach ($childs as $child) {
             $child_attr = $this->attrib2arr($child->attributes());
             switch ($child->node_name()) {
                 case "ilMainMenu":
                     $this->ilMainMenu();
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilLMPresentationGUI.php

示例6: sco_preview

 /**
  * SCO preview
  */
 function sco_preview()
 {
     global $tpl, $ilCtrl, $lng;
     // init main template
     $tpl = new ilTemplate("tpl.main.html", true, true);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $tpl->setBodyClass("");
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->slm_object->getStyleSheetId()));
     $tpl->parseCurrentBlock();
     // get javascript
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     iljQueryUtil::initjQueryUI();
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/pure.js");
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/pager.js");
     $tpl->addOnLoadCode("pager.Init();");
     $tree = new ilTree($this->slm_object->getId());
     $tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
     $tree->setTreeTablePK("slm_id");
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
     include_once "./Services/MetaData/classes/class.ilMD.php";
     $meta = new ilMD($this->node_object->getSLMId(), $this->node_object->getId(), $this->node_object->getType());
     $desc_ids = $meta->getGeneral()->getDescriptionIds();
     $sco_description = $meta->getGeneral()->getDescription($desc_ids[0])->getDescription();
     // get sco template
     $sco_tpl = new ilTemplate("tpl.sco.html", true, true, "Modules/Scorm2004");
     // navigation
     $lk = ilObjSAHSLearningModule::getAffectiveLocalization($this->node_object->getSLMId());
     ilSCORM2004Asset::renderNavigation($sco_tpl, "", $lk);
     // meta page (description and objectives)
     ilSCORM2004Asset::renderMetaPage($sco_tpl, $this->node_object, $this->node_object->getType());
     // init export (this initialises glossary template)
     ilSCORM2004PageGUI::initExport();
     $terms = $this->node_object->getGlossaryTermIds();
     // render page
     foreach ($tree->getSubTree($tree->getNodeData($this->node_object->getId()), true, 'page') as $page) {
         $page_obj = new ilSCORM2004PageGUI($this->node_object->getType(), $page["obj_id"], 0, $this->slm_object->getId());
         $page_obj->setPresentationTitle($page["title"]);
         $page_obj->setOutputMode(IL_PAGE_PREVIEW);
         $page_obj->setStyleId($this->slm_object->getStyleSheetId());
         if (count($terms) > 1) {
             $page_obj->setGlossaryOverviewInfo(ilSCORM2004ScoGUI::getGlossaryOverviewId(), $this->node_object);
         }
         $sco_tpl->setCurrentBlock("page_preview");
         $html = $ilCtrl->getHTML($page_obj);
         //$sco_tpl->setVariable("PAGE_PRV", $page_obj->showPage("export"));
         $sco_tpl->setVariable("PAGE_PRV", $html);
         $sco_tpl->parseCurrentBlock();
     }
     $output = $sco_tpl->get();
     // append glossary entries on the sco level
     $output .= ilSCORM2004PageGUI::getGlossaryHTML($this->node_object);
     //insert questions
     require_once './Modules/Scorm2004/classes/class.ilQuestionExporter.php';
     $output = preg_replace_callback("/{{{{{(Question;)(il__qst_[0-9]+)}}}}}/", array(get_class($this), 'insertQuestion'), $output);
     //		$output = preg_replace("/&#123;/","",$output);
     //		$output = preg_replace("/&#125;/","",$output);
     $output = "<script>var ScormApi=null;" . ilQuestionExporter::questionsJS() . "</script>" . $output;
     $lk = ilObjSAHSLearningModule::getAffectiveLocalization($this->node_object->getSLMId());
     //		include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php");
     //		ilSCORM2004PageGUI::addPreparationJavascript($tpl, $lk);
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/question_handling.js");
     $tpl->addCss("./Modules/Scorm2004/templates/default/question_handling.css");
     include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     ilOverlayGUI::initJavascript();
     //inline JS
     $output .= '<script type="text/javascript" src="./Modules/Scorm2004/scripts/questions/question_handling.js"></script>';
     $tpl->setVariable("CONTENT", $output);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:74,代码来源:class.ilSCORM2004ScoGUI.php

示例7: render

 /**
  * Render item
  */
 public function render($a_mode = "")
 {
     $tpl = new ilTemplate("tpl.prop_textinput.html", true, true, "Services/Form");
     if (strlen($this->getValue())) {
         $tpl->setCurrentBlock("prop_text_propval");
         $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
         $tpl->parseCurrentBlock();
     }
     if (strlen($this->getInlineStyle())) {
         $tpl->setCurrentBlock("stylecss");
         $tpl->setVariable("CSS_STYLE", ilUtil::prepareFormOutput($this->getInlineStyle()));
         $tpl->parseCurrentBlock();
     }
     if (strlen($this->getCssClass())) {
         $tpl->setCurrentBlock("classcss");
         $tpl->setVariable('CLASS_CSS', ilUtil::prepareFormOutput($this->getCssClass()));
         $tpl->parseCurrentBlock();
     }
     if ($this->getSubmitFormOnEnter()) {
         $tpl->touchBlock("submit_form_on_enter");
     }
     switch ($this->getInputType()) {
         case 'password':
             $tpl->setVariable('PROP_INPUT_TYPE', 'password');
             break;
         case 'hidden':
             $tpl->setVariable('PROP_INPUT_TYPE', 'hidden');
             break;
         case 'text':
         default:
             $tpl->setVariable('PROP_INPUT_TYPE', 'text');
     }
     $tpl->setVariable("ID", $this->getFieldId());
     $tpl->setVariable("SIZE", $this->getSize());
     if ($this->getMaxLength() != null) {
         $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
     }
     if (strlen($this->getSuffix())) {
         $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
     }
     $postvar = $this->getPostVar();
     if ($this->getMulti() && substr($postvar, -2) != "[]") {
         $postvar .= "[]";
     }
     if ($this->getDisabled()) {
         if ($this->getMulti()) {
             $value = $this->getMultiValues();
             $hidden = "";
             if (is_array($value)) {
                 foreach ($value as $item) {
                     $hidden .= $this->getHiddenTag($postvar, $item);
                 }
             }
         } else {
             $hidden = $this->getHiddenTag($postvar, $this->getValue());
         }
         if ($hidden) {
             $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
             $tpl->setVariable("HIDDEN_INPUT", $hidden);
         }
     } else {
         $tpl->setVariable("POST_VAR", $postvar);
     }
     // use autocomplete feature?
     if ($this->getDataSource()) {
         include_once "Services/jQuery/classes/class.iljQueryUtil.php";
         iljQueryUtil::initjQuery();
         iljQueryUtil::initjQueryUI();
         if ($this->getMulti()) {
             $tpl->setCurrentBlock("ac_multi");
             $tpl->setVariable('MURL_AUTOCOMPLETE', $this->getDataSource());
             $tpl->setVariable('ID_AUTOCOMPLETE', $this->getFieldId());
             $tpl->parseCurrentBlock();
             // set to fields that start with autocomplete selector
             $sel_auto = '[id^="' . $this->getFieldId() . '"]';
         } else {
             // use id for autocomplete selector
             $sel_auto = "#" . $this->getFieldId();
         }
         if (!$this->ajax_datasource_delimiter) {
             $tpl->setCurrentBlock("autocomplete_bl");
             $tpl->setVariable('SEL_AUTOCOMPLETE', $sel_auto);
             $tpl->setVariable('URL_AUTOCOMPLETE', $this->getDataSource());
             $tpl->parseCurrentBlock();
         } else {
             $tpl->setCurrentBlock("autocomplete_bl");
             $tpl->setVariable('AUTOCOMPLETE_DELIMITER', $this->ajax_datasource_delimiter);
             $tpl->setVariable('SEL_AUTOCOMPLETE_DELIMITER', $sel_auto);
             $tpl->setVariable('URL_AUTOCOMPLETE_DELIMITER', $this->getDataSource());
             $tpl->parseCurrentBlock();
         }
     }
     if ($a_mode == "toolbar") {
         // block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
         // -moz-inline-stack for FF2
         // zoom 1; *display:inline for IE6 & 7
         $tpl->setVariable("STYLE_PAR", 'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilTextInputGUI.php

示例8: render

 public function render($a_mode = "")
 {
     $tpl = new ilTemplate("tpl.prop_mail_quick_filter_input.html", true, true, "Services/Mail");
     if (strlen($this->getValue())) {
         $tpl->setCurrentBlock("prop_text_propval");
         $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
         $tpl->parseCurrentBlock();
     }
     if (strlen($this->getInlineStyle())) {
         $tpl->setCurrentBlock("stylecss");
         $tpl->setVariable("CSS_STYLE", ilUtil::prepareFormOutput($this->getInlineStyle()));
         $tpl->parseCurrentBlock();
     }
     if (strlen($this->getCssClass())) {
         $tpl->setCurrentBlock("classcss");
         $tpl->setVariable('CLASS_CSS', ilUtil::prepareFormOutput($this->getCssClass()));
         $tpl->parseCurrentBlock();
     }
     if ($this->getSubmitFormOnEnter()) {
         $tpl->touchBlock("submit_form_on_enter");
     }
     switch ($this->getInputType()) {
         case 'password':
             $tpl->setVariable('PROP_INPUT_TYPE', 'password');
             break;
         case 'hidden':
             $tpl->setVariable('PROP_INPUT_TYPE', 'hidden');
             break;
         case 'text':
         default:
             $tpl->setVariable('PROP_INPUT_TYPE', 'text');
     }
     $tpl->setVariable("ID", $this->getFieldId());
     $tpl->setVariable("SIZE", $this->getSize());
     if ($this->getMaxLength() != null) {
         $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
     }
     if (strlen($this->getSuffix())) {
         $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
     }
     $postvar = $this->getPostVar();
     if ($this->getMulti() && substr($postvar, -2) != "[]") {
         $postvar .= "[]";
     }
     if ($this->getDisabled()) {
         if ($this->getMulti()) {
             $value = $this->getMultiValues();
             $hidden = "";
             if (is_array($value)) {
                 foreach ($value as $item) {
                     $hidden .= $this->getHiddenTag($postvar, $item);
                 }
             }
         } else {
             $hidden = $this->getHiddenTag($postvar, $this->getValue());
         }
         if ($hidden) {
             $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
             $tpl->setVariable("HIDDEN_INPUT", $hidden);
         }
     } else {
         $tpl->setVariable("POST_VAR", $postvar);
     }
     // use autocomplete feature?
     if ($this->getDataSource()) {
         include_once "Services/jQuery/classes/class.iljQueryUtil.php";
         iljQueryUtil::initjQuery();
         iljQueryUtil::initjQueryUI();
         if ($this->getMulti()) {
             $tpl->setCurrentBlock("ac_multi");
             $tpl->setVariable('MURL_AUTOCOMPLETE', $this->getDataSource());
             $tpl->setVariable('ID_AUTOCOMPLETE', $this->getFieldId());
             $tpl->parseCurrentBlock();
             // set to fields that start with autocomplete selector
             $sel_auto = '[id^="' . $this->getFieldId() . '"]';
         } else {
             // use id for autocomplete selector
             $sel_auto = "#" . $this->getFieldId();
         }
         $tpl->setCurrentBlock("prop_text_autocomplete");
         $tpl->setVariable('SEL_AUTOCOMPLETE', $sel_auto);
         $tpl->setVariable('URL_AUTOCOMPLETE', $this->getDataSource());
         $tpl->parseCurrentBlock();
     }
     if ($a_mode == "toolbar") {
         // block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
         // -moz-inline-stack for FF2
         // zoom 1; *display:inline for IE6 & 7
         $tpl->setVariable("STYLE_PAR", 'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
     } else {
         $tpl->setVariable("STYLE_PAR", '');
     }
     // multi icons
     if ($this->getMulti() && !$a_mode && !$this->getDisabled()) {
         $tpl->setVariable("MULTI_ICONS", $this->getMultiIconsHTML($this->multi_sortable));
     }
     if (is_array($this->sub_items) && $this->sub_items) {
         /**
          * @var $lng ilLanguage
          */
//.........这里部分代码省略.........
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilMailQuickFilterInputGUI.php

示例9: showPage

 /**
  * display content of page
  */
 function showPage()
 {
     global $tree, $ilUser, $lng, $ilCtrl, $ilSetting, $ilTabs;
     // jquery and jquery ui are always provided for components
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     iljQueryUtil::initjQueryUI();
     //		$this->initSelfAssessmentRendering();
     include_once "./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php";
     ilObjMediaObjectGUI::includePresentationJS($GLOBALS["tpl"]);
     $GLOBALS["tpl"]->addJavaScript("./Services/COPage/js/ilCOPagePres.js");
     // needed for overlays in iim
     include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     ilOverlayGUI::initJavascript();
     include_once "./Services/MediaObjects/classes/class.ilPlayerUtil.php";
     ilPlayerUtil::initMediaElementJs($GLOBALS["tpl"]);
     // init template
     //if($this->outputToTemplate())
     //{
     if ($this->getOutputMode() == "edit") {
         //echo ":".$this->getTemplateTargetVar().":";
         $tpl = new ilTemplate("tpl.page_edit_wysiwyg.html", true, true, "Services/COPage");
         //$this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_edit_wysiwyg.html", "Services/COPage");
         // to do: status dependent class
         $tpl->setVariable("CLASS_PAGE_TD", "ilc_Page");
         // user comment
         if ($this->isEnabledChangeComments()) {
             $tpl->setCurrentBlock("change_comment");
             $tpl->setVariable("TXT_ADD_COMMENT", $this->lng->txt("cont_add_change_comment"));
             $tpl->parseCurrentBlock();
         }
         $tpl->setVariable("WYSIWYG_ACTION", $ilCtrl->getFormActionByClass("ilpageeditorgui", "", "", true));
         // determine media, html and javascript mode
         $sel_media_mode = $ilUser->getPref("ilPageEditor_MediaMode") == "disable" ? "disable" : "enable";
         $sel_html_mode = $ilUser->getPref("ilPageEditor_HTMLMode") == "disable" ? "disable" : "enable";
         $sel_js_mode = "disable";
         //if($ilSetting->get("enable_js_edit", 1))
         //{
         $sel_js_mode = ilPageEditorGUI::_doJSEditing() ? "enable" : "disable";
         //}
         // show prepending html
         $tpl->setVariable("PREPENDING_HTML", $this->getPrependingHtml());
         $tpl->setVariable("TXT_CONFIRM_DELETE", $lng->txt("cont_confirm_delete"));
         // presentation view
         if ($this->getViewPageLink() != "") {
             $ilTabs->addNonTabbedLink("pres_view", $this->lng->txt("cont_presentation_view"), $this->getViewPageLink(), $this->getViewPageTarget());
         }
         // show actions drop down
         $this->addActionsMenu($tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode);
         // get js files for JS enabled editing
         if ($sel_js_mode == "enable") {
             $this->insertHelp($tpl);
             include_once "./Services/YUI/classes/class.ilYuiUtil.php";
             ilYuiUtil::initDragDrop();
             ilYuiUtil::initConnection();
             ilYuiUtil::initPanel(false);
             $GLOBALS["tpl"]->addJavaScript("./Services/COPage/js/ilcopagecallback.js");
             $GLOBALS["tpl"]->addJavascript("Services/COPage/js/page_editing.js");
             include_once './Services/Style/classes/class.ilObjStyleSheet.php';
             $GLOBALS["tpl"]->addOnloadCode("var preloader = new Image();\n\t\t\t\t\t\tpreloader.src = './templates/default/images/loader.svg';\n\t\t\t\t\t\tilCOPage.setContentCss('" . ilObjStyleSheet::getContentStylePath((int) $this->getStyleId()) . ", " . ilUtil::getStyleSheetLocation() . ", ./Services/COPage/css/tiny_extra.css" . "')");
             //$GLOBALS["tpl"]->addJavascript("Services/RTE/tiny_mce_3_3_9_2/il_tiny_mce_src.js");
             $GLOBALS["tpl"]->addJavascript("Services/COPage/tiny/4_1_5/tinymce.js");
             $tpl->touchBlock("init_dragging");
             $cfg = $this->getPageConfig();
             $tpl->setVariable("IL_TINY_MENU", self::getTinyMenu($this->getPageObject()->getParentType(), $cfg->getEnableInternalLinks(), $cfg->getEnableWikiLinks(), $cfg->getEnableKeywords(), $this->getStyleId(), true, true, $cfg->getEnableAnchors()));
             // add int link parts
             include_once "./Services/Link/classes/class.ilInternalLinkGUI.php";
             $tpl->setCurrentBlock("int_link_prep");
             $tpl->setVariable("INT_LINK_PREP", ilInternalLinkGUI::getInitHTML($ilCtrl->getLinkTargetByClass(array("ilpageeditorgui", "ilinternallinkgui"), "", false, true, false)));
             $tpl->parseCurrentBlock();
             include_once "./Services/YUI/classes/class.ilYuiUtil.php";
             ilYuiUtil::initConnection();
             $GLOBALS["tpl"]->addJavaScript("./Services/UIComponent/Explorer/js/ilExplorer.js");
         }
         // multiple actions
         $cnt_pcs = $this->getPageObject()->countPageContents();
         if ($cnt_pcs > 1 || $this->getPageObject()->getParentType() != "qpl" && $cnt_pcs > 0) {
             $tpl->setCurrentBlock("multi_actions");
             if ($sel_js_mode == "enable") {
                 $tpl->setVariable("ONCLICK_DE_ACTIVATE_SELECTED", 'onclick="return ilEditMultiAction(\'activateSelected\');"');
                 $tpl->setVariable("ONCLICK_DELETE_SELECTED", 'onclick="return ilEditMultiAction(\'deleteSelected\');"');
                 $tpl->setVariable("ONCLICK_ASSIGN_CHARACTERISTIC", 'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
                 $tpl->setVariable("ONCLICK_COPY_SELECTED", 'onclick="return ilEditMultiAction(\'copySelected\');"');
                 $tpl->setVariable("ONCLICK_CUT_SELECTED", 'onclick="return ilEditMultiAction(\'cutSelected\');"');
                 $tpl->setVariable("TXT_SELECT_ALL", $this->lng->txt("select_all"));
                 $tpl->setVariable("ONCLICK_SELECT_ALL", 'onclick="return ilEditMultiAction(\'selectAll\');"');
             }
             $tpl->setVariable("TXT_DE_ACTIVATE_SELECTED", $this->lng->txt("cont_ed_enable"));
             $tpl->setVariable("TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt("cont_assign_characteristic"));
             $tpl->setVariable("TXT_DELETE_SELECTED", $this->lng->txt("cont_delete_selected"));
             $tpl->setVariable("TXT_COPY_SELECTED", $this->lng->txt("copy"));
             $tpl->setVariable("TXT_CUT_SELECTED", $this->lng->txt("cut"));
             $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.svg"));
             $tpl->parseCurrentBlock();
         }
     } else {
         // presentation or preview here
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilPageObjectGUI.php

示例10: initSelfAssessmentRendering

 /**
  * Init question handling
  */
 function initSelfAssessmentRendering($a_force_no_form = false)
 {
     global $tpl, $ilCtrl, $lng;
     if ($this->getPageConfig()->getEnableSelfAssessment()) {
         $qhtml = $this->getQuestionJsOfPage($this->getOutputMode() == "edit" || $a_force_no_form ? true : false);
         //			$qhtml = $this->getQuestionJsOfPage(true);
         $this->setQuestionHTML($qhtml);
         //include JQuery Libraries before Prototpye
         //			$tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/jquery.js");
         //			$tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/jquery-ui-min.js");
         include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
         iljQueryUtil::initjQuery();
         iljQueryUtil::initjQueryUI();
         $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/pure.js");
         $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/question_handling.js");
         $tpl->addCss("./Modules/Scorm2004/templates/default/question_handling.css");
         if (!$this->getPageConfig()->getEnableSelfAssessmentScorm() && $this->getOutputMode() != IL_PAGE_PREVIEW && $this->getOutputMode() != "offline") {
             $tpl->addJavaScript("./Services/COPage/js/ilCOPageQuestionHandler.js");
             $url = $ilCtrl->getLinkTarget($this, "processAnswer", "", true, false);
             $tpl->addOnloadCode("ilCOPageQuestionHandler.initCallback('" . $url . "');");
         }
         if ($this->getPageConfig()->getDisableDefaultQuestionFeedback()) {
             $tpl->addOnloadCode("ilias.questions.default_feedback = false;");
         }
         $lk = $this->getPageConfig()->getLocalizationLanguage();
         self::addPreparationJavascript($tpl, $lk);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:31,代码来源:class.ilPageObjectGUI.php

示例11: getSolutionHTML


//.........这里部分代码省略.........
                     }
                 }
             }
         } else {
             if ($previous_depth > $current_depth) {
                 if ($current_depth == $next_depth) {
                     // (6) pcn: 100
                     //					echo"(6)";
                     $html_output .= $this->renderListItem($cur_answer, $i);
                     $html_output .= $this->renderEndListItem();
                 } else {
                     if ($current_depth > $next_depth) {
                         // (11) pcn: 210
                         //					echo"(11)";
                         $html_output .= $this->renderListItem($cur_answer, $i);
                         $html_output .= $this->renderEndListItem();
                         $html_output .= $this->renderEndSubList();
                     } else {
                         if ($current_depth < $next_depth) {
                             if ($previous_depth == $next_depth) {
                                 // (7) pcn: 101
                                 //						echo"(7)";
                                 $html_output .= $this->renderListItem($cur_answer, $i);
                                 $html_output .= $this->renderBeginSubList();
                             } else {
                                 if ($previous_depth > $next_depth) {
                                     // (10) pcn: 201
                                     //						echo"(10)";
                                     $html_output .= $this->renderListItem($cur_answer, $i);
                                     for ($openlists = $next_depth; $openlists < $current_depth; $openlists++) {
                                         $html_output .= $this->renderEndSubList();
                                     }
                                     $html_output .= $this->renderBeginSubList();
                                 }
                             }
                         }
                     }
                 }
             } else {
                 if ($previous_depth < $current_depth) {
                     if ($current_depth == $next_depth) {
                         // (4) pcn: 011
                         //					echo"(4)";
                         $html_output .= $this->renderListItem($cur_answer, $i);
                         $html_output .= $this->renderEndListItem();
                     } else {
                         if ($current_depth > $next_depth) {
                             if ($previous_depth == $next_depth) {
                                 // (3) pcn: 010,
                                 //						echo"(3)";
                                 $html_output .= $this->renderListItem($cur_answer, $i);
                                 $html_output .= $this->renderEndListItem();
                                 $html_output .= $this->renderEndSubList();
                                 $html_output .= $this->renderEndListItem();
                             } else {
                                 if ($previous_depth > $next_depth) {
                                     // (9) pcn: 120
                                     //						echo"(9)";
                                     $html_output .= $this->renderListItem($cur_answer, $i);
                                     for ($openlists = $next_depth; $openlists < $current_depth; $openlists++) {
                                         $html_output .= $this->renderEndListItem();
                                         $html_output .= $this->renderEndSubList();
                                     }
                                 }
                             }
                         } else {
                             if ($current_depth < $next_depth) {
                                 // (5) pcn: 012
                                 //					echo"(5)";
                                 $html_output .= $this->renderListItem($cur_answer, $i);
                                 $html_output .= $this->renderBeginSubList();
                             }
                         }
                     }
                 }
             }
         }
         $previous_depth = $current_depth;
         $i++;
     }
     $html_output .= $this->renderEndSubList();
     $html_output .= $this->renderEndSortableContainer();
     //		$js_include_tpl = new ilTemplate("tpl.il_as_qpl_nested_ordering_output_solution.html", TRUE, TRUE, "Modules/TestQuestionPool");
     include_once "Services/jQuery/classes/class.iljQueryUtil.php";
     global $tpl;
     $tpl->addJavaScript("./Services/jQuery/js/jquery.nestable.js");
     iljQueryUtil::initjQuery();
     iljQueryUtil::initjQueryUI();
     $js_output = '';
     $js_include_tpl = new ilTemplate("tpl.il_as_qpl_nested_ordering_output_javascript.html", TRUE, TRUE, "Modules/TestQuestionPool");
     if (!array_key_exists("pdf", $_GET) || $_GET["pdf"] != 1) {
         $js_include_tpl->touchBlock("css_include");
     }
     $js_include_tpl->setCurrentBlock('js_include');
     $js_include_tpl->setVariable('PERFORM_JAVASCRIPT', $this->getPerformJavascript());
     ///// */
     $js_include_tpl->setVariable('HTML_OUTPUT', $html_output);
     $js_include_tpl->parseCurrentBlock();
     return $js_include_tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilNestedOrderingGUI.php

示例12: addJavaScript

 /**
  * Add javascript files that are necessary to run accordion
  */
 static function addJavaScript()
 {
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initConnection();
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQueryUI();
     $tpl->addJavaScript("./Services/Accordion/js/accordion.js", true, 3);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilAccordionGUI.php


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