r95727 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95726‎ | r95727 | r95728 >
Date:23:34, 29 August 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
compare license name to license name instead of license template
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js
@@ -80,6 +80,7 @@
8181 $input.click( function() { _this.$selector.trigger( 'changeLicenses' ); } );
8282 // this is added so that setValues() can find one (or more) checkboxes to check - represent values without wikitext
8383 $input.data( 'templateString', origTemplateString );
 84+ $input.data( 'licenseName', name );
8485 _this.inputs.push( $input );
8586
8687 var messageKey = mw.isDefined( license.props['msg'] ) ? license.props.msg : '[missing msg for ' + license.name + ']';
@@ -152,9 +153,9 @@
153154 setValues: function( values ) {
154155 var _this = this;
155156 $j.each( _this.inputs, function( i, $input ) {
156 - var templateString = $input.data( 'templateString' );
 157+ var licenseName = $input.data( 'licenseName' );
157158 // !! to ensure boolean.
158 - $input.attr( 'checked', !!values[templateString] );
 159+ $input.attr( 'checked', !!values[licenseName] );
159160 } );
160161 // we use the selector because events can't be unbound unless they're in the DOM.
161162 _this.$selector.trigger( 'changeLicenses' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r958871.17wmf1: MFT UploadWizard fixes r95691, r95726, r95727, r95793, r95815, r958...catrope17:10, 31 August 2011

Status & tagging log