MDL-55276 html: New down arrow entity output $OUTPUT->darrow

This commit is contained in:
Jun Pataleta 2016-07-19 15:06:00 +08:00
parent d1a3ea62ef
commit 7a05bc92c9
3 changed files with 24 additions and 2 deletions

View file

@ -313,6 +313,13 @@ class theme_config {
*/
public $uarrow = null;
/**
* @var string Accessibility: Down arrow-like character.
* If the theme does not set characters, appropriate defaults
* are set automatically.
*/
public $darrow = null;
/**
* @var bool Some themes may want to disable ajax course editing.
*/
@ -491,7 +498,7 @@ class theme_config {
'parents', 'sheets', 'parents_exclude_sheets', 'plugins_exclude_sheets',
'javascripts', 'javascripts_footer', 'parents_exclude_javascripts',
'layouts', 'enable_dock', 'enablecourseajax', 'supportscssoptimisation',
'rendererfactory', 'csspostprocess', 'editor_sheets', 'rarrow', 'larrow', 'uarrow',
'rendererfactory', 'csspostprocess', 'editor_sheets', 'rarrow', 'larrow', 'uarrow', 'darrow',
'hidefromselector', 'doctype', 'yuicssmodules', 'blockrtlmanipulations',
'lessfile', 'extralesscallback', 'lessvariablescallback', 'blockrendermethod');
@ -570,7 +577,7 @@ class theme_config {
}
/**
* Checks if arrows $THEME->rarrow, $THEME->larrow, $THEME->uarrow have been set (theme/-/config.php).
* Checks if arrows $THEME->rarrow, $THEME->larrow, $THEME->uarrow, $THEME->darrow have been set (theme/-/config.php).
* If not it applies sensible defaults.
*
* Accessibility: right and left arrow Unicode characters for breadcrumb, calendar,
@ -584,6 +591,7 @@ class theme_config {
$this->rarrow = '►';
$this->larrow = '◄';
$this->uarrow = '▲';
$this->darrow = '▼';
if (empty($_SERVER['HTTP_USER_AGENT'])) {
$uagent = '';
} else {
@ -603,6 +611,7 @@ class theme_config {
$this->rarrow = '→';
$this->larrow = '←';
$this->uarrow = '↑';
$this->darrow = '↓';
}
elseif (isset($_SERVER['HTTP_ACCEPT_CHARSET'])
&& false === stripos($_SERVER['HTTP_ACCEPT_CHARSET'], 'utf-8')) {
@ -611,6 +620,7 @@ class theme_config {
$this->rarrow = '>';
$this->larrow = '<';
$this->uarrow = '^';
$this->darrow = 'v';
}
// RTL support - in RTL languages, swap r and l arrows