2014-11-03 48 views
0

即時通訊嘗試去工作簡單彈出,形成的例子,但沒有工作..Atk4和popup從例子

使用4.3.0.dev。

從這裏嘗試: http://book.agiletoolkit.org/views/popover.html

$i = $this->add('Icon')->set('window'); 
$pop = $this->add('View_Popover'); 
$pop->add('HelloWorld'); 
$i->js('click', $pop->showJS()); 

或者從這裏: http://www4.agiletoolkit.org/css/popover

//The view to click (can be any element) 
$view = $this->add('View')->set('Some text'); 
//Popover view 
$pop = $this->owner->add('View_Popover'); 
$pop->add('View')->set('Content to show in tooltip'); 
$this->on('click','#'.$view->name,$pop->showJS($this->js(null, '$(this)'),array(
    'width'=>'250px',//You can specify the width of tooltip 
    'my'=>'left bottom',//Specify the position of the tooltip 
    'at'=>'left+5 bottom-25',//Specify the margins 
    'class' => 'atk-popover atk-popover-bottom-left',//Specify where to show 
))); 

在這兩個例子中,我得到JS錯誤:

Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'open' jquery-2.0.3.min.js:4 

回答

0

我不知道昨天發生了什麼,也許是太累了,但它現在工作..