Sha256: 366d27bdbbfca5993cfe8c55d203edd588ac8d65fae7ee7c09d2cae506f72043
Contents?: true
Size: 925 Bytes
Versions: 1
Compression:
Stored size: 925 Bytes
Contents
function shopappSnackbar(message, timeout) { if(timeout === undefined) { timeout = 5000; } $('body').append("<div class=\"snackbar snackbar-left show\"><div class=\"snackbar-body\">" + message + "</div></div>"); setTimeout(function() { $('.snackbar').removeClass('show'); }, timeout); } function shopappAlert(message, type) { if (type === undefined) { type = 'danger'; } $('main > div:nth-child(2) > div:first-child').append( '<div class="alert alert-' + type + ' alert-dismissible fade mt-3 show" role="alert">' + message + '<button aria-label="Close" class="close" data-dismiss="alert" type="button"><span aria-hidden="true">×</span></button></div>'); } // Following makes BS tooltips work. See /views/layouts/application.html.haml $(function() { $('[data-tooltip="tooltip"]').tooltip(); $('[data-toggle="tooltip"]').tooltip(); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shopapp-0.73.02 | app/assets/javascripts/shopapp3.js |