0

Im new to this, I have downloaded Yii-Booster Widgets for use of TBRelationalColumn.

I have downloaded the extensions from yiibooster.clevertech.biz yiibooster-4.0.1.zip file and extracted under

protected/extensions/booster

Configuration protected/config/local.php and 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',
            ),
        ),
    );

When Im using this widget im getting the grid structure but js is Not Enable 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);
}'
            ),                        
            )
    ));

When Click on Grid i cannt get the Alert Message. Please anyone help me to resolve this problem

lin
  • 17,956
  • 4
  • 59
  • 83
Silviaa
  • 475
  • 8
  • 35

1 Answers1

0

You are not loading it. If you are using boostrap across all pages, preload it from the config,

return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'My Site',

    'preload'=>array(
        'log',
        'bootstrap', //preload bootsrtap
        ),

Else, you can add it separately for each controller using filter

public function filters()
    {
        return array(
            'accessControl', 
            array('ext.booster.filters.BootstrapFilter') //load bootstrap
        );
redGREENblue
  • 3,076
  • 8
  • 39
  • 57