Sha256: 871e48dc1be6bb7a228140d6b7a9d0e4c25fff123ea53d513918177322fd254b
Contents?: true
Size: 803 Bytes
Versions: 17
Compression:
Stored size: 803 Bytes
Contents
window.Alchemy = {} if typeof (window.Alchemy) is "undefined" Alchemy.Growler = build: (message, flash_type) -> $flash_container = $("<div class=\"flash #{flash_type}\" />") $flash_container.append Alchemy.messageIcon(flash_type) $flash_container.append message $("#flash_notices").append $flash_container $("#flash_notices").show() Alchemy.Growler.fade() fade: -> $(".flash:not(.error)", "#flash_notices").delay(5000).queue(-> Alchemy.Growler.dismiss(this)) $(".flash", "#flash_notices").on("click", (e) => @dismiss(e.currentTarget)) return dismiss: (element) -> $(element).on 'transitionend', => $(element).remove() $(element).addClass('dismissed') return Alchemy.growl = (message, style = "notice") -> Alchemy.Growler.build message, style
Version data entries
17 entries across 17 versions & 1 rubygems