font-size:12px;
text-shadow:0 1px 0 #FFFFFF;
}
-.alert {
+
+.notification-area {
position:fixed;
z-index:1050;
- top:41px;
- right:0;
+ top:44px;
left:0;
+ right:0;
+ padding:8px;
+}
+.alert {
+ position:relative;
padding:8px 0 8px;
- margin:0 0 10px;
+ margin:0 0 4px;
text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
background-color:#fcf8e3;
border-bottom:1px solid #fbeed5;
$('#progress').hide();
}
- function alertMessage (alertState, alertText) {
- if ($('.alert').is(':visible')) {
- $(alert).hide().remove();
- }
- var alert = $('<div class="alert ' + alertState + '" style="display:none">' +
- '<button type="button" class="close" data-dismiss="alert" tutle="Dismiss">×</button>' +
- '<strong>' + alertText + '</strong>')
- .prependTo('body');
- $(alert).show();
+ function alertMessage(alertClass, alertText) {
+ const a = $('<div class="alert ' + alertClass + ' alert-dismissible fade in show">' +
+ '<button type="button" class="close" data-dismiss="alert" title="Dismiss">×</button>' +
+ '<strong>' + alertText + '</strong>');
+ $('.notification-area').append(a);
+
setTimeout(function () {
- $(alert).remove();
- }, 3600);
+ $(a).fadeTo(500, 0).slideUp(500, function () {
+ $(this).alert('close');
+ });
+ }, 5000);
}
// Public functions