function applyCodeBlockSubstitution($s) { $s = preg_replace_callback('/(\\<code class="[^"]+"\\>)(.*)(\\<\\/code\\>)/isU', create_function('$m', 'return $m[1].htmlspecialchars($m[2]).$m[3];'), $s, -1, $count); if ($count) { JavaScript::addInclude(GORUM_JS_DIR . "/jquery/chili/jquery.chili-2.2.js"); JavaScript::addScript('ChiliBook.recipeFolder = "' . GORUM_JS_DIR . '/jquery/chili/";'); JavaScript::addCss(GORUM_JS_DIR . "/jquery/chili/chili.css"); } return $s; }
function addJavaScripts() { if (isset($this->typ["jscripts"])) { if (is_array($this->typ["jscripts"])) { foreach ($this->typ["jscripts"] as $script) { JavaScript::addScript($script()); } } else { $script = $this->typ["jscripts"]; JavaScript::addScript($script()); } } }
function handleCategorySelect($tableId) { global $gorumroll, $jQueryLib; JavaScript::addInclude(GORUM_JS_DIR . $jQueryLib); JavaScript::addInclude(JS_DIR . "/categoryselect.js"); if ($this->cascadingCategorySelectEnabled() && !$gorumroll->rollid && $gorumroll->list != "customlist") { $ctrl =& new AppController("cat/get_one_level_of_categories"); // Ajax target $url = $ctrl->makeUrl(); JavaScript::addInclude(GORUM_JS_DIR . "/jquery/jquery.livequery.js"); JavaScript::addScript("\$JQ.noah.addNextSelectRow(" . G::js($url, "subCategory", $tableId) . ");"); JavaScript::addOnload("\$.noah.cascadingSelectOnLoad('{$tableId}');"); } elseif (!$this->cascadingCategorySelectEnabled() || $gorumroll->list == "customlist") { JavaScript::addOnload("\$.noah.simpleCategoryReload();"); } }