public function registerClientScript() { if (!Yii::app()->request->isAjaxRequest) { parent::registerClientScript(); $cs = Yii::app()->clientScript; $basePath = Yii::getPathOfAlias('ext.NPager.assets'); $baseUrl = Yii::app()->getAssetManager()->publish($basePath); $id = parent::getId(); $cs = Yii::app()->clientScript; $cs->registerCoreScript('jquery'); $js = "function {$id}" . "_changePageSize(id,url)\n"; $js .= "{\n"; $js .= " url = {url:url+\$('#'+id+'>.{$this->pagerlistCssClass}>select').val()};\n"; $js .= " \$.fn.yiiListView.update(id,url);\n"; $js .= "}\n"; $js .= "\n"; $cs->registerScript($this->getId(), $js, CClientScript::POS_END); $cs->registerCssFile($baseUrl . '/style.css'); } }