From 20a1f8a9c512e79fe87c9c7723cbbb6efbe64d74 Mon Sep 17 00:00:00 2001 From: Nadav Kavalerchik Date: Sat, 22 Sep 2012 21:05:14 +0300 Subject: [PATCH] MDL-35481 - Invert "search option" listbox "open" arrow, when in RTL mode (page: manual user course registration ) and Personal Blog page --- comment/comment.js | 8 +++++++- comment/lib.php | 8 +++++++- .../manual/yui/quickenrolment/quickenrolment.js | 11 +++++++++-- lib/javascript-static.js | 16 ++++++++++++++-- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/comment/comment.js b/comment/comment.js index a16b83a9c78..f137299a977 100644 --- a/comment/comment.js +++ b/comment/comment.js @@ -361,7 +361,13 @@ bodyContent: '
'); + this.icon = Y.Node.create(''); // Shrink the div as it is collapsed by default this.div.setStyle('height', caption.get('offsetHeight')+'px'); } else { @@ -126,8 +132,14 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) { // Handler for the animation finishing. animation.on('end', function() { this.div.toggleClass('collapsed'); + var collapsedimage = 't/collapsed'; // ltr mode + if ( Y.one(document.body).hasClass('dir-rtl') ) { + collapsedimage = 't/collapsed_rtl'; + } else { + collapsedimage = 't/collapsed'; + } if (this.div.hasClass('collapsed')) { - this.icon.set('src', M.util.image_url('t/collapsed', 'moodle')); + this.icon.set('src', M.util.image_url(collapsedimage, 'moodle')); } else { this.icon.set('src', M.util.image_url('t/expanded', 'moodle')); }