mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
67 lines
1.7 KiB
TypeScript
67 lines
1.7 KiB
TypeScript
//Test for bootstrap-notify v3.1.3
|
||
//Copied example directly from Bootstrap-notify site
|
||
|
||
$.notify({
|
||
// options
|
||
icon: 'glyphicon glyphicon-warning-sign',
|
||
title: 'Bootstrap notify',
|
||
message: 'Turning standard Bootstrap alerts into "notify" like notifications',
|
||
url: 'https://github.com/mouse0270/bootstrap-notify',
|
||
target: '_blank'
|
||
},{
|
||
// settings
|
||
element: 'body',
|
||
position: null,
|
||
type: "info",
|
||
allow_dismiss: true,
|
||
newest_on_top: false,
|
||
showProgressbar: false,
|
||
placement: {
|
||
from: "top",
|
||
align: "right"
|
||
},
|
||
offset: 20,
|
||
spacing: 10,
|
||
z_index: 1031,
|
||
delay: 5000,
|
||
timer: 1000,
|
||
url_target: '_blank',
|
||
mouse_over: null,
|
||
animate: {
|
||
enter: 'animated fadeInDown',
|
||
exit: 'animated fadeOutUp'
|
||
},
|
||
onShow: null,
|
||
onShown: null,
|
||
onClose: null,
|
||
onClosed: null,
|
||
icon_type: 'class',
|
||
template: '<div data-notify="container" class="col-xs-11 col-sm-3 alert alert-{0}" role="alert">' +
|
||
'<button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button>' +
|
||
'<span data-notify="icon"></span> ' +
|
||
'<span data-notify="title">{1}</span> ' +
|
||
'<span data-notify="message">{2}</span>' +
|
||
'<div class="progress" data-notify="progressbar">' +
|
||
'<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
|
||
'</div>' +
|
||
'<a href="{3}" target="{4}" data-notify="url"></a>' +
|
||
'</div>'
|
||
});
|
||
|
||
const notifyResult = $.notify({
|
||
message: 'Callbacks have the popup element as an argument',
|
||
},{
|
||
onShow: function($ele) {
|
||
notifyResult.$ele === $ele;
|
||
},
|
||
onShown: function($ele) {
|
||
notifyResult.$ele === $ele;
|
||
},
|
||
onClose: function($ele) {
|
||
notifyResult.$ele === $ele;
|
||
},
|
||
onClosed: function($ele) {
|
||
notifyResult.$ele === $ele;
|
||
},
|
||
});
|