]> git.mjollnir.org Git - moodle.git/commitdiff
Accessibility: tidied, removed commented code functions, print_simple_box_start,...
authornfreear <nfreear>
Fri, 17 Mar 2006 12:27:18 +0000 (12:27 +0000)
committernfreear <nfreear>
Fri, 17 Mar 2006 12:27:18 +0000 (12:27 +0000)
lib/weblib.php

index bf36dd9f6975d997c54f88755015a130ee368695..0a788d9c8a27d29913f5082dcd57cb0ab9e8afb0 100644 (file)
@@ -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 <table> to 2 <div>s.
+    //Accessibility: print_simple_box replaced <table> with nested <div>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 "<table $align $width $id class=\"$class\" border=\"0\" cellpadding=\"$padding\" cellspacing=\"0\">".
-         "<tr><td $color class=\"$class"."content\">";
-    */
+    } 
     echo "<div $id class=\"$class\" style=\"$style_out\"><div class=\"$class"."content\" style=\"$style_in\">\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 '</td></tr></table>';
     echo "</div></div>\n";
 }