123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- 'use strict';
- $(window).on('load',function(){
- //Welcome Message (not for login page)
- function notify(message, type){
- $.growl({
- message: message
- },{
- type: type,
- allow_dismiss: false,
- label: 'Cancel',
- className: 'btn-xs btn-inverse',
- placement: {
- from: 'bottom',
- align: 'right'
- },
- delay: 2500,
- animate: {
- enter: 'animated fadeInRight',
- exit: 'animated fadeOutRight'
- },
- offset: {
- x: 30,
- y: 30
- }
- });
- };
-
-
- notify('Welcome to Notification page', 'inverse');
-
- });
-
- $(document).ready(function() {
-
- /*--------------------------------------
- Notifications & Dialogs
- ---------------------------------------*/
- /*
- * Notifications
- */
- function notify(from, align, icon, type, animIn, animOut){
- $.growl({
- icon: icon,
- title: ' Bootstrap Growl ',
- message: 'Turning standard Bootstrap alerts into awesome notifications',
- url: ''
- },{
- element: 'body',
- type: type,
- allow_dismiss: true,
- placement: {
- from: from,
- align: align
- },
- offset: {
- x: 30,
- y: 30
- },
- spacing: 10,
- z_index: 999999,
- delay: 2500,
- timer: 1000,
- url_target: '_blank',
- mouse_over: false,
- animate: {
- enter: animIn,
- exit: animOut
- },
- icon_type: 'class',
- template: '<div data-growl="container" class="alert" role="alert">' +
- '<button type="button" class="close" data-growl="dismiss">' +
- '<span aria-hidden="true">×</span>' +
- '<span class="sr-only">Close</span>' +
- '</button>' +
- '<span data-growl="icon"></span>' +
- '<span data-growl="title"></span>' +
- '<span data-growl="message"></span>' +
- '<a href="#" data-growl="url"></a>' +
- '</div>'
- });
- };
-
- $('.notifications .btn').on('click',function(e){
- e.preventDefault();
- var nFrom = $(this).attr('data-from');
- var nAlign = $(this).attr('data-align');
- var nIcons = $(this).attr('data-icon');
- var nType = $(this).attr('data-type');
- var nAnimIn = $(this).attr('data-animation-in');
- var nAnimOut = $(this).attr('data-animation-out');
-
- notify(nFrom, nAlign, nIcons, nType, nAnimIn, nAnimOut);
- });
-
- });
-
|