r88042 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88041‎ | r88042 | r88043 >
Date:10:48, 14 May 2011
Author:santhosh
Status:deferred
Tags:
Comment:
Adding labels for the radio buttons
Modified paths:
  • /trunk/extensions/WebFonts/js/webfonts.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/js/webfonts.js
@@ -133,11 +133,16 @@
134134 .attr("name","font")
135135 .attr("id","webfont-"+config[scheme])
136136 .attr("value",config[scheme] );
137 -
 137+
 138+ $fontlabel = $( '<label />' )
 139+ .attr("for","webfont-"+config[scheme])
 140+ .append( $fontlink )
 141+ .append( config[scheme] )
 142+
138143 $fontmenuitem = $( '<li />' )
139144 .val( config[scheme] )
140 - .append( $fontlink )
141 - .append( config[scheme] );
 145+ .append( $fontlabel )
 146+
142147
143148 haveSchemes = true;
144149 //some closure trick :)
@@ -153,14 +158,21 @@
154159 .attr("type","radio")
155160 .attr("name","font")
156161 .attr("value","webfont-none")
 162+ .attr("id","webfont-none")
157163 .click( function( event ) {
158164 $.webfonts.set( 'none');
159165 });
 166+
 167+ $resetlabel = $( '<label />' )
 168+ .attr("for","webfont-none")
 169+ .append( $resetlink )
 170+ .append( mw.msg("webfonts-reset"));
 171+
160172 $resetlinkitem = $( '<li />' )
161173 .val( 'none')
162 - .append( $resetlink )
163 - .append( mw.msg("webfonts-reset"));
 174+ .append( $resetlabel )
164175
 176+
165177 $fontsmenu.append($resetlinkitem);
166178
167179 if ( !haveSchemes ) {

Status & tagging log