public function getContentToUpdate($url, $timeout, $class = "") { echo '<div id="ajaxContentLoader-' . $this->id . '" class="' . $class . '"></div>'; /** * @var \OWeb\utils\js\jquery\HeaderOnReadyManager $headersOnReady */ $headersOnReady = \OWeb\utils\js\jquery\HeaderOnReadyManager::getInstance(); $code = 'ajaxContentLoader("ajaxContentLoader-' . $this->id . '", ' . json_encode($url) . ', ' . $timeout * 1000 . ');'; $headersOnReady->add($code); $this->id++; }
<?php $this->addHeader('syntaxHighlighter/shCore.js', \OWeb\manage\Headers::javascript); $this->addHeader('syntaxHighlighter/shBrushJScript.js', \OWeb\manage\Headers::js); $this->addHeader('syntaxHighlighter/shBrushPhp.js', \OWeb\manage\Headers::js); //$this->addHeader('syntaxHighlighter/shAutoloader.js', \OWeb\manage\Headers::javascript); \OWeb\utils\js\jquery\HeaderOnReadyManager::getInstance()->add("SyntaxHighlighter.config.bloggerMode = true;\nSyntaxHighlighter.defaults['toolbar'] = true;\nSyntaxHighlighter.all();"); $this->addHeader('syntaxHighlighter/shCoreDefault.css', \OWeb\manage\Headers::css); ?> <div class="uk-grid"> <div class="uk-width-2-4"> <?php $this->form->display(); ?> </div> </div> <?php $tabs = $this->tabs; $tabs->addSection('Section 1', '<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>'); $tabs->addSection('Section 2', '<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.</p>'); $tabs->addSection('Section 3', ' <p> Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
* LICENSE: This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see {http://www.gnu.org/licenses/}. */ $this->addHeader('jquery/jquery.timers-1.2.js', \OWeb\manage\Headers::javascript); $this->addHeader('jquery/jquery.easing.1.3.js', \OWeb\manage\Headers::javascript); $this->addHeader('jquery/jquery.galleryview-3.0-dev.js', \OWeb\manage\Headers::javascript); $this->addHeader('jquery_theme/jquery.galleryview-3.0-dev.css', \OWeb\manage\Headers::css); $gallery_id = (string) new \OWeb\utils\IdGenerator(); $js = "\n\t\$('#" . $gallery_id . "').galleryView({\n panel_width: " . $this->panel_width . ",\n panel_height: " . $this->panel_height . ",\n panel_scale: '" . $this->panel_scale . "',\n pan_images: '" . $this->pan_images . "',\n show_infobar: '" . $this->show_infobar . "',\n infobar_opacity: " . $this->infobar_opacity . "\n });\n"; \OWeb\utils\js\jquery\HeaderOnReadyManager::getInstance()->add($js); $files = scandir(OWEB_DIR_DATA . '/' . $this->path); echo '<ul id="' . $gallery_id . '">'; foreach ($files as $file) { if (!is_dir(OWEB_DIR_DATA . '/' . $this->path . '/' . $file)) { $exps = explode('.', $file); echo '<li>'; echo '<img src="' . OWEB_WWW_DATA . '/' . $this->path . '/' . $file . '" title="' . $exps[0] . '" data-description="' . $exps[0] . '"/>'; echo '</li>'; } } echo '</ul>';
<a href="#" class="ca-more">more...</a> </div> <div class="ca-content-wrapper"> <div class="ca-content"> <a href="#" class="ca-close">close</a> <div class="ca-content-text"> <?php echo $prog->getShortDescription($lang); ?> </div> <?php $link = $this->url(array('page' => 'programs\\Program', 'prgId' => $prog->getId())); echo '<p><a href="' . $link . '" class="ca-content-more">More Information & Download</a></p>'; ?> </div> </div> </div> <?php } ?> </div> </div> <?php $nbT++; \OWeb\utils\js\jquery\HeaderOnReadyManager::getInstance()->add('$(\'#prog_carousel_' . $nbT . '\').contentcarousel();'); }
* it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see {http://www.gnu.org/licenses/}. */ $this->addHeader('articles.css', \OWeb\manage\Headers::css); $this->addHeader('onprogress.css', \OWeb\manage\Headers::css); $this->addHeader('programs.css', \OWeb\manage\Headers::css); \OWeb\utils\js\jquery\HeaderOnReadyManager::getInstance()->add('$( ".Description > .tabs" ).tabs();', \OWeb\manage\Headers::code); ?> <p> <?php \OWeb\manage\SubViews::getInstance()->getSubView('Controller\\OWeb\\widgets\\Category_Parents')->addParams('cat', $this->program->getCategory())->addParams('link', $this->url(array('page' => 'programs\\Categorie', "catId" => "")))->display(); ?> </p> <h1><?php echo $this->program->getName(); ?> </h1> <div class="program_info uk-grid">
public function getNewParser() { $parser = new \SBBCodeParser\Node_Container_Document(); $bbcode = new \SBBCodeParser\BBCode('title', function ($content, $attribs) { $tag = trim(htmlspecialchars($content)); $att = $attribs['default']; if ($att == 'h1') { SBBCodeParser::$tree[] = array(1, $content, $tag); return "<h1 class=\"uk-h2\" id=\"{$tag}\">" . $content . "</h1>"; } else { if ($att == 'h2') { SBBCodeParser::$tree[] = array(2, $content, $tag); return "<h2 class=\"uk-h3\" id=\"{$tag}\">" . $content . "</h2>"; } else { if ($att == 'h3') { SBBCodeParser::$tree[] = array(3, $content, $tag); return "<h3 class=\"uk-h4\" id=\"{$tag}\">" . $content . "</h2>"; } else { if ($att == 'h4') { SBBCodeParser::$tree[] = array(4, $content, $tag); return "<h4 class=\"uk-h5\" id=\"{$tag}\">" . $content . "</h4>"; } else { if ($att == 'h5') { SBBCodeParser::$tree[] = array(5, $content, $tag); return "<h5 class=\"uk-h6\" id=\"{$tag}\">" . $content . "</h5>"; } } } } } }, \SBBCodeParser\BBCode::BLOCK_TAG, false, array(), array('text_node'), \SBBCodeParser\BBCode::AUTO_DETECT_EXCLUDE_ALL); $parser->add_bbcode($bbcode); $bbcode = new \SBBCodeParser\BBCode('codes', function ($content, $attribs) { if (isset($attribs['default']) && !empty($attribs['default'])) { $att = strtolower($attribs['default']); } else { $att = 'text'; } $brushes = array(); $brushes['actionscript3'] = 'shBrushAS3.js'; $brushes['as3,actionscript3'] = 'shBrushAS3.js'; $brushes['bash'] = 'shBrushBash.js'; $brushes['shell'] = 'shBrushBash.js'; $brushes['cf,coldfusion'] = 'shBrushColdFusion.js'; $brushes['cf'] = 'shBrushColdFusion.js'; $brushes['csharp'] = 'shBrushCSharp.js'; $brushes['c-sharp'] = 'shBrushCSharp.js'; $brushes['cpp'] = 'shBrushCpp.js'; $brushes['c'] = 'shBrushCpp.js'; $brushes['css'] = 'shBrushCss.js'; $brushes['delphi'] = 'shBrushDelphi.js'; $brushes['pas'] = '******'; $brushes['pascal'] = 'shBrushDelphi.js'; $brushes['patch'] = 'shBrushDiff.js'; $brushes['diff'] = 'shBrushDiff.js'; $brushes['erlang'] = 'shBrushErlang.js'; $brushes['erl'] = 'shBrushErlang.js'; $brushes['groovy'] = 'shBrushGroovy.js'; $brushes['js'] = 'shBrushJScript.js'; $brushes['jscript,'] = 'shBrushJScript.js'; $brushes['javascript'] = 'shBrushJScript.js'; $brushes['java'] = 'shBrushJava.js'; $brushes['javafx'] = 'shBrushJavaFX.js'; $brushes['jfx'] = 'shBrushJavaFX.js'; $brushes['pl'] = 'shBrushPerl.js'; $brushes['perl'] = 'shBrushPerl.js'; $brushes['php'] = 'shBrushPhp.js'; $brushes['text'] = 'shBrushPlain.js'; $brushes['plain'] = 'shBrushPlain.js'; $brushes['ps'] = 'shBrushPowerShell.js'; $brushes['powershell'] = 'shBrushPowerShell.js'; $brushes['py'] = 'shBrushPython.js'; $brushes['python'] = 'shBrushPython.js'; $brushes['rails'] = 'shBrushRuby.js'; $brushes['ror'] = 'shBrushRuby.js'; $brushes['ruby'] = 'shBrushRuby.js'; $brushes['scala'] = 'shBrushScala.js'; $brushes['sql'] = 'shBrushSql.js'; $brushes['vb'] = 'shBrushVb.js'; $brushes['vbnet'] = 'shBrushVb.js'; $brushes['xml'] = 'shBrushXml.js'; $brushes['xhtml'] = 'shBrushXml.js'; $brushes['xslt'] = 'shBrushXml.js'; $brushes['html'] = 'shBrushXml.js'; $brushes['xhtml'] = 'shBrushXml.js'; if (isset($brushes[$att])) { $js = $brushes[$att]; } else { $att = 'plain'; $js = $brushes['plain']; } $headers = \OWeb\manage\Headers::getInstance(); $headers->addHeader('syntaxHighlighter/shCore.js', \OWeb\manage\Headers::javascript); $headers->addHeader('syntaxHighlighter/' . $js, \OWeb\manage\Headers::js); $headers->addHeader('syntaxHighlighter/shCoreDefault.css', \OWeb\manage\Headers::css); \OWeb\utils\js\jquery\HeaderOnReadyManager::getInstance()->add("SyntaxHighlighter.config.bloggerMode = true;\n\t\t\t\t\t\t\tSyntaxHighlighter.defaults['toolbar'] = true;\n\t\t\t\t\t\t\tSyntaxHighlighter.all();"); $content = str_replace("<br />", "", $content); return '<pre class="brush: ' . $att . ';">' . $content . '</pre>'; }, \SBBCodeParser\BBCode::BLOCK_TAG, false, array(), array(), \SBBCodeParser\BBCode::AUTO_DETECT_EXCLUDE_ALL); $parser->add_bbcode($bbcode); $parser->add_emoticons(array(':D' => OWEB_HTML_URL_IMG . '/icons/01.png', 'OD' => OWEB_HTML_URL_IMG . '/icons/02.png', ':)' => OWEB_HTML_URL_IMG . '/icons/03.png', ';)' => OWEB_HTML_URL_IMG . '/icons/04.png', '8)' => OWEB_HTML_URL_IMG . '/icons/05.png')); return $parser; }