新手求助: 下面的 代码 代表什么,看不懂
刚从 C++ 转过来,看Jquery语法真费劲
<?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id' => 'dlg-add-X',
'theme' => 'base',
'htmlOptions' => array('style' => 'display:none'),
'options' => array(
'title' => 'X',
'autoOpen' => false,
'resizable' => false,
'modal' => true,
'width' => 680,
),
));
echo '<div id="dialog-form"></div>';
$this->endWidget('zii.widgets.jui.CJuiDialog');
?>
<script type="text/javascript">
$(document).ready(function(){
function addX(event, add_X) {
$("#dlg-add-X")
.dialog("option", "buttons",[
{
text: lang.Save,
click: function() {
}
},
{
text: lang.Cancel,
click: function() {$(this).dialog("close");}
}
])
.dialog("open");
$("#dialog-form").load(getRootPath() + "/Y/z");
event.stopImmediatePropagation(); }
$(".add-X").click(function(event){addX(event, $(this))});
});
</script>
<