diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index b6169196c7404053ac47d57f2067d9062686a3fa..f651c197dfdead590020bf231b830121b3b12c0d 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -38,6 +38,10 @@ }; }); %body + + - flash.each do |name, msg| + = content_tag :div, msg, :id => "flash_#{name}" + %header %a#diaspora_text{:href => root_path} %img{:src => '/images/diaspora_white.png'} @@ -73,8 +77,6 @@ %a{ :href => friends_path, :title => "Your list of connections with other seeds."} %li friends - - flash.each do |name, msg| - = content_tag :div, msg, :id => "flash_#{name}" #content = yield diff --git a/public/javascripts/view.js b/public/javascripts/view.js index f657d5bbe5a5354835f2966c226a49365c57a068..af9682e0557d89bd5e3323529e99d20304a89f35 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -15,13 +15,12 @@ $(document).ready(function(){ $(this).val("") }); - - $(".button").click(function() { - $('button[type=submit] .default').click(function() { - $('#status_message_message').delay(2000).val(""); - }) + $('#status_message_submit').click(function() { + $('#status_message_message').val(""); }); + $('#flash_notice, #flash_error, #flash_alert').delay(1500).slideUp(130); + diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c8304d1adf327c50bf86d17ac97906a8f9bae560..9cfea05ebd535dadfae3311abbae313e4be2ed73 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -12,8 +12,13 @@ a { #flash_notice, #flash_error, #flash_alert { + z-index: 60; + position: fixed; padding: 5px 8px; - margin: 10px 0; } + margin: 0; + width: 400px; + top: 0px; + left: 200px; } #flash_notice { background-color: #ccffcc; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 3915ee700e4a2fb8503056fb3d12607522f666e0..ff34a75659ce6f4da2b20b60872b94041dcca99b 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -13,8 +13,13 @@ a #flash_notice, #flash_error, #flash_alert + :z-index 60 + :position fixed :padding 5px 8px - :margin 10px 0 + :margin 0 + :width 400px + :top 0px + :left 200px #flash_notice :background-color #CFC