mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
Fixes bug MDL-9753, "THEME->larrow, rarrow don't work in stock IE6"
This commit is contained in:
parent
d6ff5b31ba
commit
ce3735d453
@ -45,8 +45,7 @@ class ExHtmlReporter extends HtmlReporter {
|
||||
|
||||
$this->strrunonlyfolder = $this->get_string('runonlyfolder');
|
||||
$this->strrunonlyfile = $this->get_string('runonlyfile');
|
||||
check_theme_arrows();
|
||||
$this->strseparator = ' <span class="sep">'.$THEME->rarrow.'</span> ';
|
||||
$this->strseparator = ' '.get_arrow_right().' ';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,8 +29,7 @@ class block_search_forums extends block_base {
|
||||
$search = get_string('search');
|
||||
|
||||
//Accessibility: replaced <input value=" />" type="submit"> with configurable text/'silent' character.
|
||||
check_theme_arrows();
|
||||
// Theme config, $CFG->block_search_button = $THEME->rarrow .'<span class="accesshide">'.get_string('search').'</span>';
|
||||
// Theme config, $CFG->block_search_button = get_arrow_right() .'<span class="accesshide">'.get_string('search').'</span>';
|
||||
$button = (isset($CFG->block_search_button)) ? $CFG->block_search_button : get_string('go');
|
||||
|
||||
$this->content->text = '<div class="searchform">';
|
||||
|
@ -620,9 +620,8 @@ function calendar_top_controls($type, $data) {
|
||||
$data['y'] = $date['year'];
|
||||
|
||||
//Accessibility: calendar block controls, replaced <table> with <div>.
|
||||
check_theme_arrows();
|
||||
$nexttext = $THEME->rarrow .'<span class="accesshide">'.get_string('monthnext','access').'</span>';
|
||||
$prevtext = $THEME->larrow .'<span class="accesshide">'.get_string('monthprev','access').'</span>';
|
||||
$nexttext = get_arrow_right().'<span class="accesshide">'.get_string('monthnext','access').'</span>';
|
||||
$prevtext = get_arrow_left() .'<span class="accesshide">'.get_string('monthprev','access').'</span>';
|
||||
|
||||
switch($type) {
|
||||
case 'frontpage':
|
||||
@ -661,7 +660,7 @@ function calendar_top_controls($type, $data) {
|
||||
$content .= '<div class="calendar-controls">';
|
||||
$content .= '<span class="previous"><a href="'.calendar_get_link_href('view.php?view=month&', 1, $prevmonth, $prevyear)."\"> $THEME->larrow ".userdate($prevdate, get_string('strftimemonthyear')).'</a></span>';
|
||||
$content .= '<span class="hide"> | </span><span class="current">'.userdate($time, get_string('strftimemonthyear'))."</span>\n";
|
||||
$content .= '<span class="hide"> | </span><span class="next"><a href="'.calendar_get_link_href('view.php?view=month&', 1, $nextmonth, $nextyear).'">'.userdate($nextdate, get_string('strftimemonthyear'))." $THEME->rarrow</a></span>\n";
|
||||
$content .= '<span class="hide"> | </span><span class="next"><a href="'.calendar_get_link_href('view.php?view=month&', 1, $nextmonth, $nextyear).'">'.userdate($nextdate, get_string('strftimemonthyear')).' '.get_arrow_left()."</a></span>\n";
|
||||
$content .= "<span class=\"clearer\"><!-- --></span></div>\n";
|
||||
break;
|
||||
case 'day':
|
||||
@ -685,7 +684,7 @@ function calendar_top_controls($type, $data) {
|
||||
// Print the actual thing
|
||||
$content .= '<span class="hide"> | </span><span class="current">'.$text.'</span>';
|
||||
|
||||
$content .= '<span class="hide"> | </span><span class="next"><a href="'.calendar_get_link_href('view.php?view=day&', $nextdate['mday'], $nextdate['mon'], $nextdate['year']).'">'.$nextname." $THEME->rarrow</a></span>\n";
|
||||
$content .= '<span class="hide"> | </span><span class="next"><a href="'.calendar_get_link_href('view.php?view=day&', $nextdate['mday'], $nextdate['mon'], $nextdate['year']).'">'.$nextname.' '.get_arrow_right()."</a></span>\n";
|
||||
$content .= "<span class=\"clearer\"><!-- --></span></div>\n";
|
||||
break;
|
||||
}
|
||||
|
@ -7015,10 +7015,9 @@ function setup_lang_from_browser() {
|
||||
* navigation strings.
|
||||
*/
|
||||
function build_navigation($extrabreadcrumbs) {
|
||||
global $CFG, $THEME, $COURSE;
|
||||
global $CFG, $COURSE;
|
||||
|
||||
$navigation = '';
|
||||
check_theme_arrows();
|
||||
|
||||
//Site name
|
||||
if ($site = get_site()) {
|
||||
@ -7048,7 +7047,7 @@ function build_navigation($extrabreadcrumbs) {
|
||||
}
|
||||
$navigation .= '<li class="first">';
|
||||
if ($i > 0) {
|
||||
$navigation .= '<span class="sep"> '.$THEME->rarrow.' </span>';
|
||||
$navigation .= ' '.get_arrow_right('sep').' ';
|
||||
}
|
||||
if ($breadcrumbs[$i]['link'] && $i+1 < $countcrumb) {
|
||||
$navigation .= "<a onclick=\"this.target='$CFG->framename'\" href=\"{$breadcrumbs[$i]['link']}\">";
|
||||
@ -7090,4 +7089,4 @@ function in_object_vars($var, $object)
|
||||
}
|
||||
|
||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||
?>
|
||||
?>
|
@ -3098,6 +3098,38 @@ function check_theme_arrows() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return (by default) the right arrow defined in check_theme_arrows function above.
|
||||
* @param addclass Additional class names.
|
||||
* @param return Default true, false means echo.
|
||||
* @return Default HTML string, or nothing.
|
||||
*/
|
||||
function get_arrow_right($addclass='', $return=true) {
|
||||
global $THEME;
|
||||
check_theme_arrows();
|
||||
$output = '<span class="arrow '.$addclass.'">'.$THEME->rarrow.'</span>';
|
||||
if ($return) {
|
||||
return $output;
|
||||
} else {
|
||||
echo $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return (by default) the left arrow defined in check_theme_arrows function above.
|
||||
*/
|
||||
function get_arrow_left($addclass='', $return=true) {
|
||||
global $THEME;
|
||||
check_theme_arrows();
|
||||
$output = '<span class="arrow '.$addclass.'">'.$THEME->larrow.'</span>';
|
||||
if ($return) {
|
||||
return $output;
|
||||
} else {
|
||||
echo $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints breadcrumb trail of links, called in theme/-/header.html
|
||||
*
|
||||
@ -3111,12 +3143,8 @@ function print_navigation ($navigation, $separator=0, $return=false) {
|
||||
global $CFG, $THEME;
|
||||
$output = '';
|
||||
|
||||
check_theme_arrows();
|
||||
if (0 === $separator) {
|
||||
$separator = $THEME->rarrow;
|
||||
}
|
||||
if (!empty($separator)) {
|
||||
$separator = '<span class="sep">'. $separator .'</span>';
|
||||
$separator = get_arrow_right('sep');
|
||||
}
|
||||
|
||||
if ($navigation) {
|
||||
@ -3151,11 +3179,11 @@ function print_navigation ($navigation, $separator=0, $return=false) {
|
||||
$site = new object();
|
||||
$site->shortname = get_string('home');
|
||||
}
|
||||
|
||||
|
||||
//Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character.
|
||||
$nav_text = get_string('youarehere','access');
|
||||
$output .= '<h2 class="accesshide">'.$nav_text."</h2><ul>\n";
|
||||
|
||||
|
||||
$output .= '<li class="first">'."\n".'<a '.$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'
|
||||
.$CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))
|
||||
&& !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
|
||||
@ -3655,11 +3683,11 @@ has_capability('moodle/course:viewhiddenuserfields', $context)) {
|
||||
/**
|
||||
* Print a specified group's avatar.
|
||||
*
|
||||
* @param group $group A {@link group} object representing a group or array of groups
|
||||
* @param int $courseid ?
|
||||
* @param boolean $large ?
|
||||
* @param boolean $return ?
|
||||
* @param boolean $link ?
|
||||
* @param group $group A single {@link group} object OR array of groups.
|
||||
* @param int $courseid The course ID.
|
||||
* @param boolean $large Default small picture, or large.
|
||||
* @param boolean $return If false print picture, otherwise return the output as string
|
||||
* @param boolean $link Enclose image in a link to view specified course?
|
||||
* @return string
|
||||
* @todo Finish documenting this function
|
||||
*/
|
||||
@ -4629,7 +4657,6 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
|
||||
}
|
||||
}
|
||||
//Accessibility: added Alt text, replaced > < with 'silent' character and 'accesshide' text.
|
||||
check_theme_arrows();
|
||||
|
||||
if ($selectmod and has_capability('moodle/site:viewreports', $context)) {
|
||||
$logstext = get_string('alllogs');
|
||||
@ -4643,14 +4670,14 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
|
||||
$backtext= get_string('activityprev', 'access');
|
||||
$backmod = '<li>'."\n".'<form action="'.$CFG->wwwroot.'/mod/'.$backmod->mod.'/view.php" '.$CFG->frametarget.'>'."\n".'<div>'."\n".
|
||||
'<input type="hidden" name="id" value="'.$backmod->cm.'" />'."\n".
|
||||
'<button type="submit" title="'.$backtext.'">'.$THEME->larrow."\n".
|
||||
'<button type="submit" title="'.$backtext.'">'.get_arrow_left()."\n".
|
||||
'<span class="accesshide">'.$backtext.'</span>'."\n".'</button>'."\n".'</div>'."\n".'</form>'."\n".'</li>'."\n";
|
||||
}
|
||||
if ($nextmod) {
|
||||
$nexttext= get_string('activitynext', 'access');
|
||||
$nextmod = '<li>'."\n".'<form action="'.$CFG->wwwroot.'/mod/'.$nextmod->mod.'/view.php" '.$CFG->frametarget.'>'."\n".'<div>'."\n".
|
||||
'<input type="hidden" name="id" value="'.$nextmod->cm.'" />'."\n".
|
||||
'<button type="submit" title="'.$nexttext.'">'.$THEME->rarrow."\n".
|
||||
'<button type="submit" title="'.$nexttext.'">'.get_arrow_right()."\n".
|
||||
'<span class="accesshide">'.$nexttext.'</span>'."\n".'</button>'."\n".'</div>'."\n".'</form>'."\n".'</li>'."\n";
|
||||
}
|
||||
|
||||
@ -6122,4 +6149,4 @@ function print_location_comment($file, $line, $return = false)
|
||||
}
|
||||
}
|
||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||
?>
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user