'use strict'; var BootstrapNotifyDemo = function () { var demo = function () { $('#bootstrap-notify-gen-btn').click(function() { var content = {}; content.message = 'New order has been placed'; if ($('#bootstrap-notify-title').prop('checked')) { content.title = 'Notification Title'; content.target = '_blank'; } if ($('#bootstrap-notify-icon').val() != '') { content.icon = 'icon ' + $('#bootstrap-notify-icon').val(); } if ($('#bootstrap-notify-url').prop('checked')) { content.url = 'http://pixelstrap.com'; content.target = '_blank'; } var notify = $.notify(content, { type: $('#bootstrap-notify-state').val(), allow_dismiss: $('#bootstrap-notify-dismiss').prop('checked'), newest_on_top: $('#bootstrap-notify-top').prop('checked'), mouse_over: $('#bootstrap-notify-pause').prop('checked'), showProgressbar: $('#bootstrap-notify-progress').prop('checked'), spacing: $('#bootstrap-notify-spacing').val(), timer: $('#bootstrap-notify-timer').val(), placement: { from: $('#bootstrap-notify-placement-from').val(), align: $('#bootstrap-notify-placement-align').val() }, offset: { x: $('#bootstrap-notify-offset-x').val(), y: $('#bootstrap-notify-offset-y').val() }, delay: $('#bootstrap-notify-delay').val(), z_index: $('#bootstrap-notify-z-index').val(), animate: { enter: 'animated ' + $('#bootstrap-notify-enter').val(), exit: 'animated ' + $('#bootstrap-notify-exit').val() } }); if ($('#bootstrap-notify-progress').prop('checked')) { setTimeout(function() { notify.update('message', 'Saving Page Data.'); notify.update('type', 'primary'); notify.update('progress', 20); }, 1000); setTimeout(function() { notify.update('message', 'Saving User Data.'); notify.update('type', 'warning'); notify.update('progress', 40); }, 2000); setTimeout(function() { notify.update('message', 'Saving Profile Data.'); notify.update('type', 'danger'); notify.update('progress', 65); }, 3000); setTimeout(function() { notify.update('message', 'Checking for errors.'); notify.update('type', 'success'); notify.update('progress', 100); }, 4000); } var notify_content1 = "<script>
$.notify({
title:'Email: Erica Fisher',
message:'Investment, stakeholders micro-finance equity health Bloomberg; global citizens climate change. Solve positive social change sanitation, opportunity insurmountable challenges...'
},
{
type:'" + $('#bootstrap-notify-state').val() +"',
allow_dismiss:"+ $('#bootstrap-notify-dismiss').prop('checked') + ",
newest_on_top:" + $('#bootstrap-notify-top').prop('checked') + " ,
mouse_over:" + $('#bootstrap-notify-pause').prop('checked') + ",
showProgressbar:" + $('#bootstrap-notify-progress').prop('checked') + ",
spacing:" + $('#bootstrap-notify-spacing').val() + ",
timer:" + $('#bootstrap-notify-timer').val() + ",
placement:{
from:'" + $('#bootstrap-notify-placement-from').val() + "',
align:'" + $('#bootstrap-notify-placement-align').val() + "'
},
offset:{
x:" + $('#bootstrap-notify-offset-x').val() + ",
y:" + $('#bootstrap-notify-offset-y').val() + "
},
delay:" + $('#bootstrap-notify-delay').val() +" ,
z_index:" + $('#bootstrap-notify-z-index').val() + ",
animate:{
enter:'animated "+ $('#bootstrap-notify-enter').val()+ "',
exit:'animated " + $('#bootstrap-notify-exit').val()+ "'
}
});
</script>"; $("#notify-code-show").html(notify_content1); }); } return { init: function() { demo(); } }; }(); (function($) { "use strict"; BootstrapNotifyDemo.init(); var notify_content1 = "<script>
$.notify({
title:'Email: Erica Fisher',
message:'Investment, stakeholders micro-finance equity health Bloomberg; global citizens climate change. Solve positive social change sanitation, opportunity insurmountable challenges...'
},
{
type:'" + $('#bootstrap-notify-state').val() +"',
allow_dismiss:"+ $('#bootstrap-notify-dismiss').prop('checked') + ",
newest_on_top:" + $('#bootstrap-notify-top').prop('checked') + " ,
mouse_over:" + $('#bootstrap-notify-pause').prop('checked') + ",
showProgressbar:" + $('#bootstrap-notify-progress').prop('checked') + ",
spacing:" + $('#bootstrap-notify-spacing').val() + ",
timer:" + $('#bootstrap-notify-timer').val() + ",
placement:{
from:'" + $('#bootstrap-notify-placement-from').val() + "',
align:'" + $('#bootstrap-notify-placement-align').val() + "'
},
offset:{
x:" + $('#bootstrap-notify-offset-x').val() + ",
y:" + $('#bootstrap-notify-offset-y').val() + "
},
delay:" + $('#bootstrap-notify-delay').val() +" ,
z_index:" + $('#bootstrap-notify-z-index').val() + ",
animate:{
enter:'animated "+ $('#bootstrap-notify-enter').val()+ "',
exit:'animated " + $('#bootstrap-notify-exit').val()+ "'
}
});
</script>"; $("#notify-code-show").html(notify_content1); })(jQuery);