Index: branches/wmf/1.18wmf1/extensions/Narayam/resources/images/help.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Index: branches/wmf/1.18wmf1/extensions/Narayam/resources/ext.narayam.core.css |
— | — | @@ -105,7 +105,8 @@ |
106 | 106 | div#narayam-menu-items li.narayam-help-link a { |
107 | 107 | /* @embed */ |
108 | 108 | background: url('images/help.png') no-repeat scroll left center transparent; |
109 | | - padding-left: 15px; |
| 109 | + padding-left: 20px; |
| 110 | + line-height: 1.5em; |
110 | 111 | } |
111 | 112 | |
112 | 113 | li#pt-narayam.narayam-active { |
Index: branches/wmf/1.18wmf1/extensions/WikimediaIncubator/InfoPage.i18n.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | 'wminc-infopage-option-startwiki' => 'If you want to start this wiki, |
40 | 40 | you can [{{fullurl:{{FULLPAGENAME}}|action=edit}} create the page] and follow [[{{MediaWiki:Wminc-manual-url}}|our manual]].', |
41 | 41 | 'wminc-infopage-option-startsister' => 'If you want to start this wiki, you can go to <b>[$2 $1]</b>.', |
42 | | - 'wminc-infopage-option-languages-existing' => 'You can search for [http://www.$1.org existing language editions of $1].', |
| 42 | + 'wminc-infopage-option-languages-existing' => 'You can search for [//www.$1.org existing language editions of $1].', |
43 | 43 | 'wminc-infopage-option-sisterprojects-existing' => 'You can search for existing projects in this language:', |
44 | 44 | 'wminc-infopage-option-sisterprojects-other' => 'You can search for other projects in this language:', |
45 | 45 | 'wminc-infopage-option-multilingual' => 'You can go to a multilingual wiki:', |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.hooks.php |
— | — | @@ -41,8 +41,16 @@ |
42 | 42 | |
43 | 43 | return true; |
44 | 44 | } |
45 | | - |
| 45 | + |
46 | 46 | /** |
| 47 | + * Hook: ResourceLoaderGetConfigVars |
| 48 | + */ |
| 49 | + public static function addConfig( &$vars ) { |
| 50 | + $vars['wgWebFontsHelpPage'] = wfMsgForContent( 'webfonts-help-page' ); |
| 51 | + return true; |
| 52 | + } |
| 53 | + |
| 54 | + /** |
47 | 55 | * UserGetDefaultOptions hook handler. |
48 | 56 | * @param $defaultOptions array |
49 | 57 | * @return bool |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.js |
— | — | @@ -1,4 +1,4 @@ |
2 | | -( function( $ ) { |
| 2 | +( function( $, mw, undefined ) { |
3 | 3 | |
4 | 4 | function fontID( font ) { |
5 | 5 | if ( typeof font !== 'string' ) { |
— | — | @@ -19,28 +19,30 @@ |
20 | 20 | return; |
21 | 21 | } |
22 | 22 | |
23 | | - if ( !( font in mw.webfonts.config.fonts ) ) { |
| 23 | + if ( mw.webfonts.config.fonts[font] === undefined ) { |
24 | 24 | mw.log( 'Requested unknown font', font ); |
25 | 25 | return; |
26 | 26 | } |
27 | | - var config = mw.webfonts.config.fonts[font]; |
| 27 | + var config = mw.webfonts.config.fonts[font], |
| 28 | + $body = $( 'body' ); |
28 | 29 | |
29 | 30 | // Load the style sheet for the font |
30 | 31 | mw.webfonts.addFont( font ); |
31 | | - |
| 32 | + |
32 | 33 | // Save the current font and its size. Used for reset. |
33 | 34 | if ( !mw.webfonts.oldconfig ) { |
34 | | - var $body = $( 'body' ); |
| 35 | + |
35 | 36 | mw.webfonts.oldconfig = { |
36 | 37 | fontFamily: $body.css( 'font-family' ), |
37 | 38 | fontSize: $body.css( 'font-size' ) |
38 | 39 | }; |
39 | 40 | } |
40 | 41 | |
41 | | - // Set the font, fallback fonts.Need to change the fonts of Input Select and Textarea explicitly. |
| 42 | + // Set the font, fallback fonts. |
| 43 | + // Need to change the fonts of Input Select and Textarea explicitly. |
42 | 44 | $( 'body, input, select, textarea' ).css( 'font-family', '"' + font + '", Helvetica, Arial, sans-serif' ); |
43 | 45 | |
44 | | - if ( 'normalization' in config ) { |
| 46 | + if ( config.normalization !== undefined ) { |
45 | 47 | $( document ).ready( function() { |
46 | 48 | mw.webfonts.normalize( config.normalization ); |
47 | 49 | } ); |
— | — | @@ -79,7 +81,7 @@ |
80 | 82 | var searchPattern = new RegExp( search, 'g' ); |
81 | 83 | return $( '*' ).each( function() { |
82 | 84 | var node = this.firstChild, |
83 | | - val, newVal; |
| 85 | + val, newVal; |
84 | 86 | if ( node ) { |
85 | 87 | do { |
86 | 88 | if ( node.nodeType === 3 ) { |
— | — | @@ -101,50 +103,49 @@ |
102 | 104 | * @param fontFamily The font-family name |
103 | 105 | */ |
104 | 106 | loadCSS: function( fontFamily ) { |
105 | | - var fontconfig = mw.webfonts.config.fonts[fontFamily]; |
106 | | - var base = mw.config.get( 'wgExtensionAssetsPath' ) + '/WebFonts/fonts/'; |
107 | | - var fontFormats = []; |
108 | | - var version = "0.0"; |
109 | | - if ( 'version' in fontconfig ) { |
110 | | - version = fontconfig.version; |
111 | | - } |
112 | | - var versionSuffix = "?version=" + version + '&20111213'; |
113 | | - var styleString = |
114 | | - "<style type='text/css'>\n@font-face {\n" |
115 | | - + "\tfont-family: '"+fontFamily+"';\n"; |
| 107 | + var fontconfig = mw.webfonts.config.fonts[fontFamily], |
| 108 | + base = mw.config.get( 'wgExtensionAssetsPath' ) + '/WebFonts/fonts/', |
| 109 | + fontFormats = [], |
| 110 | + version = fontconfig.version || "0.0", |
| 111 | + versionSuffix = "?version=" + version + '&20111213', |
| 112 | + styleString = "<style type='text/css'>" |
| 113 | + + "@font-face { font-family: '"+fontFamily+"';\n", |
| 114 | + ua = navigator.userAgent; |
116 | 115 | |
117 | | - if ( 'eot' in fontconfig ) { |
118 | | - styleString += "\tsrc: url('" + base+ fontconfig.eot + versionSuffix+ "');\n"; |
| 116 | + if ( fontconfig.eot !== undefined ) { |
| 117 | + styleString += "\tsrc: url('" + base + fontconfig.eot + versionSuffix + "');\n"; |
119 | 118 | } |
120 | 119 | |
121 | 120 | styleString += "\tsrc: "; |
| 121 | + |
122 | 122 | // If the font is present locally, use it. |
123 | | - var ua = navigator.userAgent; |
124 | | - if( ua.match( /Android 2\.3/ ) == null ) { |
125 | | - // Android 2.3.x does not respect local() syntax. |
| 123 | + if( ua.match( /Android 2\.3/ ) === null ) { |
| 124 | + // Android 2.3.x does not respect local() syntax. |
126 | 125 | // http://code.google.com/p/android/issues/detail?id=10609 |
127 | | - styleString += "local('"+fontFamily+"'),"; |
| 126 | + styleString += "local('" + fontFamily + "'),"; |
128 | 127 | } |
129 | | - |
130 | | - if ( 'woff' in fontconfig ) { |
| 128 | + |
| 129 | + if ( fontconfig.woff !== undefined ) { |
131 | 130 | fontFormats.push( "\t\turl('" + base + fontconfig.woff + versionSuffix + "') format('woff')" ); |
132 | 131 | } |
133 | 132 | |
134 | | - if ( 'svg' in fontconfig ) { |
| 133 | + if ( fontconfig.svg !== undefined ) { |
135 | 134 | fontFormats.push( "\t\turl('" + base + fontconfig.svg + versionSuffix + "#" + fontFamily + "') format('svg')" ); |
136 | 135 | } |
137 | 136 | |
138 | | - if ( 'ttf' in fontconfig ) { |
| 137 | + if ( fontconfig.ttf !== undefined ) { |
139 | 138 | fontFormats.push( "\t\turl('" + base + fontconfig.ttf + versionSuffix + "') format('truetype')" ); |
140 | 139 | } |
141 | | - |
| 140 | + |
142 | 141 | styleString += fontFormats.join() + ";\n"; |
143 | | - styleString += "\tfont-weight: normal;\n}\n</style>\n"; |
| 142 | + styleString += "\tfont-weight: normal;}"; |
144 | 143 | |
145 | | - //inject the css to the head of the page. |
| 144 | + styleString += "\n</style>\n"; |
| 145 | + // inject the css to the head of the page. |
| 146 | + // mw.util.addCSS wont work with fontface, and crashes IE. |
146 | 147 | $( styleString ).appendTo( 'head' ); |
147 | 148 | }, |
148 | | - |
| 149 | + |
149 | 150 | /** |
150 | 151 | * Add a font to the page. |
151 | 152 | * This method ensures that css are not duplicated and |
— | — | @@ -155,13 +156,13 @@ |
156 | 157 | // Avoid duplicate loading |
157 | 158 | if ( $.inArray( fontFamilyName, mw.webfonts.fonts ) === -1 ) { |
158 | 159 | // Check whether the requested font is available. |
159 | | - if ( fontFamilyName in mw.webfonts.config.fonts ) { |
| 160 | + if ( mw.webfonts.config.fonts[fontFamilyName] !== undefined ) { |
160 | 161 | mw.webfonts.loadCSS( fontFamilyName ); |
161 | 162 | mw.webfonts.fonts.push( fontFamilyName ); |
162 | 163 | } |
163 | 164 | } |
164 | 165 | }, |
165 | | - |
| 166 | + |
166 | 167 | /** |
167 | 168 | * Setup the font selection menu. |
168 | 169 | * It also apply the font from cookie, if any. |
— | — | @@ -178,52 +179,53 @@ |
179 | 180 | return; |
180 | 181 | } |
181 | 182 | } |
182 | | - |
183 | | - var config = []; |
184 | | - var languages = mw.webfonts.config.languages; |
185 | | - var requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )]; |
186 | 183 | |
187 | | - for ( var i = 0; i < requested.length; i++ ) { |
188 | | - if ( requested[i] in languages ) { |
189 | | - var fonts = languages[requested[i]]; |
190 | | - for ( var j = 0; j < fonts.length; j++ ) { |
191 | | - if ( $.inArray( fonts[j], config ) === -1 ) { |
192 | | - config.push( fonts[j] ); |
| 184 | + var fonts = [], |
| 185 | + languages = mw.webfonts.config.languages, |
| 186 | + requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )], |
| 187 | + i, j; |
| 188 | + |
| 189 | + for ( i = 0; i < requested.length; i++ ) { |
| 190 | + if ( languages[requested[i]] !== undefined ) { |
| 191 | + fonts = languages[requested[i]]; |
| 192 | + for ( j = 0; j < fonts.length; j++ ) { |
| 193 | + if ( $.inArray( fonts[j], fonts ) === -1 ) { |
| 194 | + fonts.push( fonts[j] ); |
193 | 195 | } |
194 | 196 | } |
195 | 197 | } |
196 | 198 | } |
197 | 199 | |
198 | 200 | // Build font dropdown |
199 | | - mw.webfonts.buildMenu( config ); |
| 201 | + mw.webfonts.buildMenu( fonts ); |
200 | 202 | // See if there is a font in cookie if not first font is default font. |
201 | | - var cookieFont = $.cookie( 'webfonts-font' ); |
202 | | - var selectedFont = null; |
| 203 | + var cookieFont = $.cookie( 'webfonts-font' ), |
| 204 | + selectedFont = null; |
203 | 205 | // check whether this font is for the current userlang/contentlang |
204 | | - if ( $.inArray( cookieFont, config ) !== -1 || cookieFont === 'none' ) { |
| 206 | + if ( $.inArray( cookieFont, fonts ) !== -1 || cookieFont === 'none' ) { |
205 | 207 | selectedFont = cookieFont; |
206 | 208 | } |
207 | | - else{ |
208 | | - // We cannot use cookie font since it is not one of the fonts suitable |
| 209 | + else { |
| 210 | + // We cannot use cookie font since it is not one of the fonts suitable |
209 | 211 | // for current language. |
210 | | - selectedFont = config[0]; |
| 212 | + selectedFont = fonts[0]; |
211 | 213 | } |
212 | 214 | if ( selectedFont ) { |
213 | 215 | mw.webfonts.set( selectedFont ); |
214 | 216 | // Mark it as checked |
215 | 217 | $( '#'+fontID( selectedFont ) ).prop( 'checked', true ); |
216 | 218 | } |
217 | | - |
| 219 | + |
218 | 220 | mw.webfonts.loadFontsForFontFamilyStyle(); |
219 | 221 | mw.webfonts.loadFontsForLangAttr(); |
220 | 222 | |
221 | 223 | if ( $( '.webfonts-lang-attr' ).length && !$( '#webfonts-fontsmenu' ).length ) { |
222 | | - // We need to show the reset option even if there is no font to show |
| 224 | + // We need to show the reset option even if there is no font to show |
223 | 225 | // for the language, if there is lang attr based font embedding. |
224 | | - mw.webfonts.buildMenu( config ); |
| 226 | + mw.webfonts.buildMenu( fonts ); |
225 | 227 | } |
226 | 228 | }, |
227 | | - |
| 229 | + |
228 | 230 | /** |
229 | 231 | * Scan the page for tags with lang attr and load the default font |
230 | 232 | * for that language if available. |
— | — | @@ -232,32 +234,31 @@ |
233 | 235 | var languages = mw.webfonts.config.languages; |
234 | 236 | var requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )]; |
235 | 237 | var fontFamily = false; |
236 | | - // If there are tags with lang attribute, |
237 | | - $( 'body' ).find( '*[lang]' ).each( function( index ) { |
| 238 | + // If there are tags with lang attribute, |
| 239 | + $( 'body' ).find( '*[lang]' ).each( function( i, el) { |
238 | 240 | // If the lang attribute value is same as one of |
239 | 241 | // contentLang,useLang, variant, no need to do this. |
240 | | - if( $.inArray( this.lang , requested ) === -1 ) { |
| 242 | + if( $.inArray( el.lang , requested ) === -1 ) { |
241 | 243 | // check the availability of font, add a font-family style if it does not have any |
242 | | - if( languages[this.lang] && ( !this.style.fontFamily || this.style.fontFamily === 'none' ) ) { |
243 | | - fontFamily = languages[this.lang][0]; |
| 244 | + if( languages[el.lang] && ( !el.style.fontFamily || el.style.fontFamily === 'none' ) ) { |
| 245 | + fontFamily = languages[el.lang][0]; |
244 | 246 | mw.webfonts.addFont( fontFamily ); |
245 | | - $(this).css( 'font-family', fontFamily ).addClass( 'webfonts-lang-attr' ); |
| 247 | + $(el).css( 'font-family', fontFamily ).addClass( 'webfonts-lang-attr' ); |
246 | 248 | } |
247 | 249 | } |
248 | 250 | }); |
249 | 251 | }, |
250 | | - |
| 252 | + |
251 | 253 | /** |
252 | 254 | * Scan the page for tags with font-family style declarations |
253 | 255 | * If that font is available, embed it. |
254 | 256 | */ |
255 | 257 | loadFontsForFontFamilyStyle: function() { |
256 | | - var languages = mw.webfonts.config.languages; |
257 | 258 | // If there are tags with font-family style definition, get a list of fonts to be loaded |
258 | | - $( 'body' ).find( '*[style]' ).each( function( index ) { |
259 | | - if( this.style.fontFamily ) { |
260 | | - var fontFamilyItems = this.style.fontFamily.split( ',' ); |
261 | | - $.each( fontFamilyItems, function( index, fontFamily ) { |
| 259 | + $( 'body' ).find( '*[style]' ).each( function( i, el ) { |
| 260 | + if( el.style.fontFamily ) { |
| 261 | + var fontFamilyItems = el.style.fontFamily.split( ',' ); |
| 262 | + $.each( fontFamilyItems, function( i, fontFamily ) { |
262 | 263 | // Remove the ' characters if any. |
263 | 264 | fontFamily = fontFamily.replace( /'/g, '' ); |
264 | 265 | mw.webfonts.addFont( fontFamily ); |
— | — | @@ -266,79 +267,90 @@ |
267 | 268 | }); |
268 | 269 | |
269 | 270 | }, |
270 | | - |
| 271 | + |
271 | 272 | /** |
272 | 273 | * Prepare the div containing menu items. |
273 | | - * @param config The webfont configuration. |
| 274 | + * @param fonts {Array} List of fonts to be provided as a menu option. |
274 | 275 | */ |
275 | | - buildMenuItems: function ( config ){ |
276 | | - var haveSchemes = false; |
277 | | - // Build font dropdown |
278 | | - var $fontsMenu = $( '<ul>' ).attr( 'id', 'webfonts-fontsmenu' ); |
279 | | - $fontsMenu.delegate( 'input:radio', 'click', function( ) { |
280 | | - mw.webfonts.set( $(this).val() ); |
281 | | - } ); |
282 | | - for ( var scheme in config ) { |
283 | | - if ( !Object.prototype.hasOwnProperty.call( config, scheme ) ) { |
284 | | - continue; |
285 | | - } |
| 276 | + buildMenuItems: function ( fonts ){ |
| 277 | + var haveSchemes = false, |
| 278 | + $fontsMenu = $( '<ul>' ) |
| 279 | + .attr( 'id', 'webfonts-fontsmenu' ) |
| 280 | + .delegate( 'input:radio', 'click', function() { |
| 281 | + mw.webfonts.set( $(this).val() ); |
| 282 | + } ), |
| 283 | + len = fonts.length, |
| 284 | + i, font, $link, $label, $item; |
286 | 285 | |
287 | | - var $fontLink = $( '<input type="radio" name="font" />' ) |
288 | | - .attr( 'id', fontID( config[scheme] ) ) |
289 | | - .val( config[scheme] ); |
| 286 | + for ( i = 0; i < len; i++ ) { |
| 287 | + font = fonts[i]; |
290 | 288 | |
291 | | - var $fontLabel = $( '<label>' ) |
292 | | - .attr( 'for',fontID(config[scheme] ) ) |
293 | | - .append( $fontLink ) |
294 | | - .append( config[scheme] ); |
| 289 | + $link = $( '<input type="radio" name="font" />' ) |
| 290 | + .attr( 'id', fontID( font ) ) |
| 291 | + .val( font ); |
295 | 292 | |
296 | | - var $fontMenuItem = $( '<li>' ) |
297 | | - .val( config[scheme] ) |
298 | | - .append( $fontLabel ); |
| 293 | + $label = $( '<label>' ) |
| 294 | + .attr( 'for',fontID( font ) ) |
| 295 | + .append( $link ) |
| 296 | + .append( font ); |
299 | 297 | |
| 298 | + $item = $( '<li>' ) |
| 299 | + .val( font ) |
| 300 | + .append( $label ); |
| 301 | + |
300 | 302 | haveSchemes = true; |
301 | 303 | |
302 | | - $fontsMenu.append( $fontMenuItem ); |
| 304 | + $fontsMenu.append( $item ); |
303 | 305 | |
304 | 306 | } |
305 | 307 | |
306 | | - if ( !haveSchemes && !$( '.webfonts-lang-attr' ).length ) { |
| 308 | + $resetLink = $resetLabel = $resetItem = undefined; |
| 309 | + |
| 310 | + if ( !haveSchemes && !$( '.webfonts-lang-attr' ).length ) { |
307 | 311 | // No schemes available, and no tags with lang attr |
308 | 312 | // with fonts loaded. Don't show the menu. |
309 | 313 | return null; |
310 | 314 | } |
311 | 315 | |
312 | | - var $resetLink = $( '<input type="radio" name="font" />' ) |
| 316 | + $resetLink = $( '<input type="radio" name="font" />' ) |
313 | 317 | .attr( 'value', 'webfont-none' ) |
314 | 318 | .attr( 'id', 'webfont-none' ) |
315 | | - .click( function( e ) { |
| 319 | + .click( function() { |
316 | 320 | mw.webfonts.set( 'none' ); |
317 | 321 | }); |
318 | 322 | |
319 | | - var $resetLabel = $( '<label>' ) |
| 323 | + $resetLabel = $( '<label>' ) |
320 | 324 | .attr( 'for', 'webfont-none' ) |
321 | 325 | .append( $resetLink ) |
322 | 326 | .append( mw.message( 'webfonts-reset' ).escaped() ); |
323 | 327 | |
324 | | - var $resetLinkItem = $( '<li>' ) |
| 328 | + $resetItem = $( '<li>' ) |
325 | 329 | .val( 'none' ) |
326 | 330 | .append( $resetLabel ); |
327 | 331 | |
328 | | - $fontsMenu.append( $resetLinkItem ); |
| 332 | + $fontsMenu.append( $resetItem ); |
329 | 333 | |
330 | | - var $menuDiv = $( '<div>' ) |
| 334 | + |
| 335 | + var helpPage = mw.config.get( 'wgWebFontsHelpPage' ); |
| 336 | + var $helpLink = $( '<a id="webfont-help-link" >' ) |
| 337 | + .text( mw.msg( 'webfonts-help' ) ) |
| 338 | + .prop( 'href', helpPage ) |
| 339 | + .prop( 'target', '_blank'); |
| 340 | + var $helpItem = $( '<li>' ).addClass( 'webfont-help-item' ).append( $helpLink ); |
| 341 | + $fontsMenu.append( $helpItem ); |
| 342 | + |
| 343 | + return $( '<div>' ) |
331 | 344 | .attr( 'id', 'webfonts-fonts' ) |
332 | 345 | .addClass( 'menu' ) |
333 | | - .append( $fontsMenu ) |
334 | | - .append(); |
335 | | - return $menuDiv; |
| 346 | + .append( $fontsMenu ); |
336 | 347 | }, |
| 348 | + |
337 | 349 | /** |
338 | 350 | * Prepare the menu for the webfonts. |
339 | | - * @param config The webfont configuration. |
| 351 | + * @param fonts {Array} List of fonts to be provided as a menu option. |
340 | 352 | */ |
341 | | - buildMenu: function(config) { |
342 | | - var $menuItemsDiv = mw.webfonts.buildMenuItems( config ); |
| 353 | + buildMenu: function( fonts ) { |
| 354 | + var $menuItemsDiv = mw.webfonts.buildMenuItems( fonts ); |
343 | 355 | if( $menuItemsDiv === null ) { |
344 | 356 | return; |
345 | 357 | } |
— | — | @@ -363,7 +375,7 @@ |
364 | 376 | $( 'body' ).prepend( $menu ); |
365 | 377 | $li.click( function( event ) { |
366 | 378 | var menuSide, menuOffset, distanceToEdge; |
367 | | - |
| 379 | + |
368 | 380 | if ( rtlEnv ) { |
369 | 381 | distanceToEdge = $li.outerWidth() + $li.offset().left; |
370 | 382 | if ( $menuItemsDiv.outerWidth() > distanceToEdge ) { |
— | — | @@ -394,22 +406,25 @@ |
395 | 407 | event.stopPropagation(); |
396 | 408 | } |
397 | 409 | } ); |
| 410 | + |
398 | 411 | $( 'html' ).click( function() { |
399 | 412 | $menu.removeClass( 'open' ); |
400 | 413 | } ); |
| 414 | + |
401 | 415 | $menu.click( function( event ) { |
402 | 416 | event.stopPropagation(); |
403 | 417 | } ); |
| 418 | + |
404 | 419 | // Workaround for IE bug - ActiveX components like input fields coming on top of everything. |
405 | 420 | // @todo Is there a better solution other than hiding it on hover? |
406 | | - if ( $.browser.msie ) { |
| 421 | + if ( $.browser.msie ) { |
407 | 422 | $( '#webfonts-menu' ).hover( function() { |
408 | 423 | $( '#searchform' ).css({ visibility: 'hidden' } ); |
409 | | - }, function( ) { |
| 424 | + }, function() { |
410 | 425 | $( '#searchform' ).css( { visibility: 'visible' } ); |
411 | 426 | } ); |
412 | 427 | } |
413 | 428 | } |
414 | 429 | }; |
415 | 430 | |
416 | | -} ) ( jQuery ); |
| 431 | +})( jQuery, mediaWiki ); |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.fontlist.js |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | woff: "Deva/SamyakDevanagari.woff", |
43 | 43 | version: "1.0" |
44 | 44 | }, |
45 | | - |
| 45 | + |
46 | 46 | "Madan": { |
47 | 47 | eot: "Deva/madan.eot", |
48 | 48 | ttf: "Deva/madan.ttf", |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | eot: "Khmr/KhmerOS.eot", |
91 | 91 | ttf: "Khmr/KhmerOS.ttf", |
92 | 92 | woff: "Khmr/KhmerOS.woff", |
93 | | - svg: "Khmr/KhmerOS.svg", |
| 93 | + svg: "Khmr/KhmerOS.svg", |
94 | 94 | version: "1.10" |
95 | 95 | }, |
96 | 96 | |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | eot: "Khmr/KhmerOSbattambang.eot", |
99 | 99 | ttf: "Khmr/KhmerOSbattambang.ttf", |
100 | 100 | woff: "Khmr/KhmerOSbattambang.woff", |
101 | | - svg: "Khmr/KhmerOSbattambang.svg", |
| 101 | + svg: "Khmr/KhmerOSbattambang.svg", |
102 | 102 | version: "1.10" |
103 | 103 | }, |
104 | 104 | |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | eot: "Khmr/KhmerOSbokor.eot", |
107 | 107 | ttf: "Khmr/KhmerOSbokor.ttf", |
108 | 108 | woff: "Khmr/KhmerOSbokor.woff", |
109 | | - svg: "Khmr/KhmerOSbokor.svg", |
| 109 | + svg: "Khmr/KhmerOSbokor.svg", |
110 | 110 | version: "1.10" |
111 | 111 | }, |
112 | 112 | |
— | — | @@ -113,7 +113,7 @@ |
114 | 114 | eot: "Khmr/KhmerOSfreehand.eot", |
115 | 115 | ttf: "Khmr/KhmerOSfreehand.ttf", |
116 | 116 | woff: "Khmr/KhmerOSfreehand.woff", |
117 | | - svg: "Khmr/KhmerOSfreehand.svg", |
| 117 | + svg: "Khmr/KhmerOSfreehand.svg", |
118 | 118 | version: "1.10" |
119 | 119 | }, |
120 | 120 | |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | eot: "Khmr/KhmerOSfasthand.eot", |
123 | 123 | ttf: "Khmr/KhmerOSfasthand.ttf", |
124 | 124 | woff: "Khmr/KhmerOSfasthand.woff", |
125 | | - svg: "Khmr/KhmerOSfasthand.svg", |
| 125 | + svg: "Khmr/KhmerOSfasthand.svg", |
126 | 126 | version: "1.10" |
127 | 127 | }, |
128 | 128 | |
— | — | @@ -129,7 +129,7 @@ |
130 | 130 | eot: "Khmr/KhmerOSmuol.eot", |
131 | 131 | ttf: "Khmr/KhmerOSmuol.ttf", |
132 | 132 | woff: "Khmr/KhmerOSmuol.woff", |
133 | | - svg: "Khmr/KhmerOSmuol.svg", |
| 133 | + svg: "Khmr/KhmerOSmuol.svg", |
134 | 134 | version: "1.10" |
135 | 135 | }, |
136 | 136 | |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | eot: "Khmr/KhmerOSmuollight.eot", |
139 | 139 | ttf: "Khmr/KhmerOSmuollight.ttf", |
140 | 140 | woff: "Khmr/KhmerOSmuollight.woff", |
141 | | - svg: "Khmr/KhmerOSmuollight.svg", |
| 141 | + svg: "Khmr/KhmerOSmuollight.svg", |
142 | 142 | version: "1.10" |
143 | 143 | }, |
144 | 144 | |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | eot: "Khmr/KhmerOSmuolpali.eot", |
147 | 147 | ttf: "Khmr/KhmerOSmuolpali.ttf", |
148 | 148 | woff: "Khmr/KhmerOSmuolpali.woff", |
149 | | - svg: "Khmr/KhmerOSmuolpali.svg", |
| 149 | + svg: "Khmr/KhmerOSmuolpali.svg", |
150 | 150 | version: "1.10" |
151 | 151 | }, |
152 | 152 | |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | eot: "Khmr/KhmerOSsiemreap.eot", |
155 | 155 | ttf: "Khmr/KhmerOSsiemreap.ttf", |
156 | 156 | woff: "Khmr/KhmerOSsiemreap.woff", |
157 | | - svg: "Khmr/KhmerOSsiemreap.svg", |
| 157 | + svg: "Khmr/KhmerOSsiemreap.svg", |
158 | 158 | version: "1.10" |
159 | 159 | }, |
160 | 160 | |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | eot: "Mymr/MasterpieceUniSans.eot", |
243 | 243 | ttf: "Mymr/MasterpieceUniSans.ttf", |
244 | 244 | woff: "Mymr/MasterpieceUniSans.woff", |
245 | | - svg: "Mymr/MasterpieceUniSans.svg", |
| 245 | + svg: "Mymr/MasterpieceUniSans.svg", |
246 | 246 | version: "0.5" |
247 | 247 | }, |
248 | 248 | |
— | — | @@ -249,7 +249,7 @@ |
250 | 250 | eot: "Mymr/Myanmar3.eot", |
251 | 251 | ttf: "Mymr/Myanmar3.ttf", |
252 | 252 | woff: "Mymr/Myanmar3.woff", |
253 | | - svg: "Mymr/Myanmar3.svg", |
| 253 | + svg: "Mymr/Myanmar3.svg", |
254 | 254 | version: "3.0" |
255 | 255 | }, |
256 | 256 | |
— | — | @@ -257,7 +257,7 @@ |
258 | 258 | eot: "Mymr/Padauk-Regular.eot", |
259 | 259 | ttf: "Mymr/Padauk-Regular.ttf", |
260 | 260 | woff: "Mymr/Padauk-Regular.woff", |
261 | | - svg: "Mymr/Padauk-Regular.svg", |
| 261 | + svg: "Mymr/Padauk-Regular.svg", |
262 | 262 | version: "2.8" |
263 | 263 | }, |
264 | 264 | |
— | — | @@ -265,7 +265,7 @@ |
266 | 266 | eot: "Mymr/Yunghkio.eot", |
267 | 267 | ttf: "Mymr/Yunghkio.ttf", |
268 | 268 | woff: "Mymr/Yunghkio.woff", |
269 | | - svg: "Mymr/Yunghkio.svg", |
| 269 | + svg: "Mymr/Yunghkio.svg", |
270 | 270 | version: "1.0" |
271 | 271 | }, |
272 | 272 | |
— | — | @@ -297,14 +297,14 @@ |
298 | 298 | version: "2.5.0" |
299 | 299 | }, |
300 | 300 | |
301 | | - Thendral: { |
| 301 | + Thendral: { |
302 | 302 | eot: "Taml/ThendralUni.eot", |
303 | 303 | ttf: "Taml/ThendralUni.ttf", |
304 | 304 | woff: "Taml/ThendralUni.woff", |
305 | 305 | version: "1.0" |
306 | 306 | }, |
307 | 307 | |
308 | | - Thenee: { |
| 308 | + Thenee: { |
309 | 309 | eot: "Taml/TheneeUni.eot", |
310 | 310 | ttf: "Taml/TheneeUni.ttf", |
311 | 311 | woff: "Taml/TheneeUni.woff", |
— | — | @@ -353,7 +353,7 @@ |
354 | 354 | am: [ "AbyssinicaSIL" ], |
355 | 355 | as: [ "Lohit Assamese" ], |
356 | 356 | bh: [ "Lohit Devanagari" ], |
357 | | - bho: [ "Lohit Devanagari" ], |
| 357 | + bho: [ "Lohit Devanagari" ], |
358 | 358 | bn: [ "Lohit Bengali" ], |
359 | 359 | bpy: [ "Lohit Bengali" ], |
360 | 360 | cdo: [ "Charis SIL" ], |
— | — | @@ -372,7 +372,7 @@ |
373 | 373 | ml: [ "AnjaliOldLipi" ], |
374 | 374 | mr: [ "Lohit Devanagari" ], |
375 | 375 | my: [ "Masterpiece Uni Sans", "Padauk-Regular", "Myanmar3", "Yunghkio" ], |
376 | | - ne: [ "Lohit Devanagari", "Madan" ], |
| 376 | + ne: [ "Lohit Devanagari", "Madan" ], |
377 | 377 | or: [ "Lohit Oriya" , "Utkal" ], |
378 | 378 | pa: [ "Lohit Punjabi", "Saab" ], |
379 | 379 | sa: [ "Lohit Devanagari" ], |
— | — | @@ -383,5 +383,7 @@ |
384 | 384 | ti: [ "AbyssinicaSIL" ] |
385 | 385 | } |
386 | 386 | }; |
387 | | - $.extend( mw.webfonts.config, config); |
| 387 | + |
| 388 | + $.extend( mw.webfonts.config, config ); |
| 389 | + |
388 | 390 | } ) ( jQuery ); |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/images/help.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: branches/wmf/1.18wmf1/extensions/WebFonts/resources/images/help.png |
___________________________________________________________________ |
Added: svn:mime-type |
389 | 391 | + image/png |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.css |
— | — | @@ -119,3 +119,9 @@ |
120 | 120 | cursor: pointer; |
121 | 121 | } |
122 | 122 | |
| 123 | +a#webfont-help-link { |
| 124 | + /* @embed */ |
| 125 | + background: url(images/help.png) no-repeat scroll left center transparent; |
| 126 | + padding-left: 20px; |
| 127 | + font-size: 1.0em; |
| 128 | +} |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.i18n.php |
— | — | @@ -18,6 +18,8 @@ |
19 | 19 | 'webfonts-reset' => 'Reset', |
20 | 20 | 'webfonts-enable-preference' => 'Enable font embedding (WebFonts)', |
21 | 21 | 'webfonts-menu-tooltip' => 'Select a font for the page', |
| 22 | + 'webfonts-help' => 'Help', |
| 23 | + 'webfonts-help-page' => '//mediawiki.org/wiki/Special:MyLanguage/Help:Extension:WebFonts', |
22 | 24 | ); |
23 | 25 | |
24 | 26 | /** Message documentation (Message documentation) |
— | — | @@ -29,6 +31,8 @@ |
30 | 32 | 'webfonts-load' => 'The text shown in the webfont link', |
31 | 33 | 'webfonts-reset' => '{{Identical|Reset}}', |
32 | 34 | 'webfonts-menu-tooltip' => 'Tooltip text displayed in the webfont link', |
| 35 | + 'webfonts-help' => 'Text for the help link', |
| 36 | + 'webfonts-help-page' => 'Change this only if you want to point the help link to a different wiki page.', |
33 | 37 | ); |
34 | 38 | |
35 | 39 | /** Arabic (العربية) |
— | — | @@ -348,6 +352,7 @@ |
349 | 353 | 'webfonts-reset' => 'പഴയപടിയാക്കുക', |
350 | 354 | 'webfonts-enable-preference' => 'ഫോണ്ട് എംബെഡ് ചെയ്യുക.(വെബ്ഫോണ്ട്സ്)', |
351 | 355 | 'webfonts-menu-tooltip' => 'താളിനുവേണ്ടി ഒരു ഫോണ്ട് തിരഞ്ഞെടുക്കുക', |
| 356 | + 'webfonts-help' => 'സഹായം', |
352 | 357 | ); |
353 | 358 | |
354 | 359 | /** Marathi (मराठी) |
— | — | @@ -518,6 +523,7 @@ |
519 | 524 | 'webfonts-load' => 'எழுத்துரு மாற்ற', |
520 | 525 | 'webfonts-reset' => 'இயல்பு எழுத்துரு', |
521 | 526 | 'webfonts-enable-preference' => 'எழுத்துரு புதைத்தல் (இணைய எழுத்துருக்களை) பயன்படுத்துக', |
| 527 | + 'webfonts-help' => 'உதவி', |
522 | 528 | ); |
523 | 529 | |
524 | 530 | /** Tagalog (Tagalog) |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/WebFonts.php |
— | — | @@ -37,6 +37,7 @@ |
38 | 38 | $wgHooks['BeforePageDisplay'][] = 'WebFontsHooks::addModules'; |
39 | 39 | $wgHooks['GetPreferences'][] = 'WebFontsHooks::addPreference'; |
40 | 40 | $wgHooks['UserGetDefaultOptions'][] = 'WebFontsHooks::addDefaultOptions'; |
| 41 | +$wgHooks['ResourceLoaderGetConfigVars'][] = 'WebFontsHooks::addConfig'; |
41 | 42 | |
42 | 43 | $wgWebFontsEnabledByDefault = true; |
43 | 44 | |
— | — | @@ -57,7 +58,12 @@ |
58 | 59 | ), |
59 | 60 | 'localBasePath' => $dir, |
60 | 61 | 'remoteExtPath' => 'WebFonts', |
61 | | - 'messages' => array( 'webfonts-load', 'webfonts-reset', 'webfonts-menu-tooltip' ), |
62 | | - 'dependencies' => 'jquery.cookie' , |
| 62 | + 'messages' => array( |
| 63 | + 'webfonts-load', |
| 64 | + 'webfonts-reset', |
| 65 | + 'webfonts-menu-tooltip', |
| 66 | + 'webfonts-help', |
| 67 | + ), |
| 68 | + 'dependencies' => 'jquery.cookie', |
63 | 69 | 'position' => 'top', |
64 | 70 | ); |
Index: branches/wmf/1.18wmf1/languages/messages/MessagesCs.php |
— | — | @@ -48,8 +48,6 @@ |
49 | 49 | ); |
50 | 50 | |
51 | 51 | $namespaceAliases = array( |
52 | | - 'Uživatelka' => NS_USER, # female complement |
53 | | - 'Diskuse_s_uživatelkou' => NS_USER_TALK, # female complement |
54 | 52 | 'Uživatel_diskuse' => NS_USER_TALK, # old literal translation backward compatibility |
55 | 53 | 'Uživatelka_diskuse' => NS_USER_TALK, # female complement to old literal translation style |
56 | 54 | '$1_diskuse' => NS_PROJECT_TALK, # old literal translation backward compatibility |
— | — | @@ -60,6 +58,11 @@ |
61 | 59 | 'Kategorie_diskuse' => NS_CATEGORY_TALK, # old literal translation backward compatibility |
62 | 60 | ); |
63 | 61 | |
| 62 | +$namespaceGenderAliases = array( |
| 63 | + NS_USER => array( 'male' => 'Uživatel', 'female' => 'Uživatelka' ), |
| 64 | + NS_USER_TALK => array( 'male' => 'Diskuse_s_uživatelem', 'female' => 'Diskuse_s_uživatelkou' ), |
| 65 | +); |
| 66 | + |
64 | 67 | /** |
65 | 68 | * Date formats list for Special:Preferences |
66 | 69 | * see $dateFormats for definitions |
Index: branches/wmf/1.18wmf1/languages/messages/MessagesEn.php |
— | — | @@ -1318,8 +1318,8 @@ |
1319 | 1319 | 'blocked-notice-logextract' => 'This user is currently blocked. |
1320 | 1320 | The latest block log entry is provided below for reference:', |
1321 | 1321 | 'clearyourcache' => "'''Note:''' After saving, you may have to bypass your browser's cache to see the changes. |
1322 | | -* '''Firefox / Safari:''' Hold ''Shift'' while clicking ''Reload'', or press either ''Ctrl-F5'' or ''Ctrl-R'' (''Command-R'' on a Mac) |
1323 | | -* '''Google Chrome:''' Press ''Ctrl-Shift-R'' (''Command-Shift-R'' on a Mac) |
| 1322 | +* '''Firefox / Safari:''' Hold ''Shift'' while clicking ''Reload'', or press either ''Ctrl-F5'' or ''Ctrl-R'' (''⌘-R'' on a Mac) |
| 1323 | +* '''Google Chrome:''' Press ''Ctrl-Shift-R'' (''⌘-Shift-R'' on a Mac) |
1324 | 1324 | * '''Internet Explorer:''' Hold ''Ctrl'' while clicking ''Refresh'', or press ''Ctrl-F5'' |
1325 | 1325 | * '''Konqueror:''' Click ''Reload'' or press ''F5'' |
1326 | 1326 | * '''Opera:''' Clear the cache in ''Tools → Preferences''", |