[Extension] JNotifier

Simple wrapper untuk jNotify jQuery Plug-in silahkan komentar jika ada kesalahan, masukan atau pertanyaan sebelum nanti ane submit ke sesi Extensions Yii

Konfigurasi:


<?php

$this->widget('ext.JNotifier.JNotifier', array(

	'initial'=>array(	// array for execute notification at time or set true (boolean) provide initialization for another execute way

		'style'=>'alternative', // string, 1. alternative, 2. else or not set = default style

		'type'=>'',				// string, 1. error, 2. warning 3 else or not set = notification

		'text'=>'Hello World!',	// notification text

		//'delay'=>200, 		// integer, if not set = notification will sticked automatically

		'registerCore'=>true,	// false if already register jquery core in same page

	),

	

	//  External trigger only created while 'initial'=>true  

	// 'extTrigger'=>CHtml::link('Trigger','#', array('onclick'=>"$.jnotify('This is a notification.', true)")), 

	

	/* other core settings	 */

	// 'closeLabel'=>"&times;",	// string HTML entities

	// 'showClose'=>true,

	// 'fadeSpeed'=>1000,

	// 'slideSpeed'=>250,

	

	/* events setting */	

	// 'init'=>null,		// "function (){ alert('notification has init'd');}",

	// 'create'=>null,		//"function (){ alert('will create notification');}",

	// 'beforeRemove'=>null, //"function (){ alert('will remove notification!');}"

	// 'remove'=>null,		//"function (){ alert('notification removed!');}"

	// 'transition'=>null

)); ?>

Untuk minimal konfigurasi bisa dengan

  1. set opsi2 pada array utk properti "initial" saja

  2. set properti "initial" dengan true lalu set "extTrigger"

2056

JNotifier.zip

wah minta doc cara pakenya dunk…biar gampang tesnya…kayanya keren ne…

Tinggal liat aja komen di konfigurasinya itu

bro kalo saya mau naruhnya di menu index gmn caranya ya?

misalnya ni tiap ada data ya baru di create pasti bakal nongol di index kan?

nah jadi ane mau bikin gitu, tiap ada user yg create, ntar dia buka index, bakal ada notif…

thx