mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Asset feature refactoring (WIP)
This commit is contained in:
@ -65,8 +65,14 @@ 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 (self::$responsive) {
|
||||
ResponsiveAsset::register($view);
|
||||
} else {
|
||||
BootstrapAsset::register($view);
|
||||
}
|
||||
/** @var \yii\web\AssetBundle $assetClass */
|
||||
$assetClass = 'yii\bootstrap\\' . ucfirst($name);
|
||||
$assetClass::register($view);
|
||||
|
||||
if ($this->clientOptions !== false) {
|
||||
$options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);
|
||||
|
Reference in New Issue
Block a user