From e880a5a11fe67720c2b42d12c847ad8119bbd374 Mon Sep 17 00:00:00 2001 From: danielvincent <danielgrippi@gmail.com> Date: Wed, 20 Oct 2010 18:15:07 -0700 Subject: [PATCH] comment submit buttons show again. further changes to show pages. --- app/views/albums/show.html.haml | 9 +++++++-- app/views/photos/show.html.haml | 11 +++-------- public/javascripts/stream.js | 13 ------------- public/javascripts/view.js | 14 ++++++++++++++ public/stylesheets/sass/application.sass | 8 +++++++- 5 files changed, 31 insertions(+), 24 deletions(-) diff --git a/app/views/albums/show.html.haml b/app/views/albums/show.html.haml index a2d9df3929..d6f834c822 100644 --- a/app/views/albums/show.html.haml +++ b/app/views/albums/show.html.haml @@ -16,6 +16,10 @@ - for friend in @friends = person_image_link(friend) +%h3 + = link_to "#{@aspect} Albums", albums_path(:aspect => @aspect) + + .span-19.appends-1.last #thumbnails - for photo in @album_photos @@ -23,10 +27,11 @@ = link_to (image_tag photo.url(:thumb_medium)), object_path(photo) .span-5.last - %h3 + %h2 = @album.name + ="#{t('.updated')} #{how_long_ago(@album)}" - = link_to "#{@aspect} Albums", albums_path(:aspect => @aspect) + -if current_user.owns? @album =render 'photos/new_photo' = link_to t('.edit_album'), edit_album_path(@album), :class => 'button' diff --git a/app/views/photos/show.html.haml b/app/views/photos/show.html.haml index f339de7b92..afdf1ebf3b 100644 --- a/app/views/photos/show.html.haml +++ b/app/views/photos/show.html.haml @@ -61,6 +61,9 @@ - for friend in @friends = person_image_link(friend) +%h3 + = link_to @photo.album.name, @photo.album + .span-14.append-1.last %div{:data=>{:guid=>@photo.id}} #show_photo @@ -81,14 +84,6 @@ .description = @photo.caption - %h3 - = link_to @photo.album.name, @photo.album - = @photo.image - - - -if current_user.owns? @album - = link_to t('.edit_photo'), edit_photo_path(@photo), :class => "button" - -if current_user.owns? @photo %div{:class => 'clear'} -if !@photo.caption or @photo.caption == "" diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index c7ec199d62..5591bd1f81 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -29,19 +29,6 @@ $(".show_post_comments").live('click', function(event) { $(this).toggleClass( "visible" ); }); -$(".comment_box").toggle(function(evt){ - var $this = $(this); - $this.attr("rows", 2); - $this.parents("p").parents("form").children("p").children(".comment_submit").fadeIn(200); -}); - -$(".comment_box").live('blur', function(evt){ - var $this = $(this); - if( $this.val() == '' ) { - $this.parents("p").parents("form").children("p").children(".comment_submit").fadeOut(0); - $this.attr("rows", 1); - } -}); $(".comment_submit").live('click', function(evt){ $(this).closest("form").children("p .comment_box").attr("rows", 1); diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 74687f668f..907602743f 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -121,3 +121,17 @@ $(".make_profile_photo").live("click", function(){ } }); }); + +$(".comment_box").live("focus",function(evt){ + var $this = $(this); + $this.attr("rows", 2); + $this.parents("p").parents("form").children("p").children(".comment_submit").fadeIn(200); +}); + +$(".comment_box").live('blur', function(evt){ + var $this = $(this); + if( $this.val() == '' ) { + $this.parents("p").parents("form").children("p").children(".comment_submit").fadeOut(0); + $this.attr("rows", 1); + } +}); diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index d7cf2c479d..7bbaeea4b4 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -548,7 +548,11 @@ li.message .from .right :max-width 100% :-webkit-box-shadow 0 2px 4px #333 :border 10px solid #fff - :bottom 50px solid #fff + :bottom 80px solid #fff + + :-webkit-border-radius 3px + :-moz-border-radius 3px + :border-radius 3px .caption :margin @@ -1013,6 +1017,7 @@ ul#settings_nav img :width 20px :height 20px + :margin-right -4px #thumbnails :line-height 14px @@ -1131,3 +1136,4 @@ header &:hover .controls :display inline + -- GitLab