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 ;)
- Allows multi level data load: static and dynamic (Ajax)
- Allows modal (grayBlock is showing) or simple dialog showing (page items could be clicked)
- Allows onClose client script functionality
- Allows onLoad client script functionality
- Allows ajax dialog content loading
- Allows easy design change
Requirements ¶
Yii 1.1.7
Usage ¶
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";
}
Resources ¶
- [Project page] [https://code.google.com/p/moco-dialog/](https://code.google.com/p/moco-dialog/ "https://code.google.com/p/moco-dialog/")
- [Owner is] [http://tmx.com.ua/](http://tmx.com.ua/ "http://tmx.com.ua/")
- [Developed by] Sysprog of http://martis-ua.com/
Instalation issues ...
Hello !
After installing when I run my app I keep getting this message:
CDialog cannot find the view "dialog".
framework\web\widgets\CWidget.php(246)
Any ideas ?
Response to the comment of raynox
Hello raynox
Thank you much using the extension
The message tells that the yii could not find the path widgets/views/dialog.php
You must copy all the content to the /protected/widgets/
Open to help you if any other needs
Thank you
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.