r86889 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86888‎ | r86889 | r86890 >
Date:19:25, 25 April 2011
Author:neilk
Status:ok
Tags:
Comment:
we do not have jquery ui that can support text/click syntax in production, going back to old message -> click handler
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -1339,23 +1339,17 @@
13401340 $j.each( uploads, function( i, upload ) {
13411341 $filenameList.append( $j( '<li></li>' ).append( upload.title.getMain() ) );
13421342 } );
1343 - var buttons = [
1344 - {
1345 - text: gM( 'mwe-upwiz-remove', uploads.length ),
1346 - click: function() {
1347 - $j.each( uploads, function( i, upload ) {
1348 - upload.remove();
1349 - } );
1350 - $j( this ).dialog( 'close' );
1351 - }
1352 - },
1353 - {
1354 - text: gM( 'mwe-upwiz-cancel', uploads.length ),
1355 - click: function() {
1356 - $j( this ).dialog( 'close' );
1357 - }
1358 - }
1359 - ];
 1343+ var buttons = {};
 1344+ buttons[ gM( 'mwe-upwiz-remove', uploads.length ) ] = function() {
 1345+ $j.each( uploads, function( i, upload ) {
 1346+ upload.remove();
 1347+ } );
 1348+ $j( this ).dialog( 'close' );
 1349+ };
 1350+ buttons[ gM( 'mwe-upwiz-cancel', uploads.length ) ] = function() {
 1351+ $j( this ).dialog( 'close' );
 1352+ };
 1353+
13601354 return $j( '<div></div>' )
13611355 .append( $j( '<p></p>' ).append( dialogText ), $filenameList )
13621356 .dialog( {

Follow-up revisions

RevisionCommit summaryAuthorDate
r868911.17wmf1: MFT r86889catrope19:29, 25 April 2011

Status & tagging log