Small widget for displaying awesome flash messages
Requirements ¶
Yii 1.1 or above
Usage ¶
Unpack to protected/extensions/widgets
in your theme or the view where you want to use the flash messages put this:
<?php
$this->widget('ext.widgets.etoastr.EToastr',array(
'flashMessagesOnly'=>true, //default to false
'message'=>'will be ignored', //because flashOnlyMessages is true
//the options passed to the plugin
'options'=>array(
'positionClass'=>'toast-top-right',
'fadeOut' => 1000,
'timeOut' => 10000,
'fadeIn' => 1000
)
));
?>
Look as ToastMessage
Great, thanks! But I'm using ToastMessage now...
re Look as ToastMessage
Thank you for your feedback, I didnt see ToastMessage before but it seems it is not the same jquery plugin and I keep this extesion always simple to use for one purpose.
thx nice job and bootstrap compliant!
Great, thanks! cause i coul'ndt use ToastMessage with my bootstrap application.
I think etoastr will be more Yii friendly cause ToastMessage don't work in all case... (e.g. with bootstrap)
Keep this plugin alive
AIMAGU
wow...very cool...
Thanks
to be every day better
Great, awesome and very useful,
thanks Brother.
thank you
Some thing i was looking for long time
great
working great. thnx
upgrade
thx , i use this widget always...
i suggest you to upgrade you'r widget like this for use complex Html messages on 'flashMessagesOnly'=>true,
if(isset($this->title)){ $toastrScript .='toastr.info(' . CJavaScript::Encode($this->message) . ', "'. $this->title .'")'; }else { $toastrScript .='toastr.success(' . CJavaScript::Encode($this->message) . ')';
regards...
How to display [x] close button
Hi,
Below is my code
<?php $this->widget('ext.etoastr.EToastr', array( 'flashMessagesOnly' => true, //default to false 'message' => 'will be ignored', //because flashOnlyMessages is true //the options passed to the plugin 'options' => array( 'positionClass' => 'toast-bottom-full-width', 'fadeOut' => 1000, 'timeOut' => 8000, 'fadeIn' => 1000, 'closeButton' => true, ) )); ?>
However, I could not still see the close button. What should I put on the options?
Cheers,
Daniel.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.