我是新手,我已经下载了 Yii-Booster Widgets 以使用 TBRelationalColumn。
我已经从 yiibooster.clevertech.biz yiibooster-4.0.1.zip 文件下载了扩展并在
protected/extensions/booster
配置protected/config/local.php和main.php
<?php
Yii::setPathOfAlias('booster', dirname(__FILE__).'/../extensions/booster');
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
return array(
'components'=>array(
'db' => array(
),
'mongodb' => array(
'class' => 'EMongoDB',
),
'booster'=>array(
'class'=>'booster.components.Booster',
'coreCss' => true,
'responsiveCss' => true,
'yiiCss' => true,
),
'bootstrap'=>array(
'class'=>'bootstrap.components.bootstrap',
'coreCss' => true,
'responsiveCss' => true,
'yiiCss' => true,
),
'cache'=>array(
'class' => 'CFileCache',
),
),
);
当我使用这个小部件时,我得到了网格结构,但 js 没有启用 index.php
$this->widget('booster.widgets.TbExtendedGridView', array(
'id' => 'invite-grid',
'type' => 'striped condensed',
'dataProvider' => $arrayDataProvider,
'columns' => array(
'id',
'username',
'email',
array(
'class' => 'booster.widgets.TbRelationalColumn',
'name' => 'test',
'value' => '"grid"',
'url' => $this->createUrl('site/relational'),
'afterAjaxUpdate' => 'js:function(tr,rowid,data){
bootbox.alert("I have afterAjax events too!<br/>This will only happen once for row with id: "+rowid);
}'
),
)
));
单击网格时,我无法收到警报消息。请任何人帮我解决这个问题