refactor flash

* make unobtrusive js
* convert js to coffee
This commit is contained in:
Cyril 2012-11-29 22:51:51 +01:00
parent c177593e2c
commit a9a5497915
4 changed files with 12 additions and 19 deletions

View file

@ -33,6 +33,11 @@ $ ->
# Bottom tooltip
$('.has_bottom_tooltip').tooltip(placement: 'bottom')
# Flash
if (flash = $("#flash-container")).length > 0
flash.click -> $(@).slideUp("slow")
flash.slideDown "slow"
setTimeout (-> flash.slideUp("slow")), 3000
# Disable form buttons while a form is submitting
$('body').on 'ajax:complete, ajax:beforeSend, submit', 'form', (e) ->