From: Shamim Rezaie Date: Thu, 31 Jan 2013 10:45:50 +0000 (+0000) Subject: MDL-37664 course: Fix drag & drop RTL mode issue X-Git-Tag: v2.5.0-beta~227^2 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=ba23e9a57bb414b9fd4120963107db480e5bb4f6;ds=sidebyside MDL-37664 course: Fix drag & drop RTL mode issue --- diff --git a/lib/yui/blocks/blocks.js b/lib/yui/blocks/blocks.js index edb655fa048..df4acf1fa98 100644 --- a/lib/yui/blocks/blocks.js +++ b/lib/yui/blocks/blocks.js @@ -102,6 +102,13 @@ YUI.add('moodle-core-blocks', function(Y) { var region = node.ancestor('div.'+CSS.BLOCKREGION).get('id').replace(/region-/i, ''); if (Y.Array.indexOf(this.get('regions'), region) === -1) { // Must be standard side-X + if (right_to_left()) { + if (region == 'post') { + region = 'pre'; + } else if (region == 'pre') { + region = 'post'; + } + } return 'side-' + region; } // Perhaps custom region