|
Post by Elli on Aug 16, 2019 10:44:18 GMT -7
Move Thread Descriptions Moves Thread Descriptions to a new location. Bottom of Board Template<script> $(function() { // Move Thread Descriptions to new position function moveThreadDescriptions() { var $threadDescription = $('.thread_description_list');
$threadDescription.each(function() { var $this = $(this); var $descriptionText = $this.text(); var $newContainer = $this.closest('.main').find('.js-thread-description');
$this.prev('br').remove(); $newContainer.text($descriptionText).addClass('thread-description'); $this.remove(); }); }
moveThreadDescriptions(); pb.events.on('afterSearch', moveThreadDescriptions); }); </script> Example Thread List Template{foreach $[thread]} <tr id="$[thread.content_id]" class="$[thread.content_class]"> <td class="main clickable"> <span class="link target" title="$[thread.short_content]">$[thread]</span> <div class="js-thread-description"><!-- This is a placeholder for the Thread Descriptions plugin --></div> by $[thread.created_by] $[thread.created_on] </td> .... </tr> {/foreach} Example CSS.threads .main .thread-description { margin: 6px 0 12px; font-size: 14px; line-height: 1; }
|
|