From: nfreear Date: Fri, 17 Mar 2006 12:27:18 +0000 (+0000) Subject: Accessibility: tidied, removed commented code functions, print_simple_box_start,... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5288e4a5ff74c24716ae1dfb6be8d3226b514df1;p=moodle.git Accessibility: tidied, removed commented code functions, print_simple_box_start, _end (followup to OU-Bugz: 737) --- diff --git a/lib/weblib.php b/lib/weblib.php index bf36dd9f69..0a788d9c8a 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2500,7 +2500,7 @@ function print_simple_box($message, $align='', $width='', $color='', $padding=5, /** * Print the top portion of a standard themed box. * - * @param string $align string, alignment of the box, not the text (left, center, right). + * @param string $align string, alignment of the box, not the text (not used, box is always centred). * @param string $width string, width of the box, including units, for example '100%'. * @param string $color string, background colour of the box, for example '#eee'. * @param int $padding integer, padding in pixels, specified without units. @@ -2509,7 +2509,7 @@ function print_simple_box($message, $align='', $width='', $color='', $padding=5, */ function print_simple_box_start($align='', $width='', $color='', $padding=5, $class='generalbox', $id='') { - //TODO (nfreear): Accessibility: tidy up, print_simple_box to 2
s. + //Accessibility: print_simple_box replaced
with nested
s. $style_out = ''; $style_in = ''; if ($padding) { @@ -2518,23 +2518,15 @@ function print_simple_box_start($align='', $width='', $color='', $padding=5, $cl if ($color) { $style_out .= 'background-color:'. $color .'; '; - $color = 'bgcolor="'. $color .'"'; - } - if ($align) { - $align = 'align="'. $align .'"'; } + //Note, $align not used - box is always centred. if ($width) { //Note, width units provided. $style_out .= 'width:'. $width .'; margin-left:auto; margin-right:auto;'; - $width = 'width="'. $width .'"'; } if ($id) { $id = 'id="'. $id .'"'; - } - - /*echo "
". - "
"; - */ + } echo "
\n"; } @@ -2542,7 +2534,6 @@ function print_simple_box_start($align='', $width='', $color='', $padding=5, $cl * Print the end portion of a standard themed box. */ function print_simple_box_end() { - //echo '
'; echo "\n"; }