Yii 1.1: jnotify

Extension for the jQuery notification plugin JNotify
16 followers

This extension provide a wrapper with some additional features for the JNotify jQuery plugin by FabioFranzini.

Resources ΒΆ

Total 3 comments

#6405 report it
Queryton at 2012/01/07 09:19pm
Installing
  1. Extract under protected/extensions (full dir path is extensions\jnotify\jnotify)
  2. Go to view add this code:
<div style="position: relative; height:150px; border: 1px solid #DDD;">
    <div id="StatusBar" style="height: 20px;">
    </div>
 
    <div id="Notification">
    </div>
</div>
 
<br />
 
 
<button id="addStatusBarMessage">Add a non permanent message (Status Bar)</button>
<br />
<button id="addStatusBarError">Add a permanent error (Status Bar)</button>
<br />
<br />
<button id="addNotificationMessage">Add a non permanent message (Notification)</button>
<br />
<button id="addNotificationError">Add a permanent error (Notification)</button>
 
<?php // Initialize the extension
$this->widget('application.extensions.jnotify.JNotify', array(
    'statusBarId'=>'StatusBar',
    'notificationId'=>'Notification',
    'notificationHSpace'=>'30px',   
    'notificationWidth'=>'280px',
    'notificationShowAt'=>'topRight',
    //'notificationShowAt'=>'bottomLeft',
    //'notificationAppendType'=>'prepend',
)); ?>
 
 
<script type="text/javascript">
$('#addStatusBarMessage').click(function() {
    $('#StatusBar').jnotifyAddMessage({
        text: 'This is a non permanent message.',
        permanent: false,
        showIcon: false
    });
});
 
$('#addStatusBarError').click(function() {
    $('#StatusBar').jnotifyAddMessage({
        text: 'This is a permanent error.',
        permanent: true,
        type: 'error'
    });
});
 
$('#addNotificationMessage').click(function() {
    $('#Notification').jnotifyAddMessage({
        text: 'This is a non permanent message.',
        permanent: false
    });
});
 
$('#addNotificationError').click(function() {
    $('#Notification').jnotifyAddMessage({
        text: 'This is a permanent error.',
        permanent: true,
        type: 'error'
    });
});
 
$(document).ready(function() {
    $('#Notification').jnotifyAddMessage({
        text: 'Hello world!'
    });
});
</script>
 
Code taken from: http://www.yiiplayground.cubedwater.com/index.php?r=ExtensionModule/ui/JNotify
#2357 report it
mzoli at 2010/12/16 10:33am
Solved: Doesn't work with CJuiTabs

I found this in jquery forum:

http://forum.jquery.com/topic/ajaxoptions-is-null-problem

#2340 report it
mzoli at 2010/12/15 05:41am
Doesn't work with CJuiTabs

Hi, Thanks for this plugin;) I'm not sure if it's your fault, but if on the page I use $this->widget('zii.widgets.jui.CJuiTabs', array( 'tabs' => array( ...

The notification throws an error: firebug: $("#StatusBar").jnotifyAddMessage is not a function

Leave a comment

Please to leave your comment.

Create extension
Downloads