]> git.mxchange.org Git - friendica.git/commitdiff
wall thread: add wall-item-body div for post content
authorrabuzarus <trebor@central-unit>
Thu, 14 Apr 2016 01:42:36 +0000 (03:42 +0200)
committerrabuzarus <trebor@central-unit>
Thu, 14 Apr 2016 01:42:36 +0000 (03:42 +0200)
templates/search_item.tpl
templates/wall_thread.tpl

index a5baf704230d6936fba5ab9f4a4b906fd06dcc59..937dbc5ccfcd825c91f5a9554ec290ebcfd4a417 100644 (file)
                                {{/if}}
 
                                {{if $item.title}}
-                               <span><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
+                               <span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
                                {{/if}}
 
-                               {{$item.body}}
+                               <div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body}}</div>
                        </div>
 
                        <!-- TODO -->
@@ -245,7 +245,11 @@ $(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}} > #wall-item-body-{{$item.id}} > .shared_content').after('<div class="shared-content-wrapper content-card"></div>');
+  $("#wall-item-content-{{$item.id}} > #wall-item-body-{{$item.id}} > .shared_header, #wall-item-content-{{$item.id}} > #wall-item-body-{{$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>
index 256a20333b9dda6d389f9959bc77d4c52ea7eaa3..c8aea4a1bac606bd9817841558ea0215e9338676 100644 (file)
@@ -250,10 +250,10 @@ as the value of $top_child_total (this is done at the end of this file)
                        {{/if}}
 
                        {{if $item.title}}
-                       <span><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
+                       <span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
                        {{/if}}
 
-                       {{$item.body}}
+                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body}}</div>
                </div>
 
                <!-- TODO -->
@@ -439,12 +439,11 @@ $(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}} > #wall-item-body-{{$item.id}} > .shared_content').after('<div class="shared-content-wrapper content-card"></div>');
+  $("#wall-item-content-{{$item.id}} > #wall-item-body-{{$item.id}} > .shared_header, #wall-item-content-{{$item.id}} > #wall-item-body-{{$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