r69821 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69820‎ | r69821 | r69822 >
Date:22:52, 23 July 2010
Author:adam
Status:deferred
Tags:
Comment:
Fix for bug 24474, and some general code clean up
Modified paths:
  • /trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php (modified) (history)
  • /trunk/extensions/LiquidThreads/lqt.css (modified) (history)
  • /trunk/extensions/LiquidThreads/lqt.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php
@@ -271,6 +271,7 @@
272272 'lqt-drag-setsortkey' => "Adjust post's position on the page",
273273 'lqt-drag-bump' => 'Move post to top of discussion page',
274274 'lqt-drag-save' => 'Confirm',
 275+ 'lqt-drag-title' => 'Confirm Drag',
275276 'lqt-drag-reason' => 'Reason:',
276277 'lqt-drag-subject' => 'Subject for new thread:',
277278 'lqt-edit-signature' => '(edit signature)',
Index: trunk/extensions/LiquidThreads/lqt.css
@@ -485,7 +485,9 @@
486486 top: 15px;
487487 height: 32px;
488488 }
489 -
 489+.TalkpagePager_nav {
 490+ margin: 30px auto 10px;
 491+}
490492 /* Float Clearing - If you confused, http://www.positioniseverything.net/easyclearing.html */
491493 .lqt_thread_heading:after
492494 {
Index: trunk/extensions/LiquidThreads/lqt.js
@@ -594,6 +594,7 @@
595595 'setupThread' : function(threadContainer) {
596596 var prefixLength = "lqt_thread_id_".length;
597597 // add the interruption class if it needs it
 598+ // Fixme - misses a lot of cases
598599 $parentWrapper = $j( threadContainer )
599600 .closest( '.lqt-thread-wrapper' ).parent().closest( '.lqt-thread-wrapper' );
600601 if( $parentWrapper.next( '.lqt-thread-wrapper' ).length > 0 ) {
@@ -817,7 +818,6 @@
818819 $j('body').prepend(dialog);
819820
820821 var dialogOptions = {
821 - 'AutoOpen' : true,
822822 'width' : 600
823823 };
824824
@@ -878,29 +878,12 @@
879879 };
880880
881881 var newCallback = function( data ) {
882 - // Grab the thread ID
883 - var newThreadID = data.threadaction.thread['thread-id'];
884 - var html = data.threadaction.thread['html'];
885 -
886 - var newThread = $j(html);
887 -
888 - if ( $j('.lqt_toc').length ) {
889 - $j( '.lqt-thread-wrapper' ).prepend( newThread );
890 - } else {
891 - $j('.lqt-no-threads').replaceWith( newThread );
892 - }
893 -
894 - $j(newThread).find( '.lqt-post-wrapper').each(
895 - function() {
896 - // Set up thread.
897 - liquidThreads.setupThread( $j(this) );
898 -
899 - targetOffset = $j(this).offset().top;
900 - $j('html,body').animate(
901 - {scrollTop: targetOffset},
902 - 'slow');
903 - }
904 - );
 882+ var $newThread = $j( data.threadaction.thread['html'] );
 883+ $j( '.lqt-threads' ).prepend( $newThread );
 884+ // remove the no threads message if it's on the page
 885+ $j('.lqt-no-threads').remove();
 886+ liquidThreads.setupThread( $newThread.find( '.lqt-post-wrapper' ) );
 887+ $j( 'html,body' ).animate( { scrollTop: $newThread.offset().top }, 'slow' );
905888 };
906889
907890 var editCallback = function( data ) {
@@ -1293,11 +1276,15 @@
12941277 confirmDialog.append(actionSummary);
12951278
12961279 // Summary prompt
1297 - var summaryPrompt = $j('<p/>').text( wgLqtMessages['lqt-drag-reason'] );
 1280+ var summaryWrapper = $j('<p/>');
 1281+ var summaryPrompt = $j('<label for="reason" />').text( wgLqtMessages['lqt-drag-reason'] );
12981282 var summaryField = $j('<input type="text" size="45"/>');
1299 - summaryField.addClass( 'lqt-drag-confirm-reason' ).attr('name', 'reason');
1300 - summaryPrompt.append( summaryField );
1301 - confirmDialog.append( summaryPrompt );
 1283+ summaryField.addClass( 'lqt-drag-confirm-reason' )
 1284+ .attr( 'name', 'reason' )
 1285+ .attr( 'id', 'reason' );
 1286+ summaryWrapper.append( summaryPrompt );
 1287+ summaryWrapper.append( summaryField );
 1288+ confirmDialog.append( summaryWrapper );
13021289
13031290 if ( typeof params.reason != 'undefined' ) {
13041291 summaryField.val(params.reason);
@@ -1349,8 +1336,8 @@
13501337 liquidThreads.submitDragDrop( thread, params,
13511338 successCallback );
13521339 };
1353 - confirmDialog.dialog( { 'AutoOpen' : true, 'buttons' : buttons,
1354 - 'modal' : true } );
 1340+ confirmDialog.dialog( { 'title': wgLqtMessages['lqt-drag-title'],
 1341+ 'buttons' : buttons, 'modal' : true, 'width': 550 } );
13551342 },
13561343
13571344 'submitDragDrop' : function( thread, params, callback ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r69826Follow-up r69821: Consistency tweakraymond08:55, 24 July 2010

Status & tagging log