/** * Display the view */ function display() { $document =& JFactory::getDocument(); $document->setTitle(JText::_('NEW_DM_TASK')); JHtml::script('dmtaskForm.js', 'media/com_dbconnect/js/'); //TOOLBAR, CSS JHtml::stylesheet('main.css', 'media/com_dbconnect/css/'); if (JPATH_BASE == JPATH_ADMINISTRATOR) { JHtml::stylesheet('admin.css', 'media/com_dbconnect/css/'); JToolBarHelper::title(JText::_('NEW_DM_TASK'), 'dbconnect'); } // JHTML::_('behavior.modal'); $this->unidbModel = $this->getModel('unidb', 'unidbModel'); $this->assignRef('columns', $this->unidbModel->getColumns($this->connection->table)); if (isset($this->dmTask)) { $document->setTitle(JText::_('EDIT_DM_TASK')); $columnsXml = simplexml_load_string($this->dmTask->columns); //upravujeme stávající úlohu - máme zadané xml s daty o sloupcích $this->assign('editTask', true); $columnsArr = array(); foreach ($columnsXml as $column) { $columnName = (string) $column['name']; $columnsArr[$columnName] = array('use' => (string) $column['use'], 'type' => (string) $column['type']); } $this->assignRef('columnsData', $columnsArr); } //DEVNOTE:call parent display parent::display(); }
function getInput($name, $id, $value, $params) { $this->name = $name; $this->id = $id; $this->value = $value; $this->params = $params; JHtml::stylesheet('nnframework/colorpicker.min.css', false, true); JHtml::script('nnframework/colorpicker/color_functions.js', false, true); JHtml::script('nnframework/colorpicker/js_color_picker_v2.js', false, true); $this->value = strtoupper(preg_replace('#[^a-z0-9]#si', '', $this->value)); $color = $this->value; if (!$color) { $color = 'DDDDDD'; } $html = array(); if ($this->def('inlist', 0) && $this->def('action')) { $html[] = '<input onclick="showColorPicker(this,this,\'' . addslashes($this->def('action')) . '\')" style="background-color:#' . $color . ';" type="text" name="' . $this->name . '" id="' . $this->name . $this->id . '" value="' . $this->value . '" class="nn_color nn_color_list" maxlength="6" size="1" />'; } else { $html[] = '<fieldset id="' . $this->id . '" class="radio">'; $html[] = '<label class="radio" for="' . $this->id . '" style="width:auto;min-width:0;padding-right:0;"># </label>'; $html[] = '<input onclick="showColorPicker(this,this)" onchange="this.style.backgroundColor=\'#\'+this.value" style="background-color:#' . $color . ';" type="text" name="' . $this->name . '" id="' . $this->id . '" value="' . $this->value . '" class="nn_color" maxlength="6" size="8" />'; $html[] = '</fieldset>'; } return implode('', $html); }
function image_compareYTShortcode($atts = null, $content = null) { $atts = ytshortcode_atts(array('before_image' => '', 'after_image' => '', 'orientation' => '', 'before_text' => 'Original', 'after_text' => 'Modified', 'class' => ''), $atts, 'image_compare'); // Unique Id $id = uniqid("ytic") . rand() . time(); if (yt_image_media($atts['before_image']) && yt_image_media($atts['after_image'])) { $orientation = $atts['orientation'] == 'horizontal' ? 'data-orientation="horizontal"' : ''; $css = '#' . $id . ' .twentytwenty-before-label:before {content: "' . $atts['before_text'] . '"}'; $css .= '#' . $id . ' .twentytwenty-after-label:before {content: "' . $atts['after_text'] . '"}'; // Css Adding in Head JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/image_compare/css/image_compare.css", 'text/css'); // JavaScipt additon in Head JHtml::_('jquery.framework'); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/assets/js/jquery.twentytwenty.js"); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/assets/js/jquery.event.move.js"); // OUtput Structure in here $return = ' <div id="' . $id . '" class="twentytwenty-container' . trim($atts['class']) . '" data-orientation="horizontal"> <img src="' . yt_image_media($atts['before_image']) . '" alt="' . $atts['before_text'] . '"> <img src="' . yt_image_media($atts['after_image']) . '" alt="' . $atts['before_text'] . '"> </div>'; $js = 'jQuery(window).load(function(){ jQuery("#' . $id . '").twentytwenty({orientation: \'' . $atts['orientation'] . '\'}); });'; $doc = JFactory::getDocument(); $doc->addStyleDeclaration($css); $doc->addScriptDeclaration($js); } else { $return = yt_alert_box('You can compare two images by using this shortcode', 'warning'); } return $return; }
function getMessage($element = '', $xml = '', $version = '', $type = 'system', $admin = 1) { if (!$element) { return ''; } $alias = preg_replace('#[^a-z]#', '', strtolower($element)); if ($xml) { $xml = JApplicationHelper::parseXMLInstallFile(JPATH_SITE . '/' . $xml); if ($xml && isset($xml['version'])) { $version = $xml['version']; } } if (!$version) { $version = self::getXMLVersion($element, $type, $admin); } if (!$version) { return ''; } JHtml::_('jquery.framework'); JHtml::script('nnframework/script.min.js', false, true); $url = 'download.nonumber.nl/extensions.php?j=3&e=' . $alias; $script = "\n\t\t\tjQuery(document).ready(function() {\n\t\t\t\tnnScripts.loadajax(\n\t\t\t\t\t'" . $url . "',\n\t\t\t\t\t'nnScripts.displayVersion( data, \"" . $alias . "\", \"" . str_replace(array('FREE', 'PRO'), '', $version) . "\" )',\n\t\t\t\t\t'nnScripts.displayVersion( \"\" )'\n\t\t\t\t);\n\t\t\t});\n\t\t"; JFactory::getDocument()->addScriptDeclaration($script); return '<div class="alert alert-error" style="display:none;" id="nonumber_version_' . $alias . '">' . $this->getMessageText($alias, $version) . '</div>'; }
public function display($tpl = null) { // get model and update context with current $model =& JModel::getInstance('urls', 'Sh404sefModel'); $context = $model->setContext($this->_context . '.' . $this->getLayout()); // store it $model =& $this->setModel($model, true); // read data from model $list =& $model->getList((object) array('layout' => $this->getLayout(), 'getPageId' => true)); // and push it into the view for display $this->assign('items', $list); $this->assign('itemCount', count($this->items)); $this->assign('pagination', $model->getPagination((object) array('layout' => $this->getLayout(), 'getPageId' => true))); $options = $model->getDisplayOptions(); $this->assign('options', $options); $this->assign('optionsSelect', $this->_makeOptionsSelect($options)); $this->assign('helpMessage', JText16::_('COM_SH404SEF_PAGEID_HELP')); // add behaviors and styles as needed $modalSelector = 'a.modalediturl'; $js = '\\function(){shAlreadySqueezed = false;if(parent.shReloadModal) {parent.window.location=\'' . $this->defaultRedirectUrl . '\';parent.shReloadModal=true}}'; $params = array('overlayOpacity' => 0, 'classWindow' => 'sh404sef-popup', 'classOverlay' => 'sh404sef-popup', 'onClose' => $js); Sh404sefHelperHtml::modal($modalSelector, $params); // build the toolbar $toolbarMethod = '_makeToolbar' . ucfirst($this->getLayout()); if (is_callable(array($this, $toolbarMethod))) { $this->{$toolbarMethod}($params); } // add our own css JHtml::styleSheet('list.css', Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/'); // link to custom javascript JHtml::script('list.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); JHtml::script('metas.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // now display normally parent::display($tpl); }
function notificationYTShortcode($atts = null, $content = null) { $atts = ytshortcode_atts(array('effect' => 1, 'button_text' => 'Open notification', 'button_class' => '', 'close_button' => '', 'title' => 'notification Title', 'title_background' => 'rgba(0,0,0,0.1)', 'title_color' => '#222222', 'background' => '#ffffff', 'color' => '#666666', 'border' => 'none', 'shadow' => '0 solid #000000', 'width' => '640px', 'height' => 'auto', 'overlay_background' => '#000', 'class' => ''), $atts, 'notification'); $id = uniqid('ytmodal_') . rand() . time(); $id_over = uniqid() . rand() . time(); JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/notification/css/notification.css", 'text/css'); JHtml::_('jquery.framework'); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/notification/js/notification.js"); $css = ' #' . $id . ' .yt-modal-content-wrapper { height: ' . $atts['height'] . '; width: ' . $atts['width'] . '; background: ' . $atts['background'] . '; color: ' . $atts['color'] . '; border: ' . $atts['border'] . '; box-shadow: ' . $atts['shadow'] . '; } #' . $id . ' .yt-modal-title-wrapper { background: ' . $atts['title_background'] . '; } #' . $id . ' .yt-modal-title-wrapper h3 { color: ' . $atts['title_color'] . '; } '; $doc = JFactory::getDocument(); $doc->addStyleDeclaration($css); $overlay_style = 'style=" background-color: ' . $atts['overlay_background'] . ';"'; $close_button = $atts['close_button'] === 'yes' ? '<a href="javascript:void(0);" class="yt-modal-close"><i class="fa fa-remove"></i></a>' : ''; $return = '<div class="yt-modal-wrapper">'; $return .= '<a href="javascript:void(0);" class="yt-modal-trigger ' . $atts['button_class'] . '" data-modal="' . $id . '">' . $atts['button_text'] . '</a>'; $return .= '<div class="yt-modal yt-modal-effect-' . $atts['effect'] . '" id="' . $id . '"> <div class="yt-modal-content-wrapper">'; $return .= '<div class="yt-modal-title-wrapper">'; $return .= '<h3>' . $atts['title'] . '</h3>'; $return .= $close_button; $return .= '</div>'; $return .= '<div class="yt-content">'; $return .= parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)); $return .= '</div> </div> </div> <div class="yt-modal-overlay ' . $id . '" ' . $overlay_style . '></div>'; $return .= '</div>'; return $return; }
function getMessage($element = '', $xml = '', $version = '', $type = 'system', $admin = 1) { if (!$element) { return ''; } $alias = preg_replace('#[^a-z]#', '', strtolower($element)); if ($xml) { $xml = JApplicationHelper::parseXMLInstallFile(JPATH_SITE . '/' . $xml); if ($xml && isset($xml['version'])) { $version = $xml['version']; } } if (!$version) { $version = self::getXMLVersion($element, $type, $admin); } if (!$version) { return ''; } JHtml::_('behavior.mootools'); JHtml::script('nnframework/script.min.js', false, true); $url = 'download.nonumber.nl/extensions.php?j=25&e=' . $alias; $script = "\n\t\t\twindow.addEvent( 'domready', function() {\n\t\t\t\tnnScripts.loadajax(\n\t\t\t\t\t'" . $url . "',\n\t\t\t\t\t'nnScripts.displayVersion( data, \"" . $alias . "\", \"" . str_replace(array('FREE', 'PRO'), '', $version) . "\" )',\n\t\t\t\t\t'nnScripts.displayVersion( \"\" )'\n\t\t\t\t);\n\t\t\t});\n\t\t"; JFactory::getDocument()->addScriptDeclaration($script); return $this->getMessageText($alias, $version); }
public function display($tpl = null) { // get current layout $params['layout'] = JRequest::getCmd('layout', 'default'); // push the appropriate data into the view $methodName = '_pushConfigData' . ucfirst($params['layout']); if (is_callable(array($this, $methodName))) { $this->{$methodName}(); } // build the toolbar $toolBar = $this->_makeToolbar($params); $this->assignRef('toolbar', $toolBar); // add title and icon to toolbar $this->assign('toolbarTitle', Sh404sefHelperGeneral::makeToolbarTitle(JText16::_('COM_SH404SEF_CONFIGURATION'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title')); // insert needed css files $this->_addCss(); // link to custom javascript JHtml::script('config.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // also add some custom javascript tp collect editor content if ($params['layout'] == 'errordocs') { $this->_addJs(); } // add tooltips JHTML::_('behavior.tooltip'); // now display normally parent::display($tpl); }
public function display($tpl = null) { // get model and update context with current $model =& $this->getModel(); $context = $model->setContext($this->_context . '.' . $this->getLayout()); // read data from model $list =& $model->getList((object) array('layout' => $this->getLayout())); // and push it into the view for display $this->assign('items', $list); $this->assign('itemCount', count($this->items)); $this->assign('pagination', $model->getPagination()); $options = $model->getDisplayOptions(); $this->assign('options', $options); $this->assign('optionsSelect', $this->_makeOptionsSelect($options)); $this->assign('helpMessage', JText::_('COM_SH404SEF_ALIASES_HELP_NEW_ALIAS')); // add behaviors and styles as needed $modalSelector = 'a.modalediturl'; $js = '\\function(){window.parent.shAlreadySqueezed = false;if(window.parent.shReloadModal) {parent.window.location=\'' . $this->defaultRedirectUrl . '\';window.parent.shReloadModal=true}}'; $params = array('overlayOpacity' => 0, 'classWindow' => 'sh404sef-popup', 'classOverlay' => 'sh404sef-popup', 'onClose' => $js); Sh404sefHelperHtml::modal($modalSelector, $params); // build the toolbar $toolBar = $this->_makeToolbar(); // insert needed css files $this->_addCss(); // link to custom javascript JHtml::script('list.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // now display normally parent::display($tpl); }
public function display($tpl = null) { // get model and update context with current $model =& $this->getModel(); $context = $model->updateContext($this->_context . '.' . $this->getLayout()); // get url id $notFoundUrlId = JRequest::getInt('notfound_url_id'); // read url data from model $url =& $model->getUrl($notFoundUrlId); // and push url into the template for display $this->assign('url', $url); // build the toolbar $toolBar = $this->_makeToolbar(); $this->assignRef('toolbar', $toolBar); // add title. $this->assign('toolbarTitle', Sh404sefHelperGeneral::makeToolbarTitle(JText16::_('COM_SH404SEF_NOT_FOUND_ENTER_REDIRECT'), $icon = 'addedit.png', $class = 'header')); // insert needed css files $this->_addCss(); // link to custom javascript JHtml::script('edit.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // add domready event $document =& JFactory::getDocument(); // add tooltips JHTML::_('behavior.tooltip'); // now display normally parent::display($tpl); }
public function display($tpl = null) { // get model and update context with current $model =& $this->getModel(); $context = $model->updateContext($this->_context . '.' . $this->getLayout()); // get url id $notFoundUrlId = JRequest::getInt('notfound_url_id'); // read url data from model. This is the 404 request we want to // redirect to something else // must be called before model->getList() $url =& $model->getUrl($notFoundUrlId); // and push url into the template for display $this->assign('url', $url); // attach data, according to specific layout requested $methodName = '_attachData' . ucfirst($this->getLayout()); if (is_callable(array($this, $methodName))) { $this->{$methodName}(); } // build the toolbar $methodName = '_makeToolbar' . ucfirst($this->getLayout()); if (is_callable(array($this, $methodName))) { $this->{$methodName}(); } // add confirmation phrase to toolbar $this->assign('toolbarTitle', Sh404sefHelperGeneral::makeToolbarTitle(JText::_('COM_SH404SEF_NOT_FOUND_SELECT_REDIRECT'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title')); // insert needed css files $this->_addCss(); // link to custom javascript JHtml::script('notfound.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // now display normally parent::display($tpl); }
protected function getInput() { if (!JevJoomlaVersion::isCompatible("3.4")) { return ""; } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); $layouttype = $this->getAttribute("layouttype"); $target = $this->getAttribute("target"); $csstarget = $this->getAttribute("csstarget"); JHtml::script("https://www.jevents.net/jevlayouts/LatestEvents.js"); $html = "<script>jQuery(document).ready(function (\$){loadJevPreview('{$target}', '{$csstarget}');});</script>"; $id = $this->id; $html .= <<<DROPDOWN <div class="dropdown btn-group" id="{$id}"> <button class="btn btn-default dropdown-toggle" type="button" id="dropdown{$target}" data-toggle="dropdown" aria-expanded="false"> Select Layout <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu" aria-labelledby="dropdown{$target}" id="dropdownUL_{$target}" role="menu"> <li role="presentation"><a role="menuitem" class="dropdownpopover" href="#" data-title="Current Customised Value" data-content="Custom Format String customised by you">Current Value</a></li> </ul> </div> DROPDOWN; return $html; }
function countdownYTShortcode($atts = null, $content = null) { $atts = ytshortcode_atts(array('count_date' => '2020/12/25', 'count_time' => '', 'count_size' => '32', 'count_color' => '', 'background' => '#FFFFFF', 'text_align' => 'default', 'text_size' => '14', 'text_color' => '#666666', 'align' => 'left', 'padding' => '', 'margin' => '', 'border' => '0px solid #DDD', 'radius' => '', 'divider' => 'none', 'divider_color' => 'rgba(100,100,100,.1)', 'class' => ''), $atts, 'countdown'); $id = uniqid('yt_countdown_') . rand() . time(); $css = ''; $js = ''; $divider_style = ''; if ($atts['divider'] == 'colon') { $divider_style = '#' . $id . ' .yt-countdown-content .yt-cd-timer > span:after { font-size: ' . round($atts['count_size'] / 2) . 'px;line-height: ' . round($atts['count_size'] / 2) . 'px; color: ' . $atts['divider_color'] . ';}'; } if ($atts['divider'] == 'vertical_line' || $atts['divider'] == 'horizontal_line') { $divider_style = '#' . $id . ' .yt-countdown-content .yt-cd-timer > span:after {background-color: ' . $atts['divider_color'] . ';}'; } else { $divider_style = '#' . $id . ' .yt-countdown-content .yt-cd-timer > span:after { font-size: ' . $atts['count_size'] . 'px;line-height: ' . $atts['count_size'] . 'px; color: ' . $atts['divider_color'] . ';}'; } if ($atts['margin'] or $atts['padding'] or $atts['radius'] or $atts['border'] or $atts['background']) { $margin = $atts['margin'] ? 'margin: ' . $atts['margin'] . ';' : ''; $padding = $atts['padding'] ? 'padding: ' . $atts['padding'] . ';' : ''; $radius = $atts['radius'] ? 'border-radius: ' . $atts['radius'] . ';' : ''; $border = $atts['border'] ? 'border: ' . $atts['border'] . ';' : ''; $background = $atts['background'] ? 'background-color: ' . $atts['background'] . ';' : ''; $css .= '#' . $id . ' {' . $margin . $padding . $radius . $border . $background . '}'; } $count_color = $atts['count_color'] ? 'color: ' . $atts['count_color'] . ';' : ''; $css .= '#' . $id . ' .yt-cd-timer > span span[class*="text"] { color: ' . $atts['text_color'] . '; font-size: ' . $atts['text_size'] . 'px; } #' . $id . ' .yt-cd-timer span > span { font-size: ' . $atts['count_size'] . 'px; line-height: ' . $atts['count_size'] . 'px; ' . $count_color . '} ' . $divider_style . ' '; $message = ''; $countdown = $atts['count_date']; $countdown .= $atts['count_time'] ? ' ' . $atts['count_time'] : ''; if (isset($content)) { $message = '.on("finish.countdown", function(event) { $(this).parent() .addClass("disabled") .html("' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />", "<p>", "</p>"), " ", $content)) . '"); })'; } $js .= ' jQuery(document).ready(function ($) { $("#' . $id . ' .yt-cd-timer").countdown("' . $countdown . '").on("update.countdown", function(event) { var $this = $(this).html(event.strftime( "<span class=\'yt-cd-day\'><span class=\'yt-cd-day-data\'>%-D</span> <span class=\'yt-cd-day-text\'>DAY</span></span> " + "<span class=\'yt-cd-hour\'><span class=\'yt-cd-hour-data\'>%H</span> <span class=\'yt-cd-hour-text\'>HOUR</span></span> " + "<span class=\'yt-cd-minute\'><span class=\'yt-cd-minute-data\'>%M</span> <span class=\'yt-cd-minute-text\'>MIN</span></span> " + "<span class=\'yt-cd-second\'><span class=\'yt-cd-second-data\'>%S</span> <span class=\'yt-cd-second-text\'>SEC</span></span>")); })' . $message . '; }); '; JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/countdown/css/countdown.css", 'text/css'); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/countdown/js/jquery.countdown.js"); $doc = JFactory::getDocument(); $doc->addStyleDeclaration($css); $doc->addScriptDeclaration($js); return '<div id="' . $id . '" class="yt-countdown-wrapper clearfix yt-countdown-' . $atts['align'] . ' yt-cd-divider-' . $atts['divider'] . ' yt-countdown-text-' . $atts['text_align'] . '"> <div class="yt-countdown-content"> <div class="yt-cd-timer"></div> </div> </div>'; }
public static function include_jquery($extension = '', $framework = false, $relative = true) { if (version_compare(JVERSION, '3.0.0', '>=')) { JHtmlJquery::framework(); } else { $doc = JFactory::getDocument(); if (!isset($doc->jquery_loaded)) { if (JHtml::script('jquery.min.js', $framework, $relative, $pathonly = true)) { JHtml::script('jquery.min.js', $framework, $relative); JHtml::script('jquery.noconflict.js', $framework, $relative); $doc->jquery_loaded = true; return; } else { if (!empty($extension)) { $jquery = $extension . '/jquery.min.js'; $jqueryNC = $extension . '/jquery.noconflict.js'; // should be locate as jquery.min.js if (JHtml::script($jquery, $framework, $relative, $pathonly = true)) { JHtml::script($jquery, $framework, $relative); JHtml::script($jqueryNC, $framework, $relative); $doc->jquery_loaded = true; } } } } } }
protected function getInput() { $this->params = $this->element->attributes(); JHtml::_('jquery.framework'); JHtml::script('nnframework/script.min.js', false, true); $file = $this->def('file'); if (!$file) { $path = $this->def('path') == 'site' ? '' : '/administrator'; $label = $this->def('label'); $file = $this->def('alias', $label); $file = preg_replace('#[^a-z-]#', '', strtolower($file)); $extension = $this->def('extension'); switch ($extension) { case 'com': $file = $path . '/components/com_' . $file . '/com_' . $file . '.xml'; break; case 'mod': $file = $path . '/modules/mod_' . $file . '/mod_' . $file . '.xml'; break; case 'plg_editors-xtd': $file = '/plugins/editors-xtd/' . $file . '.xml'; break; default: $file = '/plugins/system/' . $file . '.xml'; break; } $label = JText::_($label) . ' (' . JText::_('NN_' . strtoupper($extension)) . ')'; } else { $label = $this->def('label', 'the main extension'); } nnFieldDependency::setMessage($file, $label); return ''; }
/** * Displays the comments area * * @param string $context The context of the content being passed to the plugin * @param object &$row The article object * @param object &$params The article params * @param integer $page The 'page' number * * @return mixed html string containing code for the comment if in com_content.article else boolean false * */ public function onContentAfterDisplay($context, &$row, &$params, $page = 0) { $parts = explode(".", $context); $plgCatid = $this->params->def('catid'); // Check is run com_content if ($parts[0] != 'com_content') { return false; } // Check category of the plugin in the allowable category array of the plugin if ($plgCatid[0] != 'all' && !in_array($row->catid, $plgCatid)) { return false; } // Add media file JHtml::_('jquery.framework'); JHtml::script(JUri::base() . 'media/pkg_mjcommentsystem/plg_content_mjformcomment/js/plg_mjformcomment.js', false, true); JHtml::stylesheet(JUri::base() . 'media/pkg_mjcommentsystem/plg_content_mjformcomment/css/plg_mjformcomment.css', false, true, false); // Add the language file of the component $lang = JFactory::getLanguage(); $basePath = JPATH_SITE . '/components/com_mjcomments'; $lang->load('com_mjcomments', $basePath, null, true); // Assign value to the layout variables $content_id = $row->id; $formReturn = 'index.php?option=com_mjcomments&task=comment.send&format=json'; // Get the comment form $this->setCommentForm(); // Get the comment list $this->setCommentList($content_id); // Name of the variables that will be used in the layout $data = array('view' => $context, 'form' => $this->form, 'formReturn' => $formReturn, 'content_id' => $content_id, 'comments' => $this->comments); return JLayoutHelper::render('default', compact('data'), __DIR__ . '/layouts'); }
/** * Method to display the view. * * @param string $tpl A template file to load. [optional] * * @return void * * @since 2.5 */ public function display($tpl = null) { JHtml::_('behavior.framework'); JHtml::stylesheet('com_finder/indexer.css', false, true, false); JHtml::script('com_finder/indexer.js', false, true); parent::display(); }
function fancy_textYTShortcode($atts, $content = null) { $atts = ytshortcode_atts(array('type' => '1', 'tags' => 'Hello, Text', 'class' => '', 'color' => '', 'size' => ''), $atts, 'fancy_text'); // Inistial Variables $id = uniqid("ytft_") . rand() . time(); $tags = array(); $tag = ''; // class manage $classes = array('yt-fancy-text', 'yt-fteffect' . $atts['type'], trim($atts['class'])); // Fancy Text interchangeable tag spliting if ($atts['tags']) { $tags = explode(',', $atts['tags']); foreach ($tags as $word) { $tag .= '<b>' . $word . '</b>'; } $tag = str_replace('<b>' . $tags['0'] . '</b>', '<b class="is-visible">' . $tags['0'] . '</b>', $tag); } // Manage class for different type of Fancy Text if ($atts['type'] == 1 or $atts['type'] == 2 or $atts['type'] == 4 or $atts['type'] == 5) { $classes[] = 'yt-ft-letters'; } // Add css file in head JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/fancy_text/css/fancy_text.css", 'text/css', "screen"); // Add javascript file in head JHtml::_('jquery.framework'); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/fancy_text/js/fancy_text.js"); // HTML Ourput $return = "\r\n <span id='" . $id . "' class='" . yt_acssc($classes) . "' style='color:" . $atts['color'] . "; font-size:" . $atts['size'] . "px;'>\r\n <span class='yt-ft-wrap'>\r\n " . $tag . "\r\n </span>\r\n </span>"; return $return; }
function galleryYTShortcode($atts, $content = null) { global $gwidth, $gheight, $gcolumns, $galleryArray, $cation_gallery, $border_gallery, $padding_item, $id_uniq, $hover_gallery; $gwidth = 100; $gheight = 100; JHtml::script(JUri::base() . "plugins/system/ytshortcodes/assets/js/jquery.prettyPhoto.js"); JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/gallery/css/gallery.css"); extract(ytshortcode_atts(array("title" => '', "width" => 100, "height" => 100, "columns" => 3, "align" => 'center', "caption" => '0', "border" => '0px solid #4e9e41', "border_size" => '0px', "border_color" => '#4e9e41', "border_style" => 'solid', "padding" => '0px', "hover" => '1'), $atts)); //$border_gallery = ($border_size =='0px') ? '' : "border:".$border_size." ".$border_style." #4e9e41;"; $border_gallery = "border: " . $border . ""; switch ($caption) { case '1': $cation_gallery = 'caption_gallery_1'; break; case '2': $cation_gallery = 'caption_gallery_2'; break; default: $cation_gallery = ''; break; } $hover_gallery = $hover; $padding_item = $padding == '0px' ? '' : "padding:" . $padding . ""; $id_uniq = uniqid("yt") . rand() . time(); $gwidth = $width; $gheight = $height; $gcolumns = $columns; $gallery = ''; $galleryArray = array(); parse_shortcode($content); $tags = array(); $tags = ''; foreach ($galleryArray as $key => $item) { $tags .= ',' . strtolower($item['tag']); } $tags = ltrim($tags, ','); $tags = explode(',', $tags); $newtags = array(); foreach ($tags as $tag) { $newtags[] = trim($tag); } $tags = array_values(array_unique($newtags)); if ($align != '') { $align = 'pull-' . $align; } else { $align = ''; } $gallery .= '<div class="yt-gallery clearfix ' . $align . '" style="margin:0 auto">'; $gallery .= '<div class = "yt-gallery-tabbed" style="display:table; margin-bottom:10px;">'; $gallery .= '<ul class="tabnav">'; $gallery .= '<li class="showall active ' . $id_uniq . '"><span >Show all</span></li>'; foreach ($tags as $tag) { $gallery .= '<li id=' . trim($tag) . $id_uniq . ' class="' . $id_uniq . '"><span>' . ucfirst(trim($tag)) . '</span></li>'; } $gallery .= '</ul>'; $gallery .= '</div>'; $gallery .= '<ul class="gallery-list clearfix">' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />", "<p>", "</p>"), " ", $content)) . '</ul>'; $gallery .= '</div>'; return $gallery; }
/** * Method to get a list of options for a list input. * * @return array An array of JHtml options. */ protected function _getInput() { $db =& JFactory::getDBO(); $doc =& JFactory::getDocument(); // Load the javascript and css JHtml::_('behavior.framework'); JHtml::script('modal.js'); JHtml::stylesheet('modal.css'); // Attach modal behavior to document $document = JFactory::getDocument(); $document->addScriptDeclaration("\r\n\t\twindow.addEvent('domready', function() {\r\n\t\t\tvar div = new Element('div').setStyle('display', 'none').injectBefore(document.id('menu-types'));\r\n\t\t\tdocument.id('menu-types').injectInside(div);\r\n\t\t\tSqueezeBox.initialize();\r\n\t\t\tSqueezeBox.assign(\$\$('input.modal'), {\r\n\t\t\t\tparse: 'rel'\r\n\t\t\t});\r\n\t\t});"); // Get the title of the linked chart $db->setQuery('SELECT name' . ' FROM #__contact_details' . ' WHERE id = ' . (int) $this->value); $title = $db->loadResult(); if ($error = $db->getErrorMsg()) { JError::raiseWarning(500, $error); } if (empty($title)) { $title = JText::_('Contact_Select_a_Contact'); } $doc->addScriptDeclaration("function jSelectChart_" . $this->inputId . "(id, name, object) {\r\n\t\t\tdocument.id('" . $this->inputId . "_id').value = id;\r\n\t\t\tdocument.id('" . $this->inputId . "_name').value = name;\r\n\t\t\tSqueezeBox.close();\r\n\t\t}"); $link = 'index.php?option=com_contact&view=contacts&layout=modal&tmpl=component&function=jSelectChart_' . $this->inputId; JHTML::_('behavior.modal', 'a.modal'); $html = "\n" . '<div class="fltlft"><input type="text" id="' . $this->inputId . '_name" value="' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . '" disabled="disabled" /></div>'; $html .= '<div class="button2-left"><div class="blank"><a class="modal" title="' . JText::_('Contact_Change_Contact') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('Contact_Change_Contact_button') . '</a></div></div>' . "\n"; $html .= "\n" . '<input type="hidden" id="' . $this->inputId . '_id" name="' . $this->inputName . '" value="' . (int) $this->value . '" />'; return $html; }
function render(&$params) { jimport('joomla.filesystem.file'); // Load plugin language require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; nnFrameworkFunctions::loadLanguage('plg_system_nnframework'); nnFrameworkFunctions::loadLanguage('plg_editors-xtd_sourcerer'); nnFrameworkFunctions::loadLanguage('plg_system_sourcerer'); $language = 'en'; $locales = JFactory::getLanguage()->getLocale(); foreach ($locales as $locale) { if (JFile::exists(JPATH_PLUGINS . '/editors-xtd/sourcerer/editarea/langs/' . $locale . '.js')) { $language = $locale; break; } } // Add scripts and styles JHtml::_('behavior.mootools'); JFactory::getDocument()->addScript(JURI::root(true) . '/plugins/editors-xtd/sourcerer/editarea/edit_area_full.js'); JHtml::script('sourcerer/script.min.js', false, true); $script = "\n\t\t\teditAreaLoader.init({\n\t\t\t\tid: 'source',\t// id of the textarea to transform\n\t\t\t\tstart_highlight: true,\t// if start with highlight\n\t\t\t\tallow_resize: 'y',\n\t\t\t\tallow_toggle: false,\n\t\t\t\tword_wrap: true,\n\t\t\t\tlanguage: '" . $language . "',\n\t\t\t\tsyntax: 'php',\n\t\t\t\ttoolbar: 'fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, highlight, reset_highlight, word_wrap',\n\t\t\t\tsyntax_selection_allow: 'css,html,js,php'\n\t\t\t});\n\n\t\t\tvar sourcerer_syntax_word = '" . $params->syntax_word . "';\n\t\t\tvar sourcerer_editorname = '" . JFactory::getApplication()->input->getString('name', 'text') . "';\n\t\t\tvar sourcerer_default_addsourcetags = " . (int) $params->addsourcetags . ";\n\t\t\tvar sourcerer_root = '" . JURI::root(true) . "';\n\n\t\t\twindow.addEvent( 'domready', function() { sourcerer_init(); });\n\t\t"; JFactory::getDocument()->addScriptDeclaration($script); JHtml::stylesheet('nnframework/style.min.css', false, true); JHtml::stylesheet('nnframework/popup.min.css', false, true); JHtml::stylesheet('sourcerer/popup.min.css', false, true); $params->code = '<!-- You can place html anywhere within the source tags --><br /><br /><br /><script language="javascript" type="text/javascript"><br /> // You can place JavaScript like this<br /> <br /></script><br /><?php<br /> // You can place PHP like this<br /> <br />?>'; $params->code = str_replace('<br />', "\n", $params->code); echo $this->getHTML($params); }
function masonryYTShortcode($atts = null, $content = null) { $atts = ytshortcode_atts(array('id_masonry' => '', 'gutter' => null, 'rtl' => 'no'), $atts, 'yt_masonry'); global $intense_masonry_gutter; $intense_masonry_gutter = $atts['gutter']; if (empty($intense_masonry_gutter)) { $intense_masonry_gutter = '0'; } if (empty($id_masonry)) { $id_masonry = rand(); } // intense_add_script( 'packery' ); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/masonry/js/masonry.js"); JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/masonry/css/masonry.css", 'text/css'); $init_script = '<script> function intenseInitMasonry() { var $ = jQuery; var $container = $(".intense.masonry"); $container.packery({ itemSelector: ".item", gutter: 0, isOriginLeft: ' . ($atts['rtl'] == "no" ? 'false' : 'true') . ' }); return $container; } jQuery(function($){ $(window).load(function() { setTimeout(intenseInitMasonry, 250); intenseInitMasonry(); }); });</script>'; return $init_script . '<div id="' . $id_masonry . '" class="intense masonry' . (!empty($class) ? ' ' . $class : '') . '" style="position: relative;">' . parse_shortcode(str_replace(array("<br/>", "<br />"), " ", $content)) . '</div><div class="clearfix"></div>'; }
public function display($tpl = null) { // get model and update context with current $model =& $this->getModel(); $context = $model->setContext($this->_context . '.' . $this->getLayout()); // display type: simple for very large sites/slow slq servers $sefConfig =& Sh404sefFactory::getConfig(); // if set for a slowServer, display simplified version of the url manager $this->assign('slowServer', $sefConfig->slowServer); // read data from model $list =& $model->getList((object) array('layout' => $this->getLayout(), 'simpleUrlList' => $this->slowServer, 'slowServer' => $sefConfig->slowServer)); // and push it into the view for display $this->assign('items', $list); $this->assign('itemCount', count($this->items)); $this->assign('pagination', $model->getPagination((object) array('layout' => $this->getLayout(), 'simpleUrlList' => $this->slowServer, 'slowServer' => $sefConfig->slowServer))); $options = $model->getDisplayOptions(); $this->assign('options', $options); $this->assign('optionsSelect', $this->_makeOptionsSelect($options)); // add behaviors and styles as needed $modalSelector = 'a.modalediturl'; $js = '\\function(){window.parent.shAlreadySqueezed = false;if(window.parent.shReloadModal) {parent.window.location=\'' . $this->defaultRedirectUrl . '\';window.parent.shReloadModal=true}}'; $params = array('overlayOpacity' => 0, 'classWindow' => 'sh404sef-popup', 'classOverlay' => 'sh404sef-popup', 'onClose' => $js); Sh404sefHelperHtml::modal($modalSelector, $params); // build the toolbar $toolbarMethod = '_makeToolbar' . ucfirst($this->getLayout()); if (is_callable(array($this, $toolbarMethod))) { $this->{$toolbarMethod}($params); } // add our own css JHtml::styleSheet('urls.css', Sh404sefHelperGeneral::getComponentUrl() . '/assets/css/'); // link to custom javascript JHtml::script('list.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // now display normally parent::display($tpl); }
function sectionYTShortcode($atts = null, $content = null) { $atts = ytshortcode_atts(array('background' => '#ffffff', 'image' => '', 'repeat' => 'repeat', 'parallax' => 'yes', 'speed' => '10', 'max_width' => '960', 'margin' => '0px 0px 0px 0px', 'padding' => '30px 0px 30px 0px', 'border' => 'none', 'color' => '#333333', 'text_align' => 'inharit', 'text_shadow' => 'none', 'url_youtube' => '', 'url_webm' => '', 'url_vimeo' => '', 'font_size' => '12px', 'class' => ''), $atts, 'section'); $id_section = uniqid('sec_') . rand() . time(); $id_video = uniqid('svb_sec_') . rand() . time(); $background = $atts['image'] ? sprintf('%s %s url(\'%s\') repeat %s', $atts['background'], '50% 0', yt_image_media($atts['image']), $atts['parallax'] === 'yes' ? 'fixed' : 'scroll') : $atts['background']; if ($atts['image'] && $atts['parallax'] === 'yes') { $atts['class'] .= ' yt-section-parallax'; } if ($atts['url_youtube']) { $atts['class'] .= ' yt-panel-clickable'; } JHtml::_('jquery.framework'); if ($atts['image'] && $atts['parallax'] === 'yes' or $atts['url_youtube']) { JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/section.js"); } JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/modernizr.video.js"); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/swfobject.js"); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/js/video_background.js"); JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/section/css/section.css", 'text/css'); $atts['text_align'] = $atts['text_align'] != 'inherit' ? 'text-align:' . $atts['text_align'] . ';' : ''; $atts['text_shadow'] = $atts['text_shadow'] ? ' -webkit-text-shadow:' . $atts['text_shadow'] . ';-moz-text-shadow:' . $atts['text_shadow'] . ';text-shadow:' . $atts['text_shadow'] . ';' : ''; if ($atts['url_youtube'] != '') { return '<div class="yt-section-forcefullwidth"><div id="' . $id_section . '" class="yt-section-wrapper" data-id="' . $id_section . '"><div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div><div class="yt-section-overlay"></div><div class="yt-section-video" id="' . $id_video . '" data-id="' . $id_video . '" data-loop="true" data-muted="true" data-autoplay="true" data-ratio="1.77" data-overlay="" data-swfpath="" data-youtube="' . $atts['url_youtube'] . '"><div id="video_background_video_1" style="z-index: 0; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; overflow: hidden;"></div></div></div></div></div>'; } else { if ($atts['url_webm'] != '') { return '<div class="yt-section-forcefullwidth"><div id="' . $id_section . '" class="yt-section-wrapper" data-id="' . $id_section . '"><div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />"), " ", $content)) . '</div><div class="yt-section-overlay"></div><div class="yt-section-video" id="' . $id_video . '" data-id="' . $id_video . '" data-loop="true" data-muted="true" data-autoplay="true" data-ratio="1.77" data-overlay="" data-swfpath="" data-webm="' . $atts['url_webm'] . '"><div id="video_background_video_1" style="z-index: 0; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; overflow: hidden;"><video autoplay="" loop="" onended="this.play()"><source src="' . $atts['url_webm'] . '" type="video/webm"></video></div></div></div></div></div>'; } else { return '<div class="yt-section ' . trim($atts['class']) . ' " data-speed="' . $atts['speed'] . '" style="background:' . $background . ';margin:' . $atts['margin'] . ';padding:' . $atts['padding'] . ';border-top:' . $atts['border'] . ';border-bottom:' . $atts['border'] . '"><div class="yt-section-content yt-content-wrap" style="max-width:' . $atts['max_width'] . 'px; ' . $atts['text_align'] . ' color:' . $atts['color'] . ';' . $atts['text_shadow'] . ' font-size:' . $atts['font_size'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div></div>'; } } }
public function display($tpl = null) { // if redirecting to another page, we need to simply send some javascript // to : a / close the popup, b / redirect the parent page to where we // want to go if (!empty($this->redirectTo)) { $js = 'window.addEvent( \'domready\', function () { setTimeout( \'shRedirectTo()\', 2000); }); function shRedirectTo() { parent.window.location="' . $this->redirectTo . '"; window.parent.SqueezeBox.close(); } '; $document =& JFactory::getDocument(); $document->addScriptDeclaration($js); // insert needed css files $this->_addCss(); } else { // get action $this->task = empty($this->task) ? 'delete' : $this->task; // build the toolbar $toolBar = $this->_makeToolbar(); $this->assignRef('toolbar', $toolBar); // add confirmation phrase to toolbar $this->assign('toolbarTitle', '<div class="headerconfirm" >' . JText::_('COM_SH404SEF_CONFIRM_TITLE') . '</div>'); // insert needed css files $this->_addCss(); // link to custom javascript JHtml::script('edit.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); } // now display normally parent::display($tpl); }
public function display($tpl = null) { // get model and update context with current $model =& $this->getModel(); $context = $model->updateContext($this->_context . '.' . $this->getLayout()); // read data from model $list =& $model->getList((object) array('layout' => $this->getLayout(), 'simpleUrlList' => true)); // and push it into the view for display $this->assign('items', $list); $this->assign('itemCount', count($this->items)); $this->assign('pagination', $model->getPagination()); $options = $model->getDisplayOptions(); $this->assign('options', $options); $this->assign('optionsSelect', $this->_makeOptionsSelect($options)); $this->assign('mainUrl', $model->getMainUrl()); // build the toolbar $toolBar = $this->_makeToolbar(); // add confirmation phrase to toolbar $this->assign('toolbarTitle', Sh404sefHelperGeneral::makeToolbarTitle(JText16::_('COM_SH404SEF_DUPLICATE_MANAGER'), $icon = 'sh404sef', $class = 'sh404sef-toolbar-title')); // insert needed css files $this->_addCss(); // link to custom javascript JHtml::script('list.js', Sh404sefHelperGeneral::getComponentUrl() . '/assets/js/'); // now display normally parent::display($tpl); }
function frameYTShortcode($atts = null, $content = null) { $atts = ytshortcode_atts(array('style' => 'default', 'align' => 'left', 'class' => ''), $atts, 'yt_frame'); JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/shortcodes/frame/css/frame.css", 'text/css'); JHtml::script("plugins/system/ytshortcodes/shortcodes/frame/js/frame.js"); return '<span class="yt-frame yt-frame-align-' . $atts['align'] . ' yt-frame-style-' . $atts['style'] . '"><span class="yt-frame-inner">' . parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)) . '</span></span><div class="clear clearfix"></div>'; }
function animationYTShortcode($atts, $content = null) { $atts = ytshortcode_atts(array('type' => 'bounceIn', 'duration' => 1, 'delay' => 0, 'inline_block' => 'no', 'class' => ''), $atts, 'animation'); $id = uniqid('yta') . rand() . time(); $inline = $atts['inline_block'] === 'yes' ? ' display: inline-block;' : ''; $style = array('duration' => array(), 'delay' => array()); // CSS Prefix manage foreach (array('-webkit-', '-moz-', '-ms-', '-o-', '') as $vendor) { $style['duration'][] = $vendor . 'animation-duration:' . $atts['duration'] . 's'; $style['delay'][] = $vendor . 'animation-delay:' . $atts['delay'] . 's'; } // Get Css in $css variable $css = '#' . $id . ' {visibility:hidden;' . $inline . implode(';', $style['duration']) . ';' . implode(';', $style['delay']) . '}'; // Add CSS in head $doc = JFactory::getDocument(); $doc->addStyleDeclaration($css); // Add CSS file in head JHtml::stylesheet(JUri::base() . "plugins/system/ytshortcodes/assets/css/animate.css"); JHtml::_('jquery.framework'); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/assets/js/jquery.appear.js"); JHtml::script(JUri::base() . "plugins/system/ytshortcodes/shortcodes/animation/js/animate.js"); // Output HTML $output = '<div id="' . $id . '" class="yt-clearfix yt-animate " data-animation="' . $atts['type'] . '">' . parse_shortcode(str_replace(array("<br/>", "<br />", "<p></p>"), " ", $content)) . '</div>'; return $output; }
/** * Display the view */ function display() { //DEVNOTE: set document title $document =& JFactory::getDocument(); $document->setTitle(JText::_('NEW_DABATASE_CONNECTION')); JHtml::script('dbConfigForm.js', 'media/com_dbconnect/js/'); JHtml::stylesheet('izi.css', 'media/com_dbconnect/css/'); if (@$this->pdoError != '') { //máme chybu $this->setLayout('error'); $this->assignRef('error', $this->pdoError); } else { if ($_POST['step'] == 2 && isset($_POST['db_table'])) { //máme vybranou tabulku, musíme vybrat primární klíč $this->setLayout('selectprimarykey'); $unidbModel = $this->getModel('unidb', 'unidbModel'); $this->assignRef('columns', $unidbModel->getColumns($_POST['db_table'])); } elseif ($_POST['step'] == 1 && isset($_POST['db_username']) && isset($_POST['db_password'])) { //máme nastavené připojení k DB, musíme vybrat tabulku $this->setLayout('selecttable'); $unidbModel = $this->getModel('unidb', 'unidbModel'); $this->assignRef('tables', $unidbModel->getTables()); } else { //musíme vybrat nastavení serveru atp. $this->setLayout('setdatabase'); $this->assignRef('dbTypes', $this->get('DBTypes')); } } parent::display(); }
function writeJS() { JHTML::_('behavior.modal'); JHtml::script(JURI::root().'components/com_bids/js/jquery/jquery.js'); JHtml::script(JURI::root().'components/com_bids/js/jquery/jquery.noconflict.js'); JHtml::script( JURI::root().'components/'.APP_EXTENSION.'/gallery/js/jquery.jcarousel.js' ); JHtml::stylesheet( JURI::root().'components/'.APP_EXTENSION.'/gallery/js/jquery.jcarousel.css'); JHtml::stylesheet( JURI::root().'components/'.APP_EXTENSION.'/gallery/js/skin.css' ); $doc = JFactory::getDocument(); $doc->addStyleDeclaration( ".jcarousel-skin-tango.jcarousel-container-horizontal { width: ".$this->medium_width."px; padding: 20px 40px; } .jcarousel-skin-tango .jcarousel-clip-horizontal { width: ".$this->medium_width."px; height: ".$this->medium_height."px; } .jcarousel-skin-tango .jcarousel-item { width: ".$this->medium_width."px; height: ".$this->medium_height."px; }" ); }