Commit 5783d3a1 by Antonio Ramirez

Merge remote-tracking branch 'upstream/master' into 331-bootstrap-carousel

* upstream/master: A little yii\bootstrap classes refactoring
parents b5ad49ed 4e347d70
...@@ -77,7 +77,6 @@ class Alert extends Widget ...@@ -77,7 +77,6 @@ class Alert extends Widget
{ {
parent::init(); parent::init();
$this->getView()->registerAssetBundle('yii/bootstrap/alert');
$this->initOptions(); $this->initOptions();
echo Html::beginTag('div', $this->options) . "\n"; echo Html::beginTag('div', $this->options) . "\n";
......
...@@ -102,7 +102,6 @@ class Modal extends Widget ...@@ -102,7 +102,6 @@ class Modal extends Widget
{ {
parent::init(); parent::init();
$this->getView()->registerAssetBundle('yii/bootstrap/modal');
$this->initOptions(); $this->initOptions();
echo $this->renderToggleButton() . "\n"; echo $this->renderToggleButton() . "\n";
......
...@@ -68,7 +68,6 @@ class TypeAhead extends Widget ...@@ -68,7 +68,6 @@ class TypeAhead extends Widget
*/ */
public function run() public function run()
{ {
$this->getView()->registerAssetBundle('yii/bootstrap/typeahead');
echo $this->renderField(); echo $this->renderField();
$this->registerPlugin('typeahead'); $this->registerPlugin('typeahead');
} }
......
...@@ -67,6 +67,7 @@ class Widget extends \yii\base\Widget ...@@ -67,6 +67,7 @@ class Widget extends \yii\base\Widget
$id = $this->options['id']; $id = $this->options['id'];
$view = $this->getView(); $view = $this->getView();
$view->registerAssetBundle(static::$responsive ? 'yii/bootstrap/responsive' : 'yii/bootstrap'); $view->registerAssetBundle(static::$responsive ? 'yii/bootstrap/responsive' : 'yii/bootstrap');
$view->registerAssetBundle("yii/bootstrap/$name");
if ($this->pluginOptions !== false) { if ($this->pluginOptions !== false) {
$options = empty($this->pluginOptions) ? '' : Json::encode($this->pluginOptions); $options = empty($this->pluginOptions) ? '' : Json::encode($this->pluginOptions);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment