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:
parent
e8bb4c2d66
commit
d91fda656c
2 changed files with 4 additions and 21 deletions
|
|
@ -5,17 +5,14 @@
|
||||||
|
|
||||||
- if photos.size > 0
|
- if photos.size > 0
|
||||||
.photo_attachments
|
.photo_attachments
|
||||||
.key_photo
|
= link_to (image_tag photos.first.url(:scaled_full)), photo_path(photos.first)
|
||||||
= link_to (image_tag photos.first.url(:scaled_full)), photo_path(photos.first)
|
|
||||||
%br
|
|
||||||
- if photos.size > 1
|
- if photos.size > 1
|
||||||
- if photos.size >= 8
|
- if photos.size >= 8
|
||||||
- for photo in photos[1..8]
|
- for photo in photos[1..8]
|
||||||
= link_to (image_tag photo.url(:thumb_small)), photo_path(photo)
|
= link_to (image_tag photo.url(:thumb_small)), photo_path(photo)
|
||||||
- else
|
- else
|
||||||
.thumbs
|
- for photo in photos[1..photos.size]
|
||||||
- for photo in photos
|
= link_to (image_tag photo.url(:thumb_small)), photo_path(photo)
|
||||||
= link_to (image_tag photo.url(:thumb_small)), photo_path(photo)
|
|
||||||
= markdownify(post.message, :youtube_maps => post[:youtube_titles])
|
= markdownify(post.message, :youtube_maps => post[:youtube_titles])
|
||||||
|
|
||||||
- else
|
- else
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,7 @@ var Stream = {
|
||||||
$(this).parent().html("<audio preload='none' src='" + this.href + "' controls='controls'>mom</audio>");}
|
$(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
|
// comment link form focus
|
||||||
$stream.delegate(".focus_comment_textarea", "click", function(e){
|
$stream.delegate(".focus_comment_textarea", "click", function(e){
|
||||||
Stream.focusNewComment($(this), e);
|
Stream.focusNewComment($(this), e);
|
||||||
|
|
@ -129,19 +127,7 @@ var Stream = {
|
||||||
commentBlock.find('textarea').focus();
|
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);
|
$(document).ready(Stream.initialize);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue