From 501f98b9e1e70c88756ef2486541fd6b9613f1c3 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 24 Aug 2010 20:13:37 -0700 Subject: [PATCH] fixed comments from not showing. also, touched them up a bit. --- public/javascripts/view.js | 4 ++-- public/stylesheets/application.css | 13 ++++++++++--- public/stylesheets/sass/application.sass | 15 ++++++++++++--- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 88aeacaf6..1d52e84bc 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -30,10 +30,10 @@ $(document).ready(function(){ event.preventDefault(); if( $(this).hasClass( "visible")) { $(this).html($(this).html().replace("hide", "show")); - $(this).parents("li").children(".comments").fadeOut(100); + $(this).closest("li").children(".content").children(".comments").fadeOut(100); } else { $(this).html($(this).html().replace("show", "hide")); - $(this).parents("li").children(".comments").fadeIn(100); + $(this).closest("li").children(".content").children(".comments").fadeIn(100); } $(this).toggleClass( "visible" ); }); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index da3ae23fd..e23d78229 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -192,17 +192,23 @@ form { #stream div.comments { display: none; } + #stream div.comments .avatar { + width: 30px; + height: 30px; + margin-right: 10px; } #stream ul.comment_set { padding: 0; - padding-left: 1em; } + padding-left: 65px; } ul.comment_set { margin: 0; margin-top: 1em; padding: 0; list-style: none; - width: 90%; } + width: 495px; } + ul.comment_set textarea { + width: 100%; } ul.comment_set li.comment { margin-bottom: 0.5em; background-color: rgba(10, 81, 109, 0.05); @@ -216,7 +222,8 @@ ul.comment_set { color: #666666; font-size: 70%; } ul.comment_set li.comment form { - margin-top: -5px; } + margin-top: -5px; + margin-bottom: 0; } .profile_photo { float: left; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 864739fee..5096a9884 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -238,16 +238,25 @@ form #stream div.comments :display none + .avatar + :width 30px + :height 30px + :margin + :right 10px + #stream ul.comment_set :padding 0 - :left 1em + :left 65px ul.comment_set :margin 0 :top 1em :padding 0 :list-style none - :width 90% + :width 495px + + textarea + :width 100% li.comment :margin @@ -272,6 +281,7 @@ ul.comment_set form :margin :top -5px + :bottom 0 .profile_photo :float left @@ -495,7 +505,6 @@ h1.big_text :line-height auto :border :bottom 1px solid #666 - .right :top -6px