r105281 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105280‎ | r105281 | r105282 >
Date:10:02, 6 December 2011
Author:santhosh
Status:resolved (Comments)
Tags:
Comment:
Fix Narayam for monobook skin(Bug 32124)
Fix IE scrolling issue of the menu in Vector skin.
Placed the menu in body instead of hidden block in the pt-narayam. On mouse hover, show it in proper position.
Modified paths:
  • /trunk/extensions/Narayam/resources/ext.narayam.core.css (modified) (history)
  • /trunk/extensions/Narayam/resources/ext.narayam.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/resources/ext.narayam.core.css
@@ -30,10 +30,13 @@
3131 }
3232 div#narayam-menu div.menu-items {
3333 position: relative;
34 - display: none;
 34+ display: block;
3535 clear: both;
3636 text-align: left;
3737 z-index: 99999;
 38+ width: 300px;
 39+ top: 20px;
 40+ font-size: 0.8em;
3841 }
3942
4043 div#narayam-menu-items li {
@@ -107,7 +110,6 @@
108111 padding: 0.5em;
109112 white-space: nowrap;
110113 color: #0645ad;
111 -/* font-size: 0.8em;*/
112114 }
113115 /* IGNORED BY IE6 */
114116 div#narayam-menu li > a {
@@ -130,12 +132,12 @@
131133 padding-left: 15px;
132134 }
133135
134 -li.narayam-active {
 136+li#pt-narayam.narayam-active {
135137 /* @embed */
136138 background: url('images/narayam-active.png') no-repeat scroll left top transparent;
137139 }
138140
139 -li.narayam-inactive {
 141+li#pt-narayam.narayam-inactive {
140142 /* @embed */
141143 background: url('images/narayam-inactive.png') no-repeat scroll left top transparent;
142144 }
Index: trunk/extensions/Narayam/resources/ext.narayam.core.js
@@ -646,12 +646,23 @@
647647 .text( mw.msg( 'narayam-menu' ) )
648648 .attr( 'title', mw.msg( 'narayam-menu-tooltip' ) );
649649
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 );
652652
653653 // If rtl, add to the right of top personal links. Else, to the left
654654 var fn = $( 'body' ).hasClass( 'rtl' ) ? "append" : "prepend";
655655 $( '#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+
656667 // Workaround for IE bug - activex components like input fields
657668 // coming on top of everything.
658669 // TODO: is there a better solution other than hiding it on hover?

Follow-up revisions

RevisionCommit summaryAuthorDate
r105286Removed the monobook skin specific code added in r105181....santhosh11:19, 6 December 2011
r105426CSS cleanup,...santhosh12:49, 7 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104159Limit the Narayam menu height so that it doesn't overflow the screen - had to...nikerabbit12:09, 24 November 2011

Comments

#Comment by Nikerabbit (talk | contribs)   11:55, 7 December 2011
  1. Now the menu does not disappear if the cursor never hovers it - not a big problem.
  2. More annoying is that there is considerable delay before the menu becomes visible.
  3. This line should have some more spaces:
+		$( 'body').prepend($menu);

Status & tagging log