r91179 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91178‎ | r91179 | r91180 >
Date:15:24, 30 June 2011
Author:santhosh
Status:deferred
Tags:
Comment:
Add the webfonts menu to the personal tools links based on the page direction(rtl/ltr)
Modified paths:
  • /trunk/extensions/WebFonts/js/webfonts.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/js/webfonts.js
@@ -198,9 +198,13 @@
199199 var $li = $( '<li />' ).attr('id','pt-webfont')
200200 .append( $div );
201201
202 - //add to the left of top personal links
203 - $($( '#p-personal ul' )[0]).prepend( $li );
204 -
 202+ //if rtl, add to the right of top personal links. Else, to the left
 203+ if($('body').hasClass('rtl')){
 204+ $($('#p-personal ul')[0]).append( $li );
 205+ }
 206+ else{
 207+ $($('#p-personal ul')[0]).prepend( $li );
 208+ }
205209 //see if there is a font in cookie
206210 cookie_font = $.cookie('webfonts-font');
207211 if(cookie_font == null){

Status & tagging log