first
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
.alert {
|
||||
padding: 15px;
|
||||
margin-bottom: 18px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.alert h4 {
|
||||
margin-top: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.alert .alert-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.alert > p,
|
||||
.alert > ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.alert > p + p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.alert-dismissable,
|
||||
.alert-dismissible {
|
||||
padding-right: 35px;
|
||||
}
|
||||
|
||||
.alert-dismissable .close,
|
||||
.alert-dismissible .close {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
right: -21px;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* .alert-success {
|
||||
background-color: #4caf50;
|
||||
border-color: transparent;
|
||||
color: #ffffff;
|
||||
} */
|
||||
|
||||
.alert-success hr {
|
||||
border-top-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.alert-success .alert-link {
|
||||
color: #e6e6e6;
|
||||
}
|
||||
|
||||
/* .alert-info {
|
||||
background-color: #2196f3;
|
||||
border-color: transparent;
|
||||
color: #ffffff;
|
||||
} */
|
||||
|
||||
.alert-info hr {
|
||||
border-top-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.alert-info .alert-link {
|
||||
color: #e6e6e6;
|
||||
}
|
||||
|
||||
/* .alert-warning {
|
||||
background-color: #ffc107;
|
||||
border-color: transparent;
|
||||
color: #ffffff;
|
||||
} */
|
||||
|
||||
.alert-warning hr {
|
||||
border-top-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.alert-warning .alert-link {
|
||||
color: #e6e6e6;
|
||||
}
|
||||
/*
|
||||
.alert-danger {
|
||||
background-color: #f44336;
|
||||
border-color: transparent;
|
||||
color: #ffffff;
|
||||
} */
|
||||
|
||||
.alert-danger hr {
|
||||
border-top-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.alert-danger .alert-link {
|
||||
color: #e6e6e6;
|
||||
}
|
||||
|
||||
@-webkit-keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progress-bar-stripes {
|
||||
from {
|
||||
background-position: 40px 0;
|
||||
}
|
||||
|
||||
to {
|
||||
background-position: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.alert {
|
||||
padding-left: 30px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.alert span {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.alert:not(.alert-dismissible) {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.alert.alert-dismissable {
|
||||
padding-right: 44px;
|
||||
}
|
||||
|
||||
.alert-inverse {
|
||||
background-color: #333333;
|
||||
border-color: transparent;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.alert-inverse hr {
|
||||
border-top-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.alert-inverse .alert-link {
|
||||
color: #e6e6e6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.growl-animated.alert-inverse {
|
||||
box-shadow: 0 0 5px rgba(51, 51, 51, 0.5);
|
||||
}
|
||||
|
||||
.growl-animated.alert-info {
|
||||
box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
|
||||
}
|
||||
|
||||
.growl-animated.alert-success {
|
||||
box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
|
||||
}
|
||||
|
||||
.growl-animated.alert-warning {
|
||||
box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
|
||||
}
|
||||
|
||||
.growl-animated.alert-danger {
|
||||
box-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
|
||||
}
|
||||
|
||||
.alert-link {
|
||||
color: #fff !important;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
'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);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user