for a complete description of this jquery plugin please visit jquery-toastmessage
for demos Your text to link here...
...requirements of using this extension (e.g. Yii 1.1 or above)...
simply extract the download to your extensions folder
Now you can implement the toastMessage in two ways.
//in your view //we have four types of message type : Success, Info, Warning and Error $message = "this is yii at work"; $this->widget('ext.widgets.toastMessage.toastMessageWidget', array('message'=>$message,'type'=>'Success', 'options'=>array('sticky'=>true)));
$message = "this is a fully customized toastMessage"; $this->renderPartial('ext.toastMessage.views.toastView',array('message'=>$message, 'type'=>'warning', 'options'=>array( 'sticky'=>true, 'position'=>'middle-right', 'stayTime'=>5000)),false,true);
Official release Nov 2 2012.
added the options property
create a new view for none rendered implement
Total 8 comments
here!
Greetings, friend I think you have a problem, check the widget file ...
thanks for the correction. I actually had some short cut definition for some yii components, which I forgot to replace. now I have replaced it. cheers
Please replace cs() with Yii::app()->clientScript in your code. cs() is not available everywhere.
Thanks for this extension!
Thank you for the prompt answer, my situation is like this: Currently, I provide container to display the message (error/success/info/warning) on layouts/main.php like below:
From my TbGridView, I called
I have no idea to replace this with the toast message. Any help?
Cheers,
Daniel
yes you can use it for dynamical ajax call but the condition is that because the js script for the extensions are only loaded on request you have to set the param ($processOutput=true) in your renderPartial method. (the default is false)
eg. $this->renderPartial('myView',array('model'=>$model),false,TRUE);
Hi,
How to use it to show flash message? Also, display it dynamically after ajax call?
Cheers,
Daniel
wonderful..
nice extension. just about to remind me Foxpro and foxpro for windows..
Leave a comment
Please login to leave your comment.