Sha256: a8371bff29c3fd067e85cf670021e0c800491ae0b802af9b2d62597ff84a80b4
Contents?: true
Size: 943 Bytes
Versions: 6
Compression:
Stored size: 943 Bytes
Contents
window.shopappSnackbar = function(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); } window.shopappAlert = function(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
6 entries across 6 versions & 1 rubygems