Browse Source

Bundle names fixes, base widget fixes, other widgets fixes

tags/2.0.0-beta
Alexander Kochetov 12 years ago
parent
commit
b1460fe558
  1. 1
      yii/bootstrap/Alert.php
  2. 1
      yii/bootstrap/Modal.php
  3. 1
      yii/bootstrap/TypeAhead.php
  4. 11
      yii/bootstrap/Widget.php
  5. 39
      yii/bootstrap/assets.php
  6. 2280
      yii/bootstrap/assets/js/bootstrap.js
  7. 6
      yii/bootstrap/assets/js/bootstrap.min.js

1
yii/bootstrap/Alert.php

@ -77,6 +77,7 @@ class Alert extends Widget
{
parent::init();
$this->getView()->registerAssetBundle('yii/bootstrap/alert');
$this->initOptions();
echo Html::beginTag('div', $this->options) . "\n";

1
yii/bootstrap/Modal.php

@ -102,6 +102,7 @@ class Modal extends Widget
{
parent::init();
$this->getView()->registerAssetBundle('yii/bootstrap/modal');
$this->initOptions();
echo $this->renderToggleButton() . "\n";

1
yii/bootstrap/TypeAhead.php

@ -68,6 +68,7 @@ class TypeAhead extends Widget
*/
public function run()
{
$this->getView()->registerAssetBundle('yii/bootstrap/typeahead');
echo $this->renderField();
$this->registerPlugin('typeahead');
}

11
yii/bootstrap/Widget.php

@ -25,7 +25,10 @@ class Widget extends \yii\base\Widget
* @var boolean whether to use the responsive version of Bootstrap.
*/
public static $responsive = true;
/**
* @var boolean whether to use the transition effects.
*/
public static $transition = true;
/**
* @var array the HTML attributes for the widget container tag.
*/
@ -67,9 +70,11 @@ class Widget extends \yii\base\Widget
{
$id = $this->options['id'];
$view = $this->getView();
$view->registerAssetBundle(static::$responsive ? 'yii/bootstrap/responsive' : 'yii/bootstrap');
$bundle = static::$responsive ? 'yii/bootstrap-responsive' : 'yii/bootstrap';
$view->registerAssetBundle($bundle);
if (static::$transition) {
$view->registerAssetBundle('yii/bootstrap/transition');
}
if ($this->pluginOptions !== false) {
$options = empty($this->pluginOptions) ? '' : Json::encode($this->pluginOptions);

39
yii/bootstrap/assets.php

@ -1,115 +1,108 @@
<?php
return array(
'yii/bootstrap/css' => array(
'yii/bootstrap' => array(
'sourcePath' => __DIR__ . '/assets',
'css' => array(
YII_DEBUG ? 'css/bootstrap.css' : 'css/bootstrap.min.css',
),
),
'yii/bootstrap/css-responsive' => array(
'yii/bootstrap/responsive' => array(
'sourcePath' => __DIR__ . '/assets',
'css' => array(
YII_DEBUG ? 'css/bootstrap-responsive.css' : 'css/bootstrap-responsive.min.css',
),
'depends' => array('yii/bootstrap/css'),
),
'yii/bootstrap/all' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
YII_DEBUG ? 'js/bootstrap.js' : 'js/bootstrap.min.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/bootstrap'),
),
'yii/bootstrap/affix' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-affix.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/alert' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-alert.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/button' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-button.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/carousel' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-carousel.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/collapse' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-collapse.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/dropdown' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-dropdown.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/modal' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-modal.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/popover' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-popover.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/tooltip', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap/tooltip', 'yii/bootstrap'),
),
'yii/bootstrap/scrollspy' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-scrollspy.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/tab' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-tab.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/tooltip' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-tooltip.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/transition' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-transition.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
'yii/bootstrap/typeahead' => array(
'sourcePath' => __DIR__ . '/assets',
'js' => array(
'js/bootstrap-typeahead.js',
),
'depends' => array('yii/jquery', 'yii/bootstrap/css'),
'depends' => array('yii/jquery', 'yii/bootstrap'),
),
);

2280
yii/bootstrap/assets/js/bootstrap.js vendored

File diff suppressed because it is too large Load Diff

6
yii/bootstrap/assets/js/bootstrap.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save