CDataGrid actionView in CJuiDialog + grid filters

Hello, i have a BootGridView (extended CGridView) on my page.




$this->widget('bootstrap.widgets.BootGridView', array(

    'id'=>'companys-table',

    'type'=>'striped bordered condensed',

    'filter'=>$model,

    'dataProvider'=>$model->search(),

    'columns'=>array(

        array('name'=>'ID_company'),

        array('name'=>'title'),

        array('name'=>'title_ur'),

        array('name'=>'site'),

        array(

            'class'=>'bootstrap.widgets.BootButtonColumn',

            'buttons'=>array

            (

                'view' => array(

                    'url'=>'Yii::app()->createUrl("company/view", array("id"=>$data->ID_company))',

                    'options'=>array(  

                    'ajax'=>array(

                            'type'=>'POST',

                            'url'=>"js:$(this).attr('href')", 

                            'update'=>'#popup',

                           ),

                     ),

                ),

            ),

            'htmlOptions'=>array('style'=>'width: 50px'),

        ),

    ),

));



I need to show each row detail information in dialog (CJuiDialog), so i modify view button in Grid.

Here is my controller code:




if(Yii::app()->request->isAjaxRequest){

            Yii::app()->clientScript->scriptMap['jquery.js'] = false;

            Yii::app()->clientScript->scriptMap['jquery-ui.min.js'] = false;

            $this->beginWidget('zii.widgets.jui.CJuiDialog',array(

                'options'=>array(

                    'autoOpen'=>'js:true',

                    'closeOnEscape'=>'js:true',

                    'resizable'=>'js:false',

                    'title'=>'',

                    'close'=>'js:function(e,ui){

                        $(this).dialog("destroy").remove();

                    }',

                    'width'=>"auto",

                    'modal'=>'js:true',

                ),

                'htmlOptions'=>array(

                    'style'=>'display:none',

                ),

            ));

            $this->renderPartial('view',array('company'=>$model, 'employers' => $employers), false, true);

            $this->endWidget();

        }

        else{

            $this->render('view',array('company'=>$model, 'employers' => $employers));

        }



The main problem is in this lines:




Yii::app()->clientScript->scriptMap['jquery.js'] = false;

Yii::app()->clientScript->scriptMap['jquery-ui.min.js'] = false;



They are used to prevent downloading jquery library while dialog opens. And it works fine, but when user closes the dialog CGridView filters do not work and raises the error like this:

The error occurs in the library jquery.min.js

I load jquery in main layout:




<?php

            $cs=Yii::app()->clientScript;

            $cs->scriptMap=array(

                    'jquery.js'=>false,

                    'jquery.min.js'=>false,

                    'jquery-ui.js'=>false,

                    'jquery-ui.min.js'=>false,

            );

            echo CGoogleApi::init();

            echo CHtml::script(

                    CGoogleApi::load('jquery','1.7.1') . "\n" .

                    CGoogleApi::load('jqueryui','1.8.16')

            );

        ?>



Any ideas or maybe there is another way to speed up dialogs?

Already solved by replacing lines:




Yii::app()->clientScript->scriptMap['jquery.js'] = false;

Yii::app()->clientScript->scriptMap['jquery-ui.min.js'] = false;



to




Yii::app()->clientScript->scriptMap['*.js'] = false;