Various XHTML Strict fixes for popup links and simple box

This commit is contained in:
moodler 2007-01-04 15:16:31 +00:00
parent 47325bb53d
commit 593bc22bf5

View file

@ -564,8 +564,8 @@ function link_to_popup_window ($url, $name='popup', $linkname='click here',
$url = substr($url, strlen($CFG->wwwroot)); $url = substr($url, strlen($CFG->wwwroot));
} }
$link = '<a target="'. $name .'" title="'. s($title) .'" href="'. $CFG->wwwroot . $url .'" '. $link = '<a title="'. s($title) .'" href="'. $CFG->wwwroot . $url .'" '.
"onclick=\"return openpopup('$url', '$name', '$options', $fullscreen);\">$linkname</a>"; "onclick=\"this.target='$name'; return openpopup('$url', '$name', '$options', $fullscreen);\">$linkname</a>";
if ($return) { if ($return) {
return $link; return $link;
} else { } else {
@ -2812,7 +2812,7 @@ function print_navigation ($navigation, $separator=0, $return=false) {
* @param int $size The size to set the font for text display. * @param int $size The size to set the font for text display.
*/ */
function print_headline($text, $size=2, $return=false) { function print_headline($text, $size=2, $return=false) {
$output = print_heading($text, 'left', $size, true); $output = print_heading($text, '', $size, true);
if ($return) { if ($return) {
return $output; return $output;
} else { } else {
@ -2948,20 +2948,23 @@ function print_simple_box_start($align='', $width='', $color='', $padding=5, $cl
$output = ''; $output = '';
if ($color) { $tableclasses = $class;
$color = 'bgcolor="'. $color .'"';
}
if ($align) { if ($align) {
$align = 'align="'. $align .'"'; $tableclasses .= ' boxalign'.$align; // Implement alignment using a class
} }
if ($width) { if ($width) {
$width = 'width="'. $width .'"'; $width = ' style="width:'.$width.'"';
} }
if ($id) { if ($id) {
$id = 'id="'. $id .'"'; $id = 'id="'.$id.'"';
} }
$output .= "<table $align $width $id class=\"$class\" border=\"0\" cellpadding=\"$padding\" cellspacing=\"0\">". if ($color) {
"<tr><td $color class=\"$class"."content\">"; $color = ' style="background:'.$color.'"';
}
$output .= '<table'.$width.' '.$id.' class="'.$tableclasses.'">'.
'<tr><td'.$color.' class="'.$class.'content">';
if ($return) { if ($return) {
return $output; return $output;