Index: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -1339,23 +1339,17 @@ |
1340 | 1340 | $j.each( uploads, function( i, upload ) { |
1341 | 1341 | $filenameList.append( $j( '<li></li>' ).append( upload.title.getMain() ) ); |
1342 | 1342 | } ); |
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 | + |
1360 | 1354 | return $j( '<div></div>' ) |
1361 | 1355 | .append( $j( '<p></p>' ).append( dialogText ), $filenameList ) |
1362 | 1356 | .dialog( { |