Commit 4e347d70 by Qiang Xue

Merge pull request #348 from creocoder/bootstrap-fixes

A little yii\bootstrap\* classes refactoring
parents a954312a 5743d482
......@@ -77,7 +77,6 @@ class Alert extends Widget
{
parent::init();
$this->getView()->registerAssetBundle('yii/bootstrap/alert');
$this->initOptions();
echo Html::beginTag('div', $this->options) . "\n";
......
......@@ -102,7 +102,6 @@ class Modal extends Widget
{
parent::init();
$this->getView()->registerAssetBundle('yii/bootstrap/modal');
$this->initOptions();
echo $this->renderToggleButton() . "\n";
......
......@@ -68,7 +68,6 @@ class TypeAhead extends Widget
*/
public function run()
{
$this->getView()->registerAssetBundle('yii/bootstrap/typeahead');
echo $this->renderField();
$this->registerPlugin('typeahead');
}
......
......@@ -67,6 +67,7 @@ class Widget extends \yii\base\Widget
$id = $this->options['id'];
$view = $this->getView();
$view->registerAssetBundle(static::$responsive ? 'yii/bootstrap/responsive' : 'yii/bootstrap');
$view->registerAssetBundle("yii/bootstrap/$name");
if ($this->pluginOptions !== false) {
$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