diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 26738aea9df4856a0233bdd202a7c185ee4f07d8..1e41860bc4ff4da6326459e88b14cd708e63b4c1 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -58,9 +58,14 @@ $(this).children(".destroy_link").fadeOut(0); }); + // in field label plugin + $("label").inFieldLabels(); + + $(".show_post_comments").click( function() { + $(this).parents("li").children(".comments").fadeIn(100); + }); - $("label").inFieldLabels(); }); = javascript_include_tag 'satisfaction' , 'satisfaction-display' diff --git a/app/views/status_messages/_new_status_message.haml b/app/views/status_messages/_new_status_message.haml index d8cb1d3284fb47dfd41ddf794c0fc422c9177ce0..84f58d76a710077c1e699801c2ff2af2e5a7f232 100644 --- a/app/views/status_messages/_new_status_message.haml +++ b/app/views/status_messages/_new_status_message.haml @@ -1,6 +1,5 @@ = form_for StatusMessage.new, :remote => true do |f| = f.error_messages %p - /= f.label :message = f.text_field :message, :value => "tell me something good" - = f.submit 'oh yeah!', :class => 'button' \ No newline at end of file + = f.submit 'oh yeah!', :class => 'button' diff --git a/app/views/status_messages/_status_message.html.haml b/app/views/status_messages/_status_message.html.haml index b57006a8f9fe478a47fa52930085342f52d03eb7..f036ed9c1cb09e2787d523e4af723e3120dc7dca 100644 --- a/app/views/status_messages/_status_message.html.haml +++ b/app/views/status_messages/_status_message.html.haml @@ -5,6 +5,8 @@ %div.time = link_to(how_long_ago(post), status_message_path(post)) + \-- + = link_to "show comments (xx)", '#', :class => "show_post_comments" = render "comments/comments", :post => post - if mine?(post) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d6b0b8d29c62e22dfe9b3b3713dde804b77b76f1..3afa3fdac42353608e0420e0780acf647230aaef 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -110,23 +110,11 @@ ul#stream_filters { #main { width: 100%; } -ul#stream { +ul#stream, ul#friend_stream { margin: 0; padding: 0; - color: #666666; - font-size: 110%; } - ul#stream > li { - list-style: none; - padding: 1em 0; - border-bottom: 1px solid #f1f1f1; - margin-bottom: 5px; } - -ul#friend_stream { - margin: 0; - padding: 0; - color: #666666; - font-size: 110%; } - ul#friend_stream > li { + color: #666666; } + ul#stream > li, ul#friend_stream > li { list-style: none; padding: 1em 0; border-bottom: 1px solid #f1f1f1; @@ -140,7 +128,8 @@ li.message { li.message span.from { color: #333333; font-weight: bold; - margin-right: 0.2em; } + margin-right: 0.2em; + font-size: 110%; } li.message div.time { color: #bababa; font-size: 70%; } @@ -173,6 +162,9 @@ form { #user_name a:hover { color: #cc1e14; } +div.comments { + display: none; } + ul.comment_set { margin: 0; margin-top: 1em; @@ -191,6 +183,9 @@ ul.comment_set { ul.comment_set li.comment .from a { color: #333333; font-weight: bold; } + ul.comment_set li.comment form { + margin-top: -5px; + padding-bottom: 8px; } img#profile_picture { width: 100%; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b3835ad91d9787e04ec6cc593249e24c31d727a2..21e061464486006412e18c7e233413d2aa673aba 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -120,12 +120,10 @@ ul#stream_filters #main :width 100% -ul#stream +ul#stream, ul#friend_stream :margin 0 :padding 0 :color #666 - :font - :size 110% > li :list-style none @@ -134,21 +132,6 @@ ul#stream :bottom 1px solid #f1f1f1 :margin-bottom 5px -ul#friend_stream - :margin 0 - :padding 0 - :color #666 - :font - :size 110% - - > li - :list-style none - :padding 1em 0 - :border - :bottom 1px solid #f1f1f1 - :margin-bottom 5px - - li.message :position relative :line-height 140% @@ -162,6 +145,8 @@ li.message :weight bold :margin :right 0.2em + :font + :size 110% div.time :color #bababa @@ -202,6 +187,8 @@ form &:hover :color #CC1E14 +div.comments + :display none ul.comment_set :margin 0 @@ -228,6 +215,11 @@ ul.comment_set :font :weight bold + form + :margin + :top -5px + :padding + :bottom 8px img#profile_picture