Index: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/jquery/jquery.mwCoolCats.js |
— | — | @@ -24,21 +24,14 @@ |
25 | 25 | }; |
26 | 26 | |
27 | 27 | var confirmIt = function() { |
28 | | - var buttons = [ |
29 | | - { |
30 | | - text: gM( 'mw-coolcats-confirm-new-cancel' ), |
31 | | - click: function() { |
32 | | - $( this ).dialog( "close" ); |
33 | | - } |
34 | | - }, |
35 | | - { |
36 | | - text: gM( 'mw-coolcats-confirm-new-ok' ), |
37 | | - click: function() { |
38 | | - insertIt(); |
39 | | - $( this ).dialog( "close" ); |
40 | | - } |
41 | | - } |
42 | | - ]; |
| 28 | + var buttons = {}; |
| 29 | + buttons[ gM( 'mw-coolcats-confirm-new-cancel' ) ] = function() { |
| 30 | + $( this ).dialog( "close" ); |
| 31 | + }; |
| 32 | + buttons[ gM( 'mw-coolcats-confirm-new-ok' ) ] = function() { |
| 33 | + insertIt(); |
| 34 | + $( this ).dialog( "close" ); |
| 35 | + }; |
43 | 36 | $j( '<div></div>' ) |
44 | 37 | .msg( 'mw-coolcats-confirm-new', title.getMainText() ) |
45 | 38 | .dialog( { |