r82190 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82189‎ | r82190 | r82191 >
Date:20:55, 15 February 2011
Author:mah
Status:ok
Tags:
Comment:
trailing whitespace fixup
Modified paths:
  • /trunk/phase3/skins/common/preview.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/preview.js
@@ -6,31 +6,31 @@
77 e.preventDefault();
88
99 $( mw ).trigger( 'LivePreviewPrepare' );
10 -
 10+
1111 var postData = $('#editform').formToArray();
1212 postData.push( { 'name' : 'wpPreview', 'value' : '1' } );
13 -
 13+
1414 // Hide active diff, used templates, old preview if shown
1515 var copyElements = ['#wikiPreview', '.templatesUsed', '.hiddencats',
1616 '#catlinks'];
1717 var copySelector = copyElements.join(',');
1818
1919 $.each( copyElements, function(k,v) { $(v).fadeOut('fast'); } );
20 -
 20+
2121 // Display a loading graphic
2222 var loadSpinner = $('<div class="mw-ajax-loader"/>');
2323 $('#wikiPreview').before( loadSpinner );
24 -
 24+
2525 var page = $('<div/>');
2626 var target = $('#editform').attr('action');
27 -
 27+
2828 if ( !target ) {
2929 target = window.location.href;
3030 }
31 -
 31+
3232 page.load( target + ' ' + copySelector, postData,
3333 function() {
34 -
 34+
3535 for( var i=0; i<copyElements.length; ++i) {
3636 // For all the specified elements, find the elements in the loaded page
3737 // and the real page, empty the element in the real page, and fill it
@@ -40,12 +40,12 @@
4141 var newClasses = page.find( copyElements[i] ).attr('class');
4242 $(copyElements[i]).attr( 'class', newClasses );
4343 }
44 -
 44+
4545 $.each( copyElements, function(k,v) {
4646 // Don't belligerently show elements that are supposed to be hidden
4747 $(v).fadeIn( 'fast', function() { $(this).css('display', ''); } );
4848 } );
49 -
 49+
5050 loadSpinner.remove();
5151
5252 $( mw ).trigger( 'LivePreviewDone', [copyElements] );

Status & tagging log