From: moodler Date: Mon, 20 Mar 2006 15:33:18 +0000 (+0000) Subject: Small fix for admin menu layout and also print_table X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5889c1bb64b83cd7ccbcaeecc3c0867b671cd6c9;p=moodle.git Small fix for admin menu layout and also print_table --- diff --git a/admin/index.php b/admin/index.php index db93b82aab..634be0b774 100644 --- a/admin/index.php +++ b/admin/index.php @@ -366,12 +366,12 @@ print_simple_box_end(); } - $table->tablealign = "right"; + $table->tablealign = "center"; $table->align = array ("right", "left"); $table->wrap = array ("nowrap", "nowrap"); $table->cellpadding = 5; $table->cellspacing = 0; - $table->width = '100%'; + $table->width = '40%'; $configdata = ''; diff --git a/lib/weblib.php b/lib/weblib.php index 38f974eb5a..b78518cba3 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2910,6 +2910,7 @@ function print_png($url, $sizex, $sizey, $returnstring, $parameters='alt=""') { *
  • $table->wrap - An array of "nowrap"s or nothing *
  • $table->data[] - An array of arrays containing the data. *
  • $table->width - A percentage of the page + *
  • $table->tablealign - Align the whole table *
  • $table->cellpadding - Padding on each cell *
  • $table->cellspacing - Spacing between cells * @@ -2950,6 +2951,10 @@ function print_table($table) { $table->width = '80%'; } + if (empty($table->tablealign)) { + $table->tablealign = 'center'; + } + if (empty($table->cellpadding)) { $table->cellpadding = '5'; } @@ -2964,8 +2969,7 @@ function print_table($table) { $tableid = empty($table->id) ? '' : 'id="'.$table->id.'"'; - print_simple_box_start('center', $table->width, '#ffffff', 0); - echo 'cellpadding\" cellspacing=\"$table->cellspacing\" class=\"$table->class\" $tableid>\n"; $countcols = 0; @@ -3011,7 +3015,6 @@ function print_table($table) { } } echo '
    '."\n"; - print_simple_box_end(); return true; }