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

View file

@ -3616,6 +3616,17 @@ EOD;
return $this->page->theme->uarrow;
}
/**
* Accessibility: Down arrow-like character.
* If the theme does not set characters, appropriate defaults
* are set automatically.
*
* @return string
*/
public function darrow() {
return $this->page->theme->darrow;
}
/**
* Returns the custom menu if one has been set
*

View file

@ -46,6 +46,7 @@ information provided here is intended especially for developers.
Calling them through the magic method __call() will throw a coding exception.
* The alfresco library has been removed from core. It was an old version of
the library which was not compatible with newer versions of Alfresco.
* Added down arrow: $OUTPUT->darrow.
=== 3.1 ===