]> git.mxchange.org Git - friendica.git/commitdiff
fixing conversation updates
authorfriendica <info@friendica.com>
Fri, 25 Nov 2011 00:42:12 +0000 (16:42 -0800)
committerfriendica <info@friendica.com>
Fri, 25 Nov 2011 00:42:12 +0000 (16:42 -0800)
include/conversation.php
js/main.js
view/conversation.tpl
view/theme/duepuntozero/conversation.tpl
view/theme/loozah/conversation.tpl
view/theme/testbubble/conversation.tpl

index d8adb27c3c37107512a7fc7b815a2dc0dd0ddd78..f7c8d5168e5c5b08194ca7e2db859fdf171c2acf 100644 (file)
@@ -291,7 +291,8 @@ function conversation(&$a, $items, $mode, $update) {
                                $arr = array('item' => $item, 'output' => $tmp_item);
                                call_hooks('display_item', $arr);
 
-                               $threads[$threadsid] .= $arr['output'];
+                               $threads[$threadsid]['id'] = $threadsid;
+                               $threads[$threadsid]['html'] .= $arr['output'];
 
                        }
 
@@ -374,7 +375,9 @@ function conversation(&$a, $items, $mode, $update) {
                                        $comments_collapsed = false;
                                        
                                        $threadsid++;
-                                       $threads[$threadsid] = "";
+                                       $threads[$threadsid]['id'] = $threadsid;
+                                       $threads[$threadsid]['html'] = "";
+
                                }
                                else {
                                        // prevent private email from leaking into public conversation
@@ -393,7 +396,7 @@ function conversation(&$a, $items, $mode, $update) {
                                                // IMPORTANT: the closing </div> in the hide_comments template
                                                // is supplied below in code. 
 
-                                               $threads[$threadsid] .= replace_macros($hide_comments_tpl,array(
+                                               $threads[$threadsid]['html'] .= replace_macros($hide_comments_tpl,array(
                                                        '$id' => $item['parent'],
                                                        '$num_comments' => sprintf( tt('%d comment','%d comments',$comments[$item['parent']]),
                                                                $comments[$item['parent']]),
@@ -404,7 +407,7 @@ function conversation(&$a, $items, $mode, $update) {
                                        }
                                }
                                if(($comments[$item['parent']] > 2) && ($comments_seen == ($comments[$item['parent']] - 1))) {
-                                       $threads[$threadsid] .= '</div>';
+                                       $threads[$threadsid]['html'] .= '</div>';
                                }
 
                                $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
@@ -621,17 +624,12 @@ function conversation(&$a, $items, $mode, $update) {
                                $arr = array('item' => $item, 'output' => $tmp_item);
                                call_hooks('display_item', $arr);
 
-                               $threads[$threadsid] .= $arr['output'];
+                               $threads[$threadsid]['html'] .= $arr['output'];
                        }
                }
        }
 
 
-       // if author collapsing is in force but didn't get closed, close it off now.
-
-       /*if($blowhard_count >= 3)
-               $threads[$threadsid] .= '</div>';*/
-
        $page_template = get_markup_template("conversation.tpl");
        $o .= replace_macros($page_template, array(
                '$threads' => $threads,
index af63ac0baa1939a195c52d0bd2e0544c18e9d480..ba4bb36efc1afef28ce1572669229277f85b45a3 100644 (file)
                        //                      $('#' + ident).hide();
                        //      }
                        //});
-                       $('.wall-item-outside-wrapper',data).each(function() {
+                       $('.tread-wrapper',data).each(function() {
                                var ident = $(this).attr('id');
                                if($('#' + ident).length == 0) {
                                        $('img',this).each(function() {
index 86445aab8e2d41aedfcccda75bce8b22ed8eea56..7d4e7d2621e04227abaf0b42a0c9ccced9d50473 100644 (file)
@@ -1,6 +1,6 @@
 {{ for $threads as $thread }}
-<div class="tread-wrapper">
-       $thread
+<div id="tread-wrapper-$thread.id" class="tread-wrapper">
+       $thread.html
 </div>
 {{ endfor }}
 
index 1a0fb33a82bd4cc2bf218af78d379d0a394377b8..33cedfb1ec932de47ad54dd136cb996635a757d2 100644 (file)
@@ -1,6 +1,6 @@
 {{ for $threads as $thread }}
-<div class="tread-wrapper">
-       $thread
+<div id="tread-wrapper-$thread.id" class="tread-wrapper">
+       $thread.html
 </div>
 {{ endfor }}
 
index 1a0fb33a82bd4cc2bf218af78d379d0a394377b8..33cedfb1ec932de47ad54dd136cb996635a757d2 100644 (file)
@@ -1,6 +1,6 @@
 {{ for $threads as $thread }}
-<div class="tread-wrapper">
-       $thread
+<div id="tread-wrapper-$thread.id" class="tread-wrapper">
+       $thread.html
 </div>
 {{ endfor }}
 
index 1a0fb33a82bd4cc2bf218af78d379d0a394377b8..33cedfb1ec932de47ad54dd136cb996635a757d2 100644 (file)
@@ -1,6 +1,6 @@
 {{ for $threads as $thread }}
-<div class="tread-wrapper">
-       $thread
+<div id="tread-wrapper-$thread.id" class="tread-wrapper">
+       $thread.html
 </div>
 {{ endfor }}