Index: trunk/extensions/Narayam/resources/ext.narayam.core.css |
— | — | @@ -30,10 +30,13 @@ |
31 | 31 | } |
32 | 32 | div#narayam-menu div.menu-items { |
33 | 33 | position: relative; |
34 | | - display: none; |
| 34 | + display: block; |
35 | 35 | clear: both; |
36 | 36 | text-align: left; |
37 | 37 | z-index: 99999; |
| 38 | + width: 300px; |
| 39 | + top: 20px; |
| 40 | + font-size: 0.8em; |
38 | 41 | } |
39 | 42 | |
40 | 43 | div#narayam-menu-items li { |
— | — | @@ -107,7 +110,6 @@ |
108 | 111 | padding: 0.5em; |
109 | 112 | white-space: nowrap; |
110 | 113 | color: #0645ad; |
111 | | -/* font-size: 0.8em;*/ |
112 | 114 | } |
113 | 115 | /* IGNORED BY IE6 */ |
114 | 116 | div#narayam-menu li > a { |
— | — | @@ -130,12 +132,12 @@ |
131 | 133 | padding-left: 15px; |
132 | 134 | } |
133 | 135 | |
134 | | -li.narayam-active { |
| 136 | +li#pt-narayam.narayam-active { |
135 | 137 | /* @embed */ |
136 | 138 | background: url('images/narayam-active.png') no-repeat scroll left top transparent; |
137 | 139 | } |
138 | 140 | |
139 | | -li.narayam-inactive { |
| 141 | +li#pt-narayam.narayam-inactive { |
140 | 142 | /* @embed */ |
141 | 143 | background: url('images/narayam-inactive.png') no-repeat scroll left top transparent; |
142 | 144 | } |
Index: trunk/extensions/Narayam/resources/ext.narayam.core.js |
— | — | @@ -646,12 +646,23 @@ |
647 | 647 | .text( mw.msg( 'narayam-menu' ) ) |
648 | 648 | .attr( 'title', mw.msg( 'narayam-menu-tooltip' ) ); |
649 | 649 | |
650 | | - $menu.append( $link ).append( $menuItemsDiv ); |
651 | | - var $li = $( '<li>' ).attr( 'id', 'pt-narayam' ).append( $menu ); |
| 650 | + $menu.append( $menuItemsDiv ); |
| 651 | + var $li = $( '<li>' ).attr( 'id', 'pt-narayam' ).append( $link ); |
652 | 652 | |
653 | 653 | // If rtl, add to the right of top personal links. Else, to the left |
654 | 654 | var fn = $( 'body' ).hasClass( 'rtl' ) ? "append" : "prepend"; |
655 | 655 | $( '#p-personal ul:first' )[fn]( $li ); |
| 656 | + $( 'body').prepend($menu); |
| 657 | + $menu.hide(); |
| 658 | + $li.hover( function() { |
| 659 | + $menuItemsDiv.css( 'left', $li.offset().left ); |
| 660 | + $menu.slideDown( 'slow' ); |
| 661 | + }); |
| 662 | + $menu.hover( function() { |
| 663 | + }, function() { |
| 664 | + $menu.slideUp( 'slow' ); |
| 665 | + }); |
| 666 | + |
656 | 667 | // Workaround for IE bug - activex components like input fields |
657 | 668 | // coming on top of everything. |
658 | 669 | // TODO: is there a better solution other than hiding it on hover? |