/** * Displays a layout file * * @param unknown_type $tpl * @return unknown_type */ function display($tpl = null) { //including core JS because it needs to be included in modals and since we have so many including here keeps that from failing. JHTML::_('behavior.modal'); JHTML::_('script', 'core.js', 'media/system/js/'); DSC::loadBootstrap(); DSC::loadJQuery('latest', true, 'tiendaJQ'); JHTML::_('stylesheet', 'common.css', 'media/dioscouri/css/'); parent::display($tpl); }
/** * First displays the submenu, then displays the output * but only if a valid _doTask is set in the view object * * @param $tpl * @return unknown_type */ function display($tpl = null, $perform = true) { // these need to load before jquery to prevent joomla from crying JHTML::_('behavior.modal'); JHTML::_('script', 'core.js', 'media/system/js/'); DSC::loadJQuery('latest', true, 'tiendaJQ'); if ($this->defines->get('use_bootstrap', '0')) { DSC::loadBootstrap(); } JHTML::_('stylesheet', 'common.css', 'media/dioscouri/css/'); if ($this->defines->get('include_site_css', '0')) { JHTML::_('stylesheet', 'tienda.css', 'media/com_tienda/css/'); } parent::display($tpl); }
/** * TODO Push this upstream once tested * * @param unknown_type $url * @param unknown_type $text * @param unknown_type $options */ public static function popupbootstrap($url, $text, $options = array()) { $version = isset($options['version']) ? $options['version'] : 'default'; DSC::loadBootstrap(); JHTML::_('script', 'bootstrap-modal.js', 'media/dioscouri/bootstrap/' . $version . '/js/'); $time = time(); $modal_id = isset($options['modal_id']) ? $options['modal_id'] : 'modal-' . $time; $button_class = isset($options['button_class']) ? $options['button_class'] : 'btn'; $label = 'label-' . $time; $button = '<a href="' . $url . '" data-target="#' . $modal_id . '" role="button" class="' . $button_class . '" data-toggle="modal">' . $text . '</a>'; $modal = ''; $modal .= '<div id="' . $modal_id . '" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="' . $label . '" aria-hidden="true">'; $modal .= ' <div class="modal-header">'; $modal .= ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'; $modal .= ' <h3 id="' . $label . '">' . $text . '</h3>'; $modal .= ' </div>'; $modal .= ' <div class="modal-body">'; $modal .= ' </div>'; $modal .= '</div>'; return $button . $modal; }
function onAfterRoute() { $doc = JFactory::getDocument(); if ($this->params->get('activeAdmin') == 1) { $juri = JFactory::getURI(); if (strpos($juri->getPath(), '/administrator/') !== false) { return; } } if ($value = $this->params->get('embedjquery')) { DSC::loadJQuery('latest', $this->params->get('jquerynoconflict')); } JHTML::_('script', 'colorbox.js', 'media/citruscart/colorbox/'); if ($value = $this->params->get('embedbootstrap')) { DSC::loadBootstrap($this->params->get('bootstrapversion'), $this->params->get('bootstrapjoomla')); } }