]> git.mxchange.org Git - friendica.git/commitdiff
rework js for shared shared content
authorrabuzarus <>
Thu, 14 Apr 2016 00:01:40 +0000 (02:01 +0200)
committerrabuzarus <>
Thu, 14 Apr 2016 00:01:40 +0000 (02:01 +0200)
After showmore PR is accepted it should also work well with the showmore addon.
This resolves #4

templates/wall_thread.tpl

index 395b8f2b29c1c1865ba1f3bf3828fbe3b52d68e8..256a20333b9dda6d389f9959bc77d4c52ea7eaa3 100644 (file)
@@ -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('<div class="shared-content-wrapper content-card"></div>');
-  $("#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('<div class="shared-content-wrapper content-card"></div>');
+  $("#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('<div class="shared-content-wrapper content-card"></div>');
+  $("#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");
+  
 });
 </script>
\ No newline at end of file