r56075 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56074‎ | r56075 | r56076 >
Date:21:58, 8 September 2009
Author:werdna
Status:deferred
Tags:
Comment:
Add a "loading" spinner for live preview
Modified paths:
  • /trunk/phase3/skins/common/preview.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/preview.js
@@ -20,6 +20,10 @@
2121 $j('.templatesUsed').slideUp();
2222 $j('.hiddencats').slideUp();
2323
 24+ // Display a loading graphic
 25+ var loadSpinner = $j('<div class="mw-ajax-loader"/>');
 26+ $j('#wikiPreview').before( loadSpinner );
 27+
2428 var page = $j('<html/>');
2529 page.load( wgScript+'?action=submit',
2630 postData,
@@ -37,6 +41,8 @@
3842 $j(copyElements[i]).attr( 'class', newClasses );
3943 }
4044
 45+ loadSpinner.remove();
 46+
4147 $j('#wikiPreview').slideDown();
4248 } );
4349 }

Status & tagging log