Index: trunk/extensions/WebFonts/js/webfonts.js |
— | — | @@ -63,12 +63,10 @@ |
64 | 64 | 'font-size': $.webfonts.oldconfig["font-size"] |
65 | 65 | }); |
66 | 66 | //we need to reset the fonts of Input and Select explicitly. |
67 | | - $("input").css('font-family', $.webfonts.oldconfig["font-family"]); |
68 | | - $("select").css('font-family', $.webfonts.oldconfig["font-family"]); |
| 67 | + $("input, select").css('font-family', $.webfonts.oldconfig["font-family"]); |
69 | 68 | |
70 | 69 | // Reset the fonts applied for tags with lang attribute. |
71 | | - $(".webfonts-lang-attr").css( 'font-family', 'none' ); |
72 | | - $(".webfonts-lang-attr").removeClass( 'webfonts-lang-attr' ); |
| 70 | + $(".webfonts-lang-attr").css( 'font-family', 'none' ).removeClass( 'webfonts-lang-attr' ); |
73 | 71 | |
74 | 72 | //remove the cookie |
75 | 73 | $.cookie( 'webfonts-font', 'none', { 'path': '/', 'expires': 30 } ); |
— | — | @@ -186,7 +184,7 @@ |
187 | 185 | var cookieFont = $.cookie( 'webfonts-font' ); |
188 | 186 | var selectedFont = null; |
189 | 187 | // check whether this font is for the current userlang/contentlang |
190 | | - if ( $.inArray(cookieFont, config) >=0 ){ |
| 188 | + if ( $.inArray(cookieFont, config) !== -1){ |
191 | 189 | selectedFont = cookieFont; |
192 | 190 | } |
193 | 191 | else{ |
— | — | @@ -197,7 +195,7 @@ |
198 | 196 | if ( selectedFont && selectedFont !== 'none' ) { |
199 | 197 | $.webfonts.set( selectedFont ); |
200 | 198 | //mark it as checked |
201 | | - $( '#'+fontID( selectedFont ) ).attr( 'checked', 'checked' ); |
| 199 | + $( '#'+fontID( selectedFont ) ).prop( 'checked', true ); |
202 | 200 | } |
203 | 201 | |
204 | 202 | $.webfonts.loadFontsForFontFamilyStyle(); |
— | — | @@ -222,8 +220,7 @@ |
223 | 221 | if( languages[this.lang] && ( !this.style.fontFamily || this.style.fontFamily == "none" ) ) { |
224 | 222 | fontFamily = languages[this.lang][0]; |
225 | 223 | $.webfonts.addFont( fontFamily ); |
226 | | - $(this).css('font-family', fontFamily); |
227 | | - $(this).addClass('webfonts-lang-attr'); |
| 224 | + $(this).css('font-family', fontFamily).addClass('webfonts-lang-attr'); |
228 | 225 | } |
229 | 226 | }); |
230 | 227 | |