Skip to content

Commit

Permalink
MDL-35581 lib: Help popups misaligned for right-to-left languages
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncoggins committed Oct 9, 2012
1 parent ccd90e7 commit 98ce522
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/javascript-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -1456,9 +1456,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?:\/\//)) {
Expand Down
1 change: 1 addition & 0 deletions theme/base/style/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,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
Expand Down

0 comments on commit 98ce522

Please sign in to comment.