MDL-35512 - Two left pointing arrows appear after clicking "left indent activity...
authorNadav Kavalerchik <nadavkav@gmail.com>
Sat, 29 Sep 2012 10:33:21 +0000 (12:33 +0200)
committerNadav Kavalerchik <nadavkav@gmail.com>
Thu, 1 Nov 2012 18:12:37 +0000 (20:12 +0200)
course/yui/toolboxes/toolboxes.js

index db7dae8..b3eb066 100644 (file)
@@ -459,10 +459,16 @@ YUI.add('moodle-course-toolboxes', function(Y) {
          */
         add_moveleft : function(target) {
             var left_string = M.util.get_string('moveleft', 'moodle');
+            var moveimage = 't/left'; // ltr mode
+            if ( Y.one(document.body).hasClass('dir-rtl') ) {
+                moveimage = 't/right';
+            } else {
+                moveimage = 't/left';
+            }
             var newicon = Y.Node.create('<img />')
                 .addClass(CSS.GENERICICONCLASS)
                 .setAttrs({
-                    'src'   : M.util.image_url('t/left', 'moodle'),
+                    'src'   : M.util.image_url(moveimage, 'moodle'),
                     'alt'   : left_string
                 });
             var moveright = target.one(CSS.MOVERIGHT);