Index: trunk/extensions/WebFonts/resources/ext.webfonts.js |
— | — | @@ -334,15 +334,19 @@ |
335 | 335 | var fn = $( 'body' ).hasClass( 'rtl' ) ? 'append' : 'prepend'; |
336 | 336 | $( '#p-personal ul:first' )[fn]( $li ); |
337 | 337 | $( 'body' ).prepend( $menu ); |
338 | | - $menu.hide(); |
339 | | - $li.hover( function() { |
| 338 | + $li.click( function( event ) { |
340 | 339 | $menuItemsDiv.css( 'left', $li.offset().left ); |
341 | | - $menu.show(); |
| 340 | + if($menu.hasClass( 'open' ) ){ |
| 341 | + $menu.removeClass( 'open' ); |
| 342 | + } else{ |
| 343 | + $( 'div.open' ).removeClass( 'open' ); |
| 344 | + $menu.addClass( 'open' ); |
| 345 | + event.stopPropagation(); |
| 346 | + } |
| 347 | + } ); |
| 348 | + $( 'html' ).click( function() { |
| 349 | + $menu.removeClass( 'open' ); |
342 | 350 | }); |
343 | | - $menu.hover( function() { |
344 | | - }, function() { |
345 | | - $menu.hide(); |
346 | | - }); |
347 | 351 | // Workaround for IE bug - ActiveX components like input fields coming on top of everything. |
348 | 352 | // @todo Is there a better solution other than hiding it on hover? |
349 | 353 | if ( $.browser.msie ) { |
Index: trunk/extensions/WebFonts/resources/images/arrow_down.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/WebFonts/resources/images/arrow_down.png |
___________________________________________________________________ |
Added: svn:mime-type |
350 | 354 | + image/png |
Index: trunk/extensions/WebFonts/resources/ext.webfonts.css |
— | — | @@ -4,11 +4,22 @@ |
5 | 5 | padding-left: 15px !important; |
6 | 6 | } |
7 | 7 | |
| 8 | +li#pt-webfont a{ |
| 9 | + /* @embed */ |
| 10 | + background: url(images/arrow_down.png) no-repeat scroll right top transparent; |
| 11 | + padding-left: 5px; |
| 12 | + padding-right: 15px; |
| 13 | +} |
| 14 | + |
8 | 15 | div#webfonts-menu { |
9 | 16 | font-size: 100%; |
10 | 17 | z-index: 99999; |
| 18 | + display: none; |
11 | 19 | } |
12 | 20 | |
| 21 | +div#webfonts-menu.open{ |
| 22 | + display: block; |
| 23 | +} |
13 | 24 | div#webfonts-fonts { |
14 | 25 | font-size: 100%; |
15 | 26 | z-index: 99999; |
— | — | @@ -114,3 +125,4 @@ |
115 | 126 | div.webfontMenu label:hover, input:hover { |
116 | 127 | cursor: pointer; |
117 | 128 | } |
| 129 | + |