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'=>"×", // 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
-
set opsi2 pada array utk properti "initial" saja
-
set properti "initial" dengan true lalu set "extTrigger"
2056