Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js |
— | — | @@ -80,6 +80,7 @@ |
81 | 81 | $input.click( function() { _this.$selector.trigger( 'changeLicenses' ); } ); |
82 | 82 | // this is added so that setValues() can find one (or more) checkboxes to check - represent values without wikitext |
83 | 83 | $input.data( 'templateString', origTemplateString ); |
| 84 | + $input.data( 'licenseName', name ); |
84 | 85 | _this.inputs.push( $input ); |
85 | 86 | |
86 | 87 | var messageKey = mw.isDefined( license.props['msg'] ) ? license.props.msg : '[missing msg for ' + license.name + ']'; |
— | — | @@ -152,9 +153,9 @@ |
153 | 154 | setValues: function( values ) { |
154 | 155 | var _this = this; |
155 | 156 | $j.each( _this.inputs, function( i, $input ) { |
156 | | - var templateString = $input.data( 'templateString' ); |
| 157 | + var licenseName = $input.data( 'licenseName' ); |
157 | 158 | // !! to ensure boolean. |
158 | | - $input.attr( 'checked', !!values[templateString] ); |
| 159 | + $input.attr( 'checked', !!values[licenseName] ); |
159 | 160 | } ); |
160 | 161 | // we use the selector because events can't be unbound unless they're in the DOM. |
161 | 162 | _this.$selector.trigger( 'changeLicenses' ); |