r66721 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66720‎ | r66721 | r66722 >
Date:14:02, 21 May 2010
Author:hartman
Status:ok
Tags:
Comment:
Bug 23580. Add two new jquery events, LivePreviewPrepare and LivePreviewDone.

Scripts like Navigation Popups can use this to bind to these events so they can
setup their code to work with the previews.

Patch by User:Amalthea
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/skins/common/preview.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/preview.js
@@ -4,6 +4,8 @@
55
66 function doLivePreview( e ) {
77 e.preventDefault();
 8+
 9+ $j( mw ).trigger( 'LivePreviewPrepare' );
810
911 var postData = $j('#editform').formToArray();
1012 postData.push( { 'name' : 'wpPreview', 'value' : '1' } );
@@ -45,6 +47,8 @@
4648 } );
4749
4850 loadSpinner.remove();
 51+
 52+ $j( mw ).trigger( 'LivePreviewDone', [copyElements] );
4953 } );
5054 }
5155
Index: trunk/phase3/CREDITS
@@ -66,6 +66,7 @@
6767 == Patch Contributors ==
6868 * Agbad
6969 * Ahmad Sherif
 70+* Amalthea
7071 * Antonio Ospite
7172 * Azliq7
7273 * Bawolff
Index: trunk/phase3/RELEASE-NOTES
@@ -73,6 +73,8 @@
7474 * (bug 23429) Added new hook WatchlistEditorBuildRemoveLine
7575 * (bug 18488) Added maintenance script refreshCategoryCounts.php
7676 * (bug 22844) Added support for WinCache object caching
 77+* (bug 23580) Add two new events to LivePreview so that scripts can be
 78+ notified about the beginning and finishing of LivePreview actions
7779
7880 === Bug fixes in 1.17 ===
7981 * (bug 17560) Half-broken deletion moved image files to deletion archive

Status & tagging log