fixed video embedding in comments
This commit is contained in:
parent
21d0fcf47a
commit
73f852c6c2
2 changed files with 8 additions and 7 deletions
|
|
@ -16,8 +16,8 @@
|
||||||
.from
|
.from
|
||||||
= person_link(post.author, :class => 'author')
|
= person_link(post.author, :class => 'author')
|
||||||
%time.timeago{:datetime => post.created_at}
|
%time.timeago{:datetime => post.created_at}
|
||||||
%p
|
%p
|
||||||
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
= render 'status_messages/status_message', :post => post, :photos => post.photos
|
||||||
|
|
||||||
.info
|
.info
|
||||||
- if post.public?
|
- if post.public?
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
var service = $this.data("host"),
|
var service = $this.data("host"),
|
||||||
container = document.createElement("div"),
|
container = document.createElement("div"),
|
||||||
$container = $(container).attr("class", "video-container"),
|
$container = $(container).attr("class", "video-container"),
|
||||||
$videoContainer = $this.closest(".from").siblings(".video-container");
|
$videoContainer = $this.closest('.content').children(".video-container");
|
||||||
|
|
||||||
if($videoContainer.length) {
|
if($videoContainer.length) {
|
||||||
$videoContainer.slideUp("fast", function() { $(this).detach(); });
|
$videoContainer.slideUp("fast", function() { $(this).detach(); });
|
||||||
|
|
@ -40,8 +40,9 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
$container.hide()
|
$container.hide()
|
||||||
.insertBefore($this.closest(".from").siblings(".info"))
|
.insertAfter($this.parent())
|
||||||
.slideDown('fast');
|
.slideDown('fast');
|
||||||
|
|
||||||
|
|
||||||
$this.click(function() {
|
$this.click(function() {
|
||||||
$container.slideUp('fast', function() {
|
$container.slideUp('fast', function() {
|
||||||
|
|
@ -55,8 +56,8 @@
|
||||||
this.registerServices();
|
this.registerServices();
|
||||||
|
|
||||||
var $post = $("#main_stream").children(".stream_element:first"),
|
var $post = $("#main_stream").children(".stream_element:first"),
|
||||||
$contentParagraph = $post.children(".content").children(".from").children("p"),
|
$contentParagraph = $post.children(".content").children("p"),
|
||||||
$infoDiv = $contentParagraph.closest(".from").siblings(".info");
|
$infoDiv = $contentParagraph.prev(".from").siblings(".info");
|
||||||
|
|
||||||
this.canEmbed = $infoDiv.length;
|
this.canEmbed = $infoDiv.length;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue