Revert "js hack to see bigger version of photo thumbnails in the stream without being abnoxious"

This reverts commit ab997e2d21.
This commit is contained in:
maxwell 2011-03-14 09:51:06 -07:00
parent e8bb4c2d66
commit d91fda656c
2 changed files with 4 additions and 21 deletions

View file

@ -5,16 +5,13 @@
- if photos.size > 0
.photo_attachments
.key_photo
= link_to (image_tag photos.first.url(:scaled_full)), photo_path(photos.first)
%br
- 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
- 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])

View file

@ -16,9 +16,7 @@ var Stream = {
$(this).parent().html("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");}
});
$('.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);