http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95727

Revision: 95727
Author:   jeroendedauw
Date:     2011-08-29 23:34:27 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
compare license name to license name instead of license template

Modified Paths:
--------------
    trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js

Modified: trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js      
2011-08-29 23:25:38 UTC (rev 95726)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js      
2011-08-29 23:34:27 UTC (rev 95727)
@@ -80,6 +80,7 @@
                                $input.click( function() { 
_this.$selector.trigger( 'changeLicenses' ); } );
                                // this is added so that setValues() can find 
one (or more) checkboxes to check - represent values without wikitext
                                $input.data( 'templateString', 
origTemplateString );
+                               $input.data( 'licenseName', name );
                                _this.inputs.push( $input );
                                
                                var messageKey = mw.isDefined( 
license.props['msg'] ) ? license.props.msg : '[missing msg for ' + license.name 
+ ']';
@@ -152,9 +153,9 @@
        setValues: function( values ) {
                var _this = this;
                $j.each( _this.inputs, function( i, $input ) {
-                       var templateString = $input.data( 'templateString' );
+                       var licenseName = $input.data( 'licenseName' );
                        // !! to ensure boolean.
-                       $input.attr( 'checked', !!values[templateString] );
+                       $input.attr( 'checked', !!values[licenseName] );
                } );
                // we use the selector because events can't be unbound unless 
they're in the DOM.
                _this.$selector.trigger( 'changeLicenses' );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to