当前位置: 首页>>代码示例>>PHP>>正文


PHP JHtmlBootstrap::framework方法代码示例

本文整理汇总了PHP中JHtmlBootstrap::framework方法的典型用法代码示例。如果您正苦于以下问题:PHP JHtmlBootstrap::framework方法的具体用法?PHP JHtmlBootstrap::framework怎么用?PHP JHtmlBootstrap::framework使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JHtmlBootstrap的用法示例。


在下文中一共展示了JHtmlBootstrap::framework方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($context)
 {
     $this->_jtemplate = $context;
     parent::__construct();
     JHtmlBootstrap::loadCss($includeMaincss = true, $this->_jtemplate->direction);
     JHtmlBootstrap::framework();
     $this->_jparams = $this->_jtemplate->params ? $this->_jtemplate->params : JFactory::getApplication()->getTemplate(true)->params;
     $this->_google = new stdClass();
     $this->setShowcase();
     $this->setBackground();
     $this->_mobile = Avatar::isHandleDevice();
     $this->_responsive = $this->_jparams->get('active_responsive') ? $this->_jparams->get('active_responsive') : false;
     $this->_jquery = $this->_jparams->get('load_jquery') ? $this->_jparams->get('load_jquery') : false;
     $this->_optimize = $this->_jparams->get('optimize');
 }
开发者ID:kenyonjohnston,项目名称:hott_theater,代码行数:15,代码来源:template.php

