yii-toastmessage a smal widget to implement the jquery toast message

  1. Requirements
  2. Usage
  3. Change Log

for a complete description of this jquery plugin please visit jquery-toastmessage

for demos Click here...

Requirements

...requirements of using this extension (e.g. Yii 1.1 or above)...

Usage

simply extract the download to your extensions folder

Now you can implement the toastMessage in two ways.

  1. Using the widget itself
//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)));
  1. Using the view file in the views directory of the toastMessage extension. I prefer this second method when i dont want to render a view from any action.
$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); 

Change Log

Official release Nov 2 2012.

Nov 29 2012
  • added the options property
    • inEffectDuration: 600, // in effect duration in miliseconds
    • stayTime: 3000, // time in miliseconds before the item has to disappear
    • text: '', // content of the item
    • sticky: false, // should the toast item sticky or not?
    • position: 'top-right', // top-left, top-center, top-right, middle-left, middle-center, middle-right
                        // Position of the toast container holding different toast.
                        // Position can be set only once at the very first call,
                        // changing the position after the first call does nothing
      
  • closeText: '', // text which will be shown as close button,
                       // set to '' when you want to introduce an image via css
    
  • close: null // callback function when the toastmessage is closed

  • create a new view for none rendered implement

5 0
17 followers
638 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: binkabir
Created on: Nov 2, 2012
Last updated: 11 years ago

Downloads

show all