mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
navigation MDL-22560 changed English thisvertical to btt and cleaned up title orientation code
This commit is contained in:
parent
90f4a43ad1
commit
33408822df
@ -30,7 +30,6 @@ M.core_dock = {
|
||||
buffer:10, // Buffer used when containing a panel
|
||||
position:'left', // position of the dock
|
||||
orientation:'vertical', // vertical || horizontal determines if we change the title
|
||||
titlerotation:'counterclockwise',
|
||||
/**
|
||||
* Display parameters for the dock
|
||||
* @namespace
|
||||
@ -449,24 +448,27 @@ M.core_dock.genericblock.prototype = {
|
||||
fix_title_orientation : function(node) {
|
||||
var title = node.firstChild.nodeValue;
|
||||
|
||||
var clockwise = false;
|
||||
if (M.core_dock.cfg.titlerotation == 'counterclockwise') {
|
||||
clockwise = false;
|
||||
} else if (M.core_dock.cfg.titlerotation == 'clockwise') {
|
||||
clockwise = true;
|
||||
} else {
|
||||
clockwise = (M.core_dock.cfg.titleorientation)(M.str.langconfig.thisdirectionvertical=='ttb');
|
||||
if (YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 8) {
|
||||
M.str.langconfig.thisdirectionvertical = 'ver';
|
||||
}
|
||||
|
||||
if (YAHOO.env.ua.ie > 0) {
|
||||
if (YAHOO.env.ua.ie > 7) {
|
||||
// IE8 can flip the text via CSS
|
||||
node.setAttribute('style', 'writing-mode: tb-rl; filter: flipV flipH;');
|
||||
} else {
|
||||
// IE < 7 can't do anything cool, just settle to stacked letters
|
||||
var clockwise = false;
|
||||
switch (M.str.langconfig.thisdirectionvertical) {
|
||||
case 'ver':
|
||||
title = title.split('').join('<br />');
|
||||
node.innerHTML = title;
|
||||
}
|
||||
return node;
|
||||
case 'ttb':
|
||||
clockwise = false;
|
||||
break;
|
||||
case 'btt':
|
||||
clockwise = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (YAHOO.env.ua.ie > 7) {
|
||||
// IE8 can flip the text via CSS
|
||||
node.setAttribute('style', 'writing-mode: tb-rl; filter: flipV flipH;');
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,6 @@ $string['strftimerecent'] = '%d %b, %H:%M';
|
||||
$string['strftimerecentfull'] = '%a, %d %b %Y, %I:%M %p';
|
||||
$string['strftimetime'] = '%I:%M %p';
|
||||
$string['thisdirection'] = 'ltr';
|
||||
$string['thisdirectionvertical'] = 'ttb';
|
||||
$string['thisdirectionvertical'] = 'btt';
|
||||
$string['thislanguage'] = 'English';
|
||||
$string['thousandssep'] = ',';
|
||||
|
Loading…
x
Reference in New Issue
Block a user