From 97f76a1aa3d1743f9ef2394689a49badf95072ff Mon Sep 17 00:00:00 2001 From: nfreear Date: Thu, 16 Mar 2006 11:03:02 +0000 Subject: [PATCH] weblib.php: replaced in print_simple_box_start _end with
s (OU-Bugz: 737) --- lib/weblib.php | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index fb80b6fcb6..ada6f82e58 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2500,36 +2500,50 @@ function print_simple_box($message, $align='', $width='', $color='', $padding=5, /** * Print the top portion of a standard themed box. * - * @param string $align ? - * @param string $width ? - * @param string $color ? - * @param int $padding ? - * @param string $class ? + * @param string $align string, alignment of the box, not the text (left, center, right). + * @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. + * @param string $class string, space-separated class names. * @todo Finish documenting this function */ function print_simple_box_start($align='', $width='', $color='', $padding=5, $class='generalbox', $id='') { + //TODO (nfreear): Accessibility: tidy up, print_simple_box
to 2
s. + $style_out = ''; + $style_in = ''; + if ($padding) { + $style_in .= 'padding:'. $padding .'px; '; + } + if ($color) { + $style_out .= 'background-color:'. $color .'; '; $color = 'bgcolor="'. $color .'"'; } if ($align) { - $align = 'align="'. $align .'"'; + $align = 'align="'. $align .'"'; } 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 "
". "
"; + */ + echo "
\n"; } /** * Print the end portion of a standard themed box. */ function print_simple_box_end() { - echo '
'; + //echo ''; + echo "\n"; } /** -- 2.39.5