Sha256: b05741818c4d5f7e9a8bb782be2b6ade5fae04c93be0794637fc128a5a28ae82
Contents?: true
Size: 1.21 KB
Versions: 4
Compression:
Stored size: 1.21 KB
Contents
(function(object) { 'use strict'; object.flash = { success: function(message) { object.flash.flashMessage('success', message); }, error: function(message) { object.flash.danger(message); }, danger: function(message) { object.flash.flashMessage('danger', message); }, alert: function(message) { object.flash.warning(message); }, warning: function(message) { object.flash.flashMessage('warning', message); }, notice: function(message) { object.flash.info(message); }, info: function(message) { object.flash.flashMessage('info', message); }, flashMessage: function(type, message) { if (message === '' || message === undefined) { return false; } type = type || 'warning'; var messagesContainer = document.querySelector('#alert-messages'), msgContainer = document.createElement('div'); msgContainer.setAttribute('class', 'alert alert-' + type + ' alert-link alert-dismissable fade-in'); msgContainer.setAttribute('role', 'alert'); msgContainer.innerHTML = message; messagesContainer.appendChild(msgContainer); } }; return object; }(Archangel || {}));
Version data entries
4 entries across 4 versions & 1 rubygems