mirror of
https://github.com/moodle/moodle.git
synced 2025-07-23 15:22:05 +02:00
MDL-36613 usability: Dock icons are correct in RTL mode
This commit is contained in:
@@ -111,7 +111,7 @@ 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') ) {
|
||||
if (right_to_left()) {
|
||||
collapsedimage = 't/collapsed_rtl';
|
||||
} else {
|
||||
collapsedimage = 't/collapsed';
|
||||
@@ -140,7 +140,7 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) {
|
||||
animation.on('end', function() {
|
||||
this.div.toggleClass('collapsed');
|
||||
var collapsedimage = 't/collapsed'; // ltr mode
|
||||
if ( Y.one(document.body).hasClass('dir-rtl') ) {
|
||||
if (right_to_left()) {
|
||||
collapsedimage = 't/collapsed_rtl';
|
||||
} else {
|
||||
collapsedimage = 't/collapsed';
|
||||
@@ -1209,6 +1209,20 @@ function getElementsByClassName(oElm, strTagName, name) {
|
||||
return (arrReturnElements)
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether we are in right to left mode or not.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function right_to_left() {
|
||||
var body = Y.one('body');
|
||||
var rtl = false;
|
||||
if (body && body.hasClass('dir-rtl')) {
|
||||
rtl = true;
|
||||
}
|
||||
return rtl;
|
||||
}
|
||||
|
||||
function openpopup(event, args) {
|
||||
|
||||
if (event) {
|
||||
|
Reference in New Issue
Block a user