Update now handles threaded items.
This commit is contained in:
parent
8ea3087342
commit
25015d3ab9
|
@ -582,11 +582,13 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
|
||||||
|
|
||||||
$item_result['children'] = array();
|
$item_result['children'] = array();
|
||||||
if(count($item['children'])) {
|
if(count($item['children'])) {
|
||||||
|
$collapse_all_children = $collapse_all;
|
||||||
if(!$toplevelpost && !$collapse_all)
|
if(!$toplevelpost && !$collapse_all)
|
||||||
$collapse_all = true;
|
$collapse_all_children = true;
|
||||||
$item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, $collapse_all);
|
$item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, $collapse_all_children);
|
||||||
}
|
}
|
||||||
$item_result['private'] = $item['private'];
|
$item_result['private'] = $item['private'];
|
||||||
|
$item_result['toplevel'] = ($toplevelpost ? 'toplevel_item' : '');
|
||||||
$result[] = $item_result;
|
$result[] = $item_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -812,7 +814,6 @@ function conversation(&$a, $items, $mode, $update, $preview = false, $thr_c = fa
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|
||||||
// Figure out how many comments each parent has
|
// Figure out how many comments each parent has
|
||||||
// (Comments all have gravity of 6)
|
// (Comments all have gravity of 6)
|
||||||
// Store the result in the $comments array
|
// Store the result in the $comments array
|
||||||
|
|
|
@ -280,8 +280,7 @@
|
||||||
//});
|
//});
|
||||||
|
|
||||||
// add a new thread
|
// add a new thread
|
||||||
|
$('.toplevel_item',data).each(function() {
|
||||||
$('.tread-wrapper',data).each(function() {
|
|
||||||
var ident = $(this).attr('id');
|
var ident = $(this).attr('id');
|
||||||
|
|
||||||
if($('#' + ident).length == 0 && profile_page == 1) {
|
if($('#' + ident).length == 0 && profile_page == 1) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;">
|
<div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;">
|
||||||
{{endif}}
|
{{endif}}
|
||||||
<div id="tread-wrapper-$item.id" class="tread-wrapper">
|
<div id="tread-wrapper-$item.id" class="tread-wrapper $item.toplevel">
|
||||||
<a name="$item.id" ></a>
|
<a name="$item.id" ></a>
|
||||||
<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >
|
<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >
|
||||||
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
||||||
|
|
Loading…
Reference in a new issue