diff --git a/app/views/status_messages/_status_message.haml b/app/views/status_messages/_status_message.haml index 8c9f5306d..cd1aa377c 100644 --- a/app/views/status_messages/_status_message.haml +++ b/app/views/status_messages/_status_message.haml @@ -5,17 +5,14 @@ - if photos.size > 0 .photo_attachments - .key_photo - = link_to (image_tag photos.first.url(:scaled_full)), photo_path(photos.first) - %br + = link_to (image_tag photos.first.url(:scaled_full)), photo_path(photos.first) - if photos.size > 1 - if photos.size >= 8 - for photo in photos[1..8] = link_to (image_tag photo.url(:thumb_small)), photo_path(photo) - else - .thumbs - - for photo in photos - = link_to (image_tag photo.url(:thumb_small)), photo_path(photo) + - for photo in photos[1..photos.size] + = link_to (image_tag photo.url(:thumb_small)), photo_path(photo) = markdownify(post.message, :youtube_maps => post[:youtube_titles]) - else diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index e02510677..0205a9ec3 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -16,9 +16,7 @@ var Stream = { $(this).parent().html("");} }); - $('.thumbs img').live('hover', function(){ - Stream.replaceKeyPhoto($(this)); - }); + // comment link form focus $stream.delegate(".focus_comment_textarea", "click", function(e){ Stream.focusNewComment($(this), e); @@ -129,19 +127,7 @@ var Stream = { commentBlock.find('textarea').focus(); } } - }, - - replaceKeyPhoto: function(photo){ - var show_url = photo.parent().first()[0].href - var img_url = photo.first()[0].src; - var large_url = img_url.replace("thumb_small", "scaled_full"); - var key_photo = photo.parent().parent().siblings('.key_photo') - var key_photo_img = key_photo.find('img'); - key_photo_img.attr('height', key_photo_img.height()); - key_photo_img.attr('src', large_url); - key_photo.find('a').attr('href', show_url); } - }; $(document).ready(Stream.initialize);