Index: trunk/extensions/WebFonts/resources/ext.webfonts.monobook.css |
— | — | @@ -1,9 +0,0 @@ |
2 | | - |
3 | | -div#webfonts-menu { |
4 | | - float: none; |
5 | | -} |
6 | | - |
7 | | -ul#webfonts-fontsmenu { |
8 | | - position: relative; |
9 | | - margin: 0px; |
10 | | -} |
Index: trunk/extensions/WebFonts/resources/ext.webfonts.monobook.js |
— | — | @@ -1,22 +0,0 @@ |
2 | | -/** |
3 | | - * scripts specific for monobook skin of mediawiki. |
4 | | - */ |
5 | | - |
6 | | -( function ( $ ) { |
7 | | - /** |
8 | | - * Prepare the menu for the webfonts. |
9 | | - * @param config The webfont configuration. |
10 | | - */ |
11 | | - mw.webfonts.buildMenu = function(config) { |
12 | | - var $menuItemsDiv = mw.webfonts.buildMenuItems( config ); |
13 | | - if( $menuItemsDiv == null ) { |
14 | | - return; |
15 | | - } |
16 | | - var $div = $( '<div>' ) |
17 | | - .attr( 'id', 'webfonts-menu' ) |
18 | | - .addClass( 'portlet' ) |
19 | | - .append( $( '<h5>' ).text( mw.message( 'webfonts-load' ).escaped() ) ) |
20 | | - .append( $menuItemsDiv .find ('ul').addClass('pBody')); |
21 | | - $div.insertAfter( '#p-search'); |
22 | | - }; |
23 | | -} ) ( jQuery ); |
Index: trunk/extensions/WebFonts/resources/ext.webfonts.js |
— | — | @@ -323,21 +323,26 @@ |
324 | 324 | if( $menuItemsDiv == null ) { |
325 | 325 | return; |
326 | 326 | } |
327 | | - var $div = $( '<div>' ) |
| 327 | + var $menu = $( '<div>' ) |
328 | 328 | .attr( 'id', 'webfonts-menu' ) |
329 | 329 | .addClass( 'webfontMenu' ) |
330 | | - .append( $( '<a>' ).prop( 'href', '#' ).text( mw.message( 'webfonts-load' ).escaped() ) ) |
331 | 330 | .append( $menuItemsDiv ); |
332 | | - |
| 331 | + var $link = $( '<a>' ).prop( 'href', '#' ).text( mw.message( 'webfonts-load' ).escaped() ); |
333 | 332 | // This is the fonts link |
334 | | - var $li = $( '<li>' ) |
335 | | - .attr( 'id', 'pt-webfont' ) |
336 | | - .append( $div ); |
337 | | - |
| 333 | + var $li = $( '<li>' ).attr( 'id', 'pt-webfont' ).append( $link ); |
338 | 334 | // If RTL, add to the right of top personal links. Else, to the left |
339 | 335 | var fn = $( 'body' ).hasClass( 'rtl' ) ? 'append' : 'prepend'; |
340 | 336 | $( '#p-personal ul:first' )[fn]( $li ); |
341 | | - |
| 337 | + $( 'body').prepend($menu); |
| 338 | + $menu.hide(); |
| 339 | + $li.hover( function() { |
| 340 | + $menuItemsDiv.css( 'left', $li.offset().left ); |
| 341 | + $menu.slideDown( 'slow' ); |
| 342 | + }); |
| 343 | + $menu.hover( function() { |
| 344 | + }, function() { |
| 345 | + $menu.slideUp( 'slow' ); |
| 346 | + }); |
342 | 347 | // Workaround for IE bug - ActiveX components like input fields coming on top of everything. |
343 | 348 | // @todo Is there a better solution other than hiding it on hover? |
344 | 349 | if ( $.browser.msie ) { |
Index: trunk/extensions/WebFonts/resources/ext.webfonts.css |
— | — | @@ -44,9 +44,12 @@ |
45 | 45 | |
46 | 46 | div.webfontMenu div.menu { |
47 | 47 | position: relative; |
48 | | - display: none; |
| 48 | + display: block; |
49 | 49 | clear: both; |
50 | 50 | text-align: left; |
| 51 | + top: 20px; |
| 52 | + width: 300px; |
| 53 | + font-size: 0.8em; |
51 | 54 | } |
52 | 55 | |
53 | 56 | /* OVERRIDDEN BY COMPLIANT BROWSERS */ |
— | — | @@ -66,11 +69,7 @@ |
67 | 70 | x:-moz-any-link { |
68 | 71 | margin-left: 23px; |
69 | 72 | } |
70 | | -/* Enable forcing showing of the menu for accessibility */ |
71 | | -div.webfontMenu:hover div.menu, |
72 | | -div.webfontMenu div.menuForceShow { |
73 | | - display: block; |
74 | | -} |
| 73 | + |
75 | 74 | div.webfontMenu ul { |
76 | 75 | position: absolute; |
77 | 76 | background-color: white; |
— | — | @@ -107,7 +106,6 @@ |
108 | 107 | padding: 0.5em; |
109 | 108 | white-space: nowrap; |
110 | 109 | color: #0645ad; |
111 | | - font-size: 0.8em; |
112 | 110 | } |
113 | 111 | /* IGNORED BY IE6 */ |
114 | 112 | div.webfontMenu li > a { |
Index: trunk/extensions/WebFonts/WebFonts.php |
— | — | @@ -50,13 +50,9 @@ |
51 | 51 | |
52 | 52 | $wgResourceModules['ext.webfonts.core'] = array( |
53 | 53 | 'scripts' => array( 'resources/ext.webfonts.js', 'resources/ext.webfonts.fontlist.js' ), |
54 | | - 'skinScripts' => array( |
55 | | - 'monobook' => 'resources/ext.webfonts.monobook.js', |
56 | | - ), |
57 | 54 | 'styles' => 'resources/ext.webfonts.css', |
58 | 55 | 'skinStyles' => array( |
59 | 56 | 'modern' => 'resources/ext.webfonts.modern.css', |
60 | | - 'monobook' => 'resources/ext.webfonts.monobook.css', |
61 | 57 | ), |
62 | 58 | 'localBasePath' => $dir, |
63 | 59 | 'remoteExtPath' => 'WebFonts', |