2014-01-09 2 views
0

Yii CGridView을 사용하고 있습니다. 내가 아약스 요청을보고 내가 JS 오류가 발생했습니다 직접 그 후삭제 후 Yii jQuery BBQ 오류

"URL is undefined" from jquery.ba-bbq.js @ 257 line (matches = url 
.match(is_fragment ? /^([^#]*)\#?(.*)$/ : /^([^#?]*)\??([^#]*)(#?.*)/);). 

사람이 어떻게 오류를 제거하는 방법 어떤 생각을 가지고 있습니까

array(
    'class'=>'CButtonColumn', 
    'template' => '{update}{delete}', 
    'buttons' => array(
     'delete' => array(
      'imageUrl' => false, 
      'options' => array('class'=>'btn btn-danger btn-mini delete-button'), 
     ) 
    ), 
) 

삭제 버튼을 클릭 한 후 : 컬럼에서 버튼을 삭제있다 ?

p.s. 항목이 삭제되고 js 오류 만 삭제됩니다. 이 하나

덮어 쓰기 CGridView registerClientScript :

+0

선이에 오류가 그것을 게시하시기 바랍니다. – Mave

+0

이미 해 보셨 으면합니다. 애플리케이션 애셋을 삭제하고 다시 시도하십시오. –

+0

@Mave : 그 라인으로 업데이트 – Justinas

답변

0

좋아, 내가 솔루션 here을 발견

public function registerClientScript(){ 

    //if ajaxUrl not set, default to the current action 
    if(!isset($this->ajaxUrl)) 
     $this->ajaxUrl = Yii::app()->controller->createUrl(""); 

    //call parent function 
    parent::registerClientScript(); 
}