diff options
author | Cyril <jv.cyril@gmail.com> | 2012-11-30 01:51:51 +0400 |
---|---|---|
committer | Cyril <jv.cyril@gmail.com> | 2012-12-01 21:40:47 +0400 |
commit | a9a54979150f02690784cbea5d9b697b95249f7c (patch) | |
tree | 8c105aa8e32b5524c2d8748ed7268d6d90e4df8c /app/views/layouts/_flash.html.haml | |
parent | c177593e2cf282f09934640bd597e6e3c5f32893 (diff) |
refactor flash
* make unobtrusive js
* convert js to coffee
Diffstat (limited to 'app/views/layouts/_flash.html.haml')
-rw-r--r-- | app/views/layouts/_flash.html.haml | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml index 86564ad7110..9961ce8dd34 100644 --- a/app/views/layouts/_flash.html.haml +++ b/app/views/layouts/_flash.html.haml @@ -1,17 +1,3 @@ -- if alert || notice - - text = alert || notice - %div{style: "display:none", id: "flash_container"} - %center - %h4= text - :javascript - $(function(){ - $("#flash_container").slideDown("slow"); - $("#flash_container").click(function(){ - $(this).slideUp("slow"); - }); - setTimeout("hideFlash()",3000); - }); - - function hideFlash(){ - $("#flash_container").slideUp("slow"); - } +- if text = alert || notice + #flash-container + %h4= text |