This widget allows to display the popup Dialog like the common Yii CJuiDialog but allows any layout and ajax loading with the url.
Note: C prefix was left, because of we hope to see the control as part of the Yii soon ;)
Yii 1.1.7
To use the extension just unzip all of its contents to the /protected/widgets/ or to the root of your /protected and /images folders.
You could always tune the view of the dialog with the dialog.css
The example of use of the CDialog and the CTree (Flexible Tree) is on the image bellow

//Example of the dynamic initialization $this->beginWidget('CDialog', array( 'id'=>'newDialog', // title of the dialog 'title'=> Yii::t('main.default', 'Title'), // dialog is showing when page is loading 'showOnLoad'=>false, // dialog showed with the gray background 'modal' => true, 'width' => 400, 'height' => 700, // the url from where the dialog content is loading 'url' => $this->createUrl('/yourModule/controller/getDialog/'), // called when the dialog is loaded 'onLoad' => ' function () { alert("onLoad Function"); }' )); $this->endWidget('CDialog'); //You should return the content in your controller/action/ public function getDialog() { echo "Dialog's Content"; }
Be the first person to leave a comment
Please login to leave your comment.