mirror of
https://github.com/moodle/moodle.git
synced 2025-07-25 00:02:18 +02:00
MDL-35481 - Invert "search option" listbox "open" arrow, when in RTL mode (page: manual user course registration ) and Personal Blog page
This commit is contained in:
@@ -103,9 +103,15 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) {
|
||||
|
||||
// Get the height of the div at this point before we shrink it if required
|
||||
var height = this.div.get('offsetHeight');
|
||||
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')) {
|
||||
// Add the correct image and record the YUI node created in the process
|
||||
this.icon = Y.Node.create('<img src="'+M.util.image_url('t/collapsed', 'moodle')+'" alt="" />');
|
||||
this.icon = Y.Node.create('<img src="'+M.util.image_url(collapsedimage, 'moodle')+'" alt="" />');
|
||||
// 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'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user