refactor flash
* make unobtrusive js * convert js to coffee
This commit is contained in:
parent
c177593e2c
commit
a9a5497915
4 changed files with 12 additions and 19 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue