From: rabuzarus <> Date: Thu, 14 Apr 2016 00:01:40 +0000 (+0200) Subject: rework js for shared shared content X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=502aaabe8c098d0ec98abe81d4cdc6b2260c5575;p=friendica.git rework js for shared shared content After showmore PR is accepted it should also work well with the showmore addon. This resolves #4 --- 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