From 502aaabe8c098d0ec98abe81d4cdc6b2260c5575 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 14 Apr 2016 02:01:40 +0200 Subject: [PATCH] rework js for shared shared content After showmore PR is accepted it should also work well with the showmore addon. This resolves #4 --- templates/wall_thread.tpl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/wall_thread.tpl b/templates/wall_thread.tpl index 395b8f2b29..256a20333b 100644 --- a/templates/wall_thread.tpl +++ b/templates/wall_thread.tpl @@ -439,7 +439,12 @@ $(document).ready(function() { $('li a[href^="message/new"]').attr('rel','modal'); // put shared content in an own wrapper div - $('#wall-item-content-{{$item.id}} .shared_content').after('
'); - $("#wall-item-content-{{$item.id}} .shared_header, #wall-item-content-{{$item.id}} .shared_content").appendTo("#wall-item-content-{{$item.id}} .shared-content-wrapper"); + $('#wall-item-content-{{$item.id}} > .shared_content').after('
'); + $("#wall-item-content-{{$item.id}} > .shared_header, #wall-item-content-{{$item.id}} > .shared_content").appendTo("#wall-item-content-{{$item.id}} .shared-content-wrapper"); + + // put shared content in an own wrapper (with showmore addon) + $('#wall-item-content-{{$item.id}} .showmore-content > .shared_content').parent().after('
'); + $("#wall-item-content-{{$item.id}} .showmore-teaser > .shared_header, #wall-item-content-{{$item.id}} .showmore-content > .shared_header").parent().appendTo("#wall-item-content-{{$item.id}} .shared-content-wrapper"); + }); \ No newline at end of file -- 2.39.5