示例2: testFramework

 /**
  * Tests the framework method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testFramework()
 {
     // Initialise the Bootstrap JS framework
     JHtmlBootstrap::framework();
     // Get the document instance
     $document = JFactory::getDocument();
     $this->assertArrayHasKey('/media/jui/js/jquery.min.js', $document->_scripts, 'Verify that Bootstrap initializes jQuery as well');
     $this->assertArrayHasKey('/media/jui/js/bootstrap.min.js', $document->_scripts, 'Verify that Bootstrap initializes Bootstrap');
 }
开发者ID:karimzg,项目名称:joomla,代码行数:16,代码来源:JHtmlBootstrapTest.php

示例3: framework

 /**
  * Method to load the Bootstrap JavaScript framework into the document head
  *
  * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.
  *
  * @param   mixed  $debug  Is debugging mode on? [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function framework($debug = null)
 {
     // Use Joomla version first
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JHtmlBootstrap::framework($debug);
         return;
     }
     // Fall back to JEvents version
     JLoader::register('JevHtmlBootstrap', JEV_PATH . "libraries/bootstrap.php");
     try {
         JevHtmlBootstrap::framework($debug);
         return;
     } catch (Exception $ex) {
     }
     // Finally use library version as last resort
     // Only load once
     if (!empty(static::$loaded[__METHOD__])) {
         return;
     }
     // Load jQuery
     JevHtmlJquery::framework();
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = (bool) $config->get('debug');
     }
     JHtml::_('script', 'libraries/jevents/bootstrap/js/bootstrap.min.js', false, false, false, false, $debug);
     static::$loaded[__METHOD__] = true;
     return;
 }
开发者ID:poorgeek,项目名称:JEvents,代码行数:41,代码来源:bootstrap.php

示例4: defined

<?php

/**
 * @package     Template.Schwaderhof
 *
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
// Add JavaScript Frameworks
JHtmlBootstrap::framework();
// Add Stylesheets
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/template.css');
// Adjusting content width
$left = $this->countModules('position-7');
$right = $this->countModules('position-8');
if ($left && $right) {
    $span = 'span6';
} elseif ($left && !$right || !$left && $right) {
    $span = 'span9';
} else {
    $span = 'span12';
}
?>
<!DOCTYPE html>
<html>
<head>
	<jdoc:include type="head" />
</head>
<body>
开发者ID:Bakual,项目名称:Schwaderhof,代码行数:31,代码来源:index.php

示例5: bootstrap

 /**
  * Method to load the Bootstrap JavaScript & CSS framework into the document head
  *
  * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.
  *
  * @param  boolean  $css    Include CSS.
  * @param  boolean  $debug  Is debugging mode on? [optional]
  *
  * @return  AssetManager  Return self to support chaining.
  */
 public function bootstrap($css = false, $debug = null)
 {
     \JHtmlBootstrap::framework($debug);
     if ($css) {
         \JHtmlBootstrap::loadCss();
     }
     return $this;
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:18,代码来源:AssetManager.php

示例6: framework

 /**
  * Method to load the Bootstrap JavaScript framework into the document head
  *
  * If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.
  *
  * @param   mixed  $debug  Is debugging mode on? [optional]
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function framework($debug = null)
 {
     if (JevJoomlaVersion::isCompatible("3.0")) {
         JHtmlBootstrap::framework($debug);
         return;
     }
     // Only load once
     if (!empty(static::$loaded[__METHOD__])) {
         return;
     }
     // If no debugging value is set, use the configuration setting
     if ($debug === null) {
         $config = JFactory::getConfig();
         $debug = (bool) $config->get('debug');
     }
     /*
     		if(!JHtml::_('script', 'jui/jquery.min.js', false, true, true, false, $debug))
     		{
     			JHtml::_('script', 'libraries/jevents/bootstrap/js/jquery.min.js', false, true, false, false, $debug);
     		}
     		else
     		{
     			JHtml::_('script', 'jui/jquery.min.js', false, true, false, false, $debug);
     		}
     */
     // Make loading this conditional on config option ??
     JFactory::getDocument()->addScript("//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js");
     //JHtml::_('script', 'com_jevents/jquery.min.js', false, true, false, false, $debug);
     // use bootstrap from CDN instead of our copy of it - problem though that target elements disappear when popover appears in Joomla 2.5
     //JFactory::getDocument()->addScript("//maxcdn.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.js");
     JEVHelper::script("bootstrap.js", "com_jevents/", false, true);
     static::$loaded[__METHOD__] = true;
     return;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:45,代码来源:bootstrap.php

示例7: modal

    /**
     * modal
     *
     * @param string $selector
     *
     * @return  void
     */
    public static function modal($selector = '.hasModal')
    {
        $asset = static::getAsset();
        if (!static::inited(__METHOD__)) {
            \JHtmlBootstrap::framework();
            $js = <<<JS
var Windwalker;

// Init modal
jQuery(document).ready(function(\$)
{
\tvar modalBox = \$('<div class="modal fade hide" id="windwalker-iframe-modal"> \\
    <div class="modal-dialog"> \\
        <div class="modal-content"> \\
            <div class="modal-body" style="max-height: 500px;"> \\
                <iframe width="100%" style="min-height: 450px;" src="" frameborder="0"></iframe> \\
            </div> \\
        </div> \\
    </div> \\
</div>');

\t\$('body').append(modalBox);

\tWindwalker = Windwalker || (Windawlekr = {});

\tWindwalker.Modal = {
\t\thide: function() { modalBox.modal('hide') },
\t\ttoggle: function() { modalBox.modal('toggle') },
\t\tshow: function() { modalBox.modal('show') },
\t\thandleUpdate: function() { modalBox.modal('handleUpdate') },
\t};
});
JS;
            $asset->internalJS($js);
        }
        if (!static::inited(__METHOD__, func_get_args())) {
            $js = <<<JS
// Modal task
jQuery(document).ready(function(\$)
{
\t\$('{$selector}').click(function(event)
\t{
\t\tvar link   = \$(this);
\t\tvar modal  = \$('#windwalker-iframe-modal');
\t\tvar href   = link.attr('href');
\t\tvar iframe = modal.find('iframe');

\t\tiframe.attr('src', href);
\t\tmodal.modal('show');
\t\tmodal.on('hide.bs.modal', function() {
\t\t    iframe.attr('src', '');
\t\t})

\t\tevent.stopPropagation();
\t\tevent.preventDefault();
\t});
});
JS;
            $asset->internalJS($js);
        }
    }
开发者ID:Biromain,项目名称:windwalker-joomla-rad,代码行数:68,代码来源:WindwalkerScript.php

示例8: registerScript

 /**
  * registerScript
  *
  * @param \JDocument $template
  *
  * @return  void
  */
 protected static function registerScript(\JDocument $template)
 {
     \JHtmlBootstrap::framework();
 }
开发者ID:lyrasoft,项目名称:lyrasoft.github.io,代码行数:11,代码来源:Template.php


注:本文中的JHtmlBootstrap::framework方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。