示例#1
0
文件: _base.php 项目: annggeel/tienda
 /**
  * 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);
 }
示例#2
0
 /**
  * Displays a layout file
  *
  * @param unknown_type $tpl
  * @return unknown_type
  */
 function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     //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', 'media/system/js/core.js', false, false);
     JHtml::_('script', 'media/citruscart/js/citruscart.js', false, false);
     //DSC::loadBootstrap();
     DSC::loadJQuery('latest', true, 'citruscartJQ');
     JHtml::_('stylesheet', 'media/citruscart/css/common.css');
     parent::display($tpl);
 }
示例#3
0
文件: _base.php 项目: annggeel/tienda
 /**
  * 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);
 }
示例#4
0
 /**
  * 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)
 {
     $doc = JFactory::getDocument();
     //$doc->addStyleSheet(JUri::root().'media/citruscart/css/citruscart_checkout_onepage.css');
     // these need to load before jquery to prevent joomla from crying
     JHTML::_('behavior.modal');
     $doc->addScript(JUri::root() . 'media/system/js/core.js');
     DSC::loadJQuery('latest', true, 'citruscartJQ');
     /*   if ($this->defines->get('use_bootstrap', '0'))
     	    {
     	    	DSC::loadBootstrap();
     	    } */
     //JHTML::_('stylesheet', 'common.css', 'media/citruscart/css/');
     $doc->addStyleSheet(JUri::root() . 'media/citruscart/css/common.css');
     if ($this->defines->get('include_site_css', '0')) {
         $doc->addStyleSheet(JUri::root() . 'media/citruscart/css/citruscart.css');
         //JHtml::_('stylesheet', 'media/citruscart/css/citruscart.css');
     }
     parent::display($tpl);
 }
示例#5
0
 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'));
     }
 }
示例#6
0
 /**
  *
  * @param string $version
  * @param int $joomla
  * @param unknown_type $responsive
  */
 public static function loadBootstrap($version = 'default', $joomla = true, $responsive = false)
 {
     // short term backwards compatibility.  Update your components
     if (is_int($version) && in_array($version, array(0, 1)) || strlen($joomla) > 1) {
         $org_version = $version;
         $org_joomla = $joomla;
         $version = $org_joomla;
         $joomla = $org_version;
     }
     static $loaded = false;
     if ($loaded) {
         return;
     }
     DSC::loadJQuery();
     $doc = JFactory::getDocument();
     /*  $doc->addStyleSheet(JUri::root().'media/citruscart/bootstrap/'.$version.'/css/bootstrap.min.css');*/
     //$doc->addScript(JUri::root().'media/citruscart/bootstrap/'.$version.'/js/bootstrap.min.js');
     /*
     	    if ($joomla) {
     
     
     	        $doc->addStyleSheet(JUri::root().'media/citruscart/css/joomla.bootstrap.css');
     	    }
     
     	    if ($responsive) {
     	    	$doc->addStyleSheet(JUri::root().'media/citruscart/bootstrap/'.$version.'/css/bootstrap-responsive.min.css');
     	        //JHTML::_( 'stylesheet', 'bootstrap-responsive.min.css', 'media/citruscart/bootstrap/'.$version.'/css/' );
     	    }*/
     $loaded = true;
 }
 /**
  * Search for the tag and replace it with the product view {Citruscartproduct}
  *
  * @param $article
  * @param $params
  * @param $limitstart
  */
 private function doContentPrepare($context, &$row, &$params, $page = 0)
 {
     if (!$this->isInstalled()) {
         return true;
     }
     // simple performance check to determine whether bot should process further
     if (JString::strpos($row->text, 'citruscartproduct') === false) {
         return true;
     }
     // Get plugin info
     $plugin = JPluginHelper::getPlugin('content', 'citruscart_content_product');
     // expression to search for
     $regex = '/{citruscartproduct\\s*.*?}/i';
     $pluginParams = new DSCParameter($plugin->params);
     // check whether plugin has been unpublished
     if (!$pluginParams->get('enabled', 1)) {
         $row->text = preg_replace($regex, '', $row->text);
         return true;
     }
     // find all instances of plugin and put in $matches
     preg_match_all($regex, $row->text, $matches);
     // Number of plugins
     $count = count($matches[0]);
     // plugin only processes if there are any instances of the plugin in the text
     if ($count) {
         DSC::loadJQuery('latest', true, 'citruscartJQ');
         $doc = JFactory::getDocument();
         $uri = JURI::getInstance();
         $js = "var com_citruscart = {};\n";
         $js .= "com_citruscart.jbase = '" . $uri->root() . "';\n";
         $doc->addScriptDeclaration($js);
         foreach ($matches as $match) {
             $this->showProducts($row, $matches, $count, $regex);
         }
     }
 }
示例#8
0
 public static function loadUploadify()
 {
     static $loaded = false;
     if ($loaded) {
         return;
     }
     DSC::loadJQuery('');
     JHTML::_('script', 'jquery.uploadifive.min.js', 'media/citruscart/js/');
     JHTML::_('stylesheet', 'uploadifive.css', 'media/citruscart/css/');
     $loaded = true;
 }