예제 #1
0
 /**
  * Loads the backend template JS and css
  *
  * @param   bool  $js          - Load JS
  * @param   bool  $ctemplate   - Load boostrap backend template
  * @param   bool  $thirdparty  - Load third party js for template
  * @param   bool  $minifyJs    - Minify js
  * @param   bool  $minifyCss   - Minify css
  *
  * @return void
  */
 public static function lanceng($js = true, $ctemplate = true, $thirdparty = true, $key = 'lanceng')
 {
     self::bootstrap(true);
     if ($js) {
         // Load compojoom js
         CompojoomHtml::addScriptsToQueue($key, 'media/lib_compojoom/js/jquery.cjoom.js');
         // Load third party scripts and css? (Required for Template)
         if ($thirdparty) {
             // Font Awesome
             CompojoomHtml::addCSSToQueue($key, 'media/lib_compojoom/third/font-awesome/css/font-awesome.min.css');
             // Popups (more..) but nice ones -> responsive, http://dimsemenov.com/plugins/magnific-popup/
             CompojoomHtml::addCSSToQueue($key, 'media/lib_compojoom/third/magnific-popup/magnific-popup.css');
             // Datepicker for Bootstrap by Stefan Petre, http://www.eyecon.ro/bootstrap-datepicker/
             CompojoomHtml::addCSSToQueue($key, 'media/lib_compojoom/third/datepicker/css/datepicker.css');
             // Load 3rd Party scripts for Laceng
             CompojoomHtml::addScriptsToQueue($key, 'media/lib_compojoom/third/slimscroll/jquery.slimscroll.min.js');
             CompojoomHtml::addScriptsToQueue($key, 'media/lib_compojoom/third/magnific-popup/jquery.magnific-popup.min.js');
             CompojoomHtml::addScriptsToQueue($key, 'media/lib_compojoom/third/input/bootstrap.file-input.js');
             CompojoomHtml::addScriptsToQueue($key, 'media/lib_compojoom/third/datepicker/js/bootstrap-datepicker.js');
             JHTML::_('script', 'https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js');
             JHTML::_('script', 'https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js');
         }
         // Load backend template
         if ($ctemplate) {
             CompojoomHtml::addCSSToQueue($key, 'media/lib_compojoom/css/animate.css');
             CompojoomHtml::addCSSToQueue($key, 'media/lib_compojoom/css/compojoom-backend-style.css');
             CompojoomHtml::addCSSToQueue($key, 'media/lib_compojoom/css/compojoom-backend-style-responsive.css');
             CompojoomHtml::addScriptsToQueue($key, 'media/lib_compojoom/js/lanceng.js');
         }
     }
     if ($key == "lanceng") {
         // Minify css & js (All items should be in que right now)
         CompojoomHtml::external(CompojoomHtml::getScriptQueue('lanceng'), CompojoomHtml::getCSSQueue('lanceng'), 'media/lib_compojoom/cache', true, false);
     }
 }
예제 #2
0
 /**
  * Execute and display the Template.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void    Outputs directly
  *
  * @see     JViewLegacy::loadTemplate()
  * @since   5.0.0
  */
 public function display($tpl = null)
 {
     $tmpl = JFactory::getApplication()->input->getCmd('tmpl');
     // @todo improve and move
     if ($tmpl == 'component') {
         $result = $this->loadTemplate($tpl);
         if ($result instanceof Exception) {
             return $result;
         }
         echo $result;
         echo $this->copyright;
     } else {
         JHtml::_('formbehavior.chosen', 'select');
         echo CompojoomHtmlCtemplate::getHead($this->cMenu, $this->cMenuEntry, $this->cTitle, $this->cSlogan);
         $result = $this->loadTemplate($tpl);
         if ($result instanceof Exception) {
             return $result;
         }
         echo '<div id="cextension_holder">';
         // Content from the template
         echo $result;
         // Copyright
         echo CompojoomHtmlCtemplate::getFooter($this->copyright);
         echo '</div>';
     }
     // Minify css & js
     CompojoomHtml::external(CompojoomHtml::getScriptQueue($this->extension), CompojoomHtml::getCSSQueue($this->extension), 'media/com_' . $this->extension . '/cache', $this->minify, $this->minify);
 }