Sha256: 9c653c6e3859ca2f2ad679270f8ccf764161c53ae89f5e78d697626164ecd937
Contents?: true
Size: 1.14 KB
Versions: 14
Compression:
Stored size: 1.14 KB
Contents
if !window.spurs then window.spurs = {} window.spurs.flashes = highest_priority_flash_container: -> highest = -100 highest_item = null $("." + spurs.vars.flashes.container_class).each (idx, item) -> priority = parseInt($(item).attr("id").substring($("." + spurs.vars.flashes.container_class).attr("id").indexOf(spurs.vars.flashes.container_id_prefix) + spurs.vars.flashes.container_id_prefix.length)) if priority > highest highest = priority highest_item = $(item) highest_item lowest_priority_flash_container: -> lowest = 9999 lowest_item = null $("." + spurs.vars.flashes.container_class).each (idx, item) -> priority = parseInt($(item).attr("id").substring($("." + spurs.vars.flashes.container_class).attr("id").indexOf(spurs.vars.flashes.container_id_prefix) + spurs.vars.flashes.container_id_prefix.length)) if priority < lowest lowest = priority lowest_item = $(item) lowest_item alert: (message, flavor) -> $.ajax url: spurs.vars.flashes.create_path + ".js" type: "POST" data: message: message flavor: flavor
Version data entries
14 entries across 14 versions & 1 rubygems