Permalink
Browse files

MDL-35581 lib: Help popups misaligned for right-to-left languages

  • Loading branch information...
1 parent a8ce907 commit f910245bfdbe9933aaaa502a8c69645a20f7b4d6 @simoncoggins simoncoggins committed Oct 9, 2012
Showing with 9 additions and 1 deletion.
  1. +8 −1 lib/javascript-static.js
  2. +1 −0 theme/base/style/core.css
View
@@ -1353,9 +1353,16 @@ M.util.help_icon = {
},
display : function(event, args) {
+ if (Y.one('html').get('dir') == 'rtl') {
+ var overlayPosition = [Y.WidgetPositionAlign.TR, Y.WidgetPositionAlign.LC];
+ } else {
+ var overlayPosition = [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.RC];
+ }
+
this.helplink = args.node;
+
this.overlay.set('bodyContent', Y.Node.create('<img src="'+M.cfg.loadingicon+'" class="spinner" />'));
- this.overlay.set("align", {node:args.node, points:[Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.RC]});
+ this.overlay.set("align", {node:args.node, points: overlayPosition});
var fullurl = args.url;
if (!args.url.match(/https?:\/\//)) {
@@ -571,6 +571,7 @@ body.tag .managelink {padding: 5px;}
#helppopupbox .yui3-widget-bd {margin:0 1em 1em 1em;border-top:1px solid #eee;}
#helppopupbox .helpheading {font-size: 1em;}
#helppopupbox .spinner {margin:1em;}
+.dir-rtl #helppopupbox .yui3-widget-hd {float:left;margin:3px 0 0 3px;}
/**
* Custom menu

0 comments on commit f910245

Please sign in to comment.