Index: trunk/extensions/LiquidThreads/classes/View.php |
— | — | @@ -1893,11 +1893,6 @@ |
1894 | 1894 | |
1895 | 1895 | $html = ''; |
1896 | 1896 | |
1897 | | - $html .= Xml::openElement( 'div', array( 'class' => 'lqt-thread-wrapper' ) ); |
1898 | | - |
1899 | | - $html .= Xml::element( 'a', array( 'name' => $this->anchorName( $thread ) ), ' ' ); |
1900 | | - $html .= $this->showThreadHeading( $thread ); |
1901 | | - |
1902 | 1897 | $class = $this->threadDivClass( $thread ); |
1903 | 1898 | if ( $levelNum == 1 ) { |
1904 | 1899 | $class .= ' lqt-thread-first'; |
— | — | @@ -1910,6 +1905,8 @@ |
1911 | 1906 | } else { |
1912 | 1907 | $class .= ' lqt-thread-no-subthreads'; |
1913 | 1908 | } |
| 1909 | + |
| 1910 | + $class .= ' lqt-thread-wrapper'; |
1914 | 1911 | |
1915 | 1912 | $html .= Xml::openElement( |
1916 | 1913 | 'div', |
— | — | @@ -1918,6 +1915,9 @@ |
1919 | 1916 | 'id' => 'lqt_thread_id_' . $thread->id() |
1920 | 1917 | ) |
1921 | 1918 | ); |
| 1919 | + |
| 1920 | + $html .= Xml::element( 'a', array( 'name' => $this->anchorName( $thread ) ), ' ' ); |
| 1921 | + $html .= $this->showThreadHeading( $thread ); |
1922 | 1922 | |
1923 | 1923 | // Metadata stuck in the top of the lqt_thread div. |
1924 | 1924 | // Modified time for topmost threads... |
— | — | @@ -2039,7 +2039,7 @@ |
2040 | 2040 | // } |
2041 | 2041 | // } |
2042 | 2042 | |
2043 | | - $this->output->addHTML( Xml::closeElement( 'div' ) . Xml::closeElement( 'div' ) ); |
| 2043 | + $this->output->addHTML( Xml::closeElement( 'div' ) ); |
2044 | 2044 | |
2045 | 2045 | $this->threadNestingLevel--; |
2046 | 2046 | } |
Index: trunk/extensions/LiquidThreads/lqt.js |
— | — | @@ -567,15 +567,15 @@ |
568 | 568 | thread.append( newThreadContent ); |
569 | 569 | thread.attr( 'class', newThread.attr('class') ); |
570 | 570 | |
571 | | - // Replace header content |
572 | | - var newHeader = newContent.filter('#lqt-header-'+threadId); |
573 | | - if ( header.length ) { |
574 | | - var newHeaderContent = $j(newHeader).contents(); |
575 | | - header.append( newHeaderContent ); |
576 | | - } else { |
577 | | - // No existing header, add one before the thread |
578 | | - thread.before(newHeader); |
579 | | - } |
| 571 | +// Replace header content |
| 572 | +// var newHeader = newContent.filter('#lqt-header-'+threadId); |
| 573 | +// if ( header.length ) { |
| 574 | +// var newHeaderContent = $j(newHeader).contents(); |
| 575 | +// header.append( newHeaderContent ); |
| 576 | +// } else { |
| 577 | +// // No existing header, add one before the thread |
| 578 | +// thread.before(newHeader); |
| 579 | +// } |
580 | 580 | |
581 | 581 | // Set up thread. |
582 | 582 | thread.find('.lqt-post-wrapper').each( function() { |
— | — | @@ -872,7 +872,7 @@ |
873 | 873 | var replyCallback = function( data ) { |
874 | 874 | $parent = $j( '#lqt_thread_id_' + data.threadaction.thread['parent-id'] ); |
875 | 875 | $html = $j( data.threadaction.thread['html'] ); |
876 | | - $newThread = $html.find( '#lqt_thread_id_' + data.threadaction.thread['thread-id'] ).parent(); |
| 876 | + $newThread = $html.find( '#lqt_thread_id_' + data.threadaction.thread['thread-id'] ); |
877 | 877 | $parent.find( '.lqt-thread-replies:first' ).append( $newThread ); |
878 | 878 | liquidThreads.setupThread( $newThread.find( '.lqt-post-wrapper' ) ); |
879 | 879 | $j( 'html,body' ).animate({scrollTop: $newThread.offset().top}, 'slow'); |
— | — | @@ -1153,10 +1153,8 @@ |
1154 | 1154 | var firstDropZone = createDropZone(); |
1155 | 1155 | firstDropZone.data( 'sortkey', 'now' ); |
1156 | 1156 | firstDropZone.data( 'parent', 'top' ); |
1157 | | - var firstThread = $j('.lqt-thread-topmost.lqt-thread-first'); |
1158 | | - var firstThreadID = firstThread.find('.lqt-post-wrapper').data('thread-id'); |
1159 | | - var firstHeading = $j('#lqt-header-'+firstThreadID); |
1160 | | - firstHeading.before(firstDropZone); |
| 1157 | + var firstThread = $j('.lqt-thread-topmost:first'); |
| 1158 | + firstThread.before(firstDropZone); |
1161 | 1159 | |
1162 | 1160 | // Now one after every thread |
1163 | 1161 | $j('.lqt-thread-topmost').each( function() { |
— | — | @@ -1171,7 +1169,7 @@ |
1172 | 1170 | } ); |
1173 | 1171 | |
1174 | 1172 | // Now one underneath every thread |
1175 | | - $j('.lqt_thread').each( function() { |
| 1173 | + $j('.lqt_thread').not(thread).each( function() { |
1176 | 1174 | var thread = $j(this); |
1177 | 1175 | var repliesElement = liquidThreads.getRepliesElement( thread ); |
1178 | 1176 | var dropZone = createDropZone(); |
— | — | @@ -1392,44 +1390,17 @@ |
1393 | 1391 | // Do the actual physical movement |
1394 | 1392 | var threadId = thread.find('.lqt-post-wrapper') |
1395 | 1393 | .data('thread-id'); |
1396 | | - var topmost = thread.hasClass('lqt-thread-topmost'); |
1397 | 1394 | |
1398 | | - if ( topmost ) { |
1399 | | - var heading = $j('#lqt-header-'+threadId); |
1400 | | - } |
1401 | | - |
1402 | 1395 | // Assorted ways of returning a thread to its proper place. |
1403 | 1396 | if ( typeof params.insertAfter != 'undefined' ) { |
1404 | | - // Move the heading |
1405 | | - if ( topmost ) { |
1406 | | - heading.remove(); |
1407 | | - params.insertAfter.after(heading); |
1408 | | - thread.remove(); |
1409 | | - heading.after( thread ); |
1410 | | - } else { |
1411 | | - thread.remove(); |
1412 | | - params.insertAfter.after(thread); |
1413 | | - } |
| 1397 | + thread.remove(); |
| 1398 | + params.insertAfter.after(thread); |
1414 | 1399 | } else if ( typeof params.insertBefore != 'undefined' ) { |
1415 | | - if ( topmost ) { |
1416 | | - heading.remove(); |
1417 | | - params.insertBefore.before(heading); |
1418 | | - thread.remove(); |
1419 | | - heading.after( thread ); |
1420 | | - } else { |
1421 | | - thread.remove(); |
1422 | | - params.insertBefore.before( thread ); |
1423 | | - } |
| 1400 | + thread.remove(); |
| 1401 | + params.insertBefore.before( thread ); |
1424 | 1402 | } else if ( typeof params.insertUnder != 'undefined' ) { |
1425 | | - if ( topmost ) { |
1426 | | - heading.remove(); |
1427 | | - params.insertUnder.prepend(heading); |
1428 | | - thread.remove(); |
1429 | | - heading.after(thread); |
1430 | | - } else { |
1431 | | - thread.remove(); |
1432 | | - params.insertUnder.prepend(thread); |
1433 | | - } |
| 1403 | + thread.remove(); |
| 1404 | + params.insertUnder.prepend(thread); |
1434 | 1405 | } |
1435 | 1406 | |
1436 | 1407 | thread.data('thread-id', threadId); |
— | — | @@ -1455,8 +1426,8 @@ |
1456 | 1427 | } |
1457 | 1428 | |
1458 | 1429 | // Kill the heading, if there isn't one. |
1459 | | - if ( !topLevel && wasTopLevel && heading.length ) { |
1460 | | - heading.remove(); |
| 1430 | + if ( !topLevel && wasTopLevel ) { |
| 1431 | + thread.find('h2.lqt_header').remove(); |
1461 | 1432 | } |
1462 | 1433 | |
1463 | 1434 | if ( !wasTopLevel && typeof oldParent != 'undefined' ) { |