http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88694
Revision: 88694
Author: dale
Date: 2011-05-23 22:29:54 +0000 (Mon, 23 May 2011)
Log Message:
-----------
0 or 1 based checked attribute causes trouble with 1.6.1 checked attribute
handing, use Boolean value instead
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-05-23 21:43:01 UTC (rev 88693)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizardLicenseInput.js
2011-05-23 22:29:54 UTC (rev 88694)
@@ -153,8 +153,8 @@
var _this = this;
$j.each( _this.inputs, function( i, $input ) {
var templateString = $input.data( 'templateString' );
- // !! to ensure boolean. ~~ to cast to 0 or 1. Similar
to php's (int) (bool) val
- $input.attr( 'checked', ~~!!values[templateString] );
+ // !! to ensure boolean.
+ $input.attr( 'checked', !!values[templateString] );
} );
// 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