Skip to content

Commit

Permalink
Replaced valign HTML attribute with CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetx committed Mar 31, 2012
1 parent df53a88 commit c9a370a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 22 deletions.
6 changes: 3 additions & 3 deletions db_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ function PMA_getSearchSqls($table, $field, $search_str, $search_option)
<td><input type="text" name="search_str" size="60"
value="<?php echo $searched; ?>" /></td>
</tr>
<tr><td class="right" valign="top">
<tr><td class="right vtop">
<?php echo __('Find:'); ?></td>
<td><?php

Expand All @@ -296,7 +296,7 @@ function PMA_getSearchSqls($table, $field, $search_str, $search_option)
?>
</td>
</tr>
<tr><td class="right" valign="top">
<tr><td class="right vtop">
<?php echo __('Inside tables:'); ?></td>
<td rowspan="2">
<?php
Expand All @@ -323,7 +323,7 @@ function PMA_getSearchSqls($table, $field, $search_str, $search_option)
?>
</td>
</tr>
<tr><td class="right" valign="bottom">
<tr><td class="right vbottom">
<?php echo $alter_select; ?></td>
</tr>
<tr><td class="right">
Expand Down
15 changes: 8 additions & 7 deletions libraries/display_tbl.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
<?php
// end horizontal/horizontalflipped mode
} else {
$vertical_display['textbtn'] = ' <th ' . $rowspan . ' valign="middle">' . "\n"
$vertical_display['textbtn'] = ' <th ' . $rowspan . ' class="vmiddle">' . "\n"
. ' ' . "\n"
. ' </th>' . "\n";
} // end vertical mode
Expand Down Expand Up @@ -1034,12 +1034,12 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
if ($GLOBALS['cfg']['BrowseMarkerEnable'] == true) {
$th_class[] = 'marker';
}
echo ' class="' . implode(' ', $th_class) . '"';
echo ' class="' . implode(' ', $th_class);

if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
echo ' valign="bottom"';
echo ' vbottom';
}
echo '>' . $order_link . $comments . '</th>';
echo '">' . $order_link . $comments . '</th>';
}
$vertical_display['desc'][] = ' <th '
. 'class="draggable'
Expand All @@ -1062,10 +1062,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
if ($condition_field) {
$th_class[] = 'condition';
}
echo ' class="' . implode(' ', $th_class) . '"';
echo ' class="' . implode(' ', $th_class);
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
echo ' valign="bottom"';
echo ' vbottom';
}
echo '"';
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped'
&& $GLOBALS['cfg']['HeaderFlipType'] == 'css'
) {
Expand Down Expand Up @@ -1107,7 +1108,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
<?php
// end horizontal/horizontalflipped mode
} else {
$vertical_display['textbtn'] = ' <th ' . $rowspan . ' valign="middle">' . "\n"
$vertical_display['textbtn'] = ' <th ' . $rowspan . ' class="vmiddle">' . "\n"
. ' ' . "\n"
. ' </th>' . "\n";
} // end vertical mode
Expand Down
4 changes: 2 additions & 2 deletions libraries/tbl_properties.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ function addField()
if ($action == 'tbl_create.php') {
?>
<table>
<tr valign="top">
<tr class="vtop">
<th><?php echo __('Table comments'); ?>:&nbsp;</th>
<td width="25">&nbsp;</td>
<th><?php echo __('Storage Engine'); ?>:
Expand Down Expand Up @@ -688,7 +688,7 @@ class="textfield" />
<?php
if (PMA_Partition::havePartitioning()) {
?>
<tr valign="top">
<tr class="vtop">
<th><?php echo __('PARTITION definition'); ?>:&nbsp;<?php echo PMA_showMySQLDocu('Partitioning', 'Partitioning'); ?>
</th>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions tbl_change.php
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ class="<?php echo $the_class; ?>" <?php echo $unnullify_trigger; ?>
<fieldset id="actions_panel">
<table cellpadding="5" cellspacing="0">
<tr>
<td valign="middle" class="nowrap">
<td class="nowrap vmiddle">
<select name="submit_type" class="control_at_footer" tabindex="<?php echo ($tabindex + $tabindex_for_value + 1); ?>">
<?php
if (isset($where_clause)) {
Expand All @@ -1070,10 +1070,10 @@ class="<?php echo $the_class; ?>" <?php echo $unnullify_trigger; ?>
}
?>
</td>
<td valign="middle">
<td class="vmiddle">
&nbsp;&nbsp;&nbsp;<strong><?php echo __('and then'); ?></strong>&nbsp;&nbsp;&nbsp;
</td>
<td valign="middle" class="nowrap">
<td class="nowrap vmiddle">
<select name="after_insert">
<option value="back" <?php echo ($after_insert == 'back' ? 'selected="selected"' : ''); ?>><?php echo __('Go back to previous page'); ?></option>
<option value="new_insert" <?php echo ($after_insert == 'new_insert' ? 'selected="selected"' : ''); ?>><?php echo __('Insert another new row'); ?></option>
Expand Down Expand Up @@ -1101,7 +1101,7 @@ class="<?php echo $the_class; ?>" <?php echo $unnullify_trigger; ?>
<td>
<?php echo PMA_showHint(__('Use TAB key to move from value to value, or CTRL+arrows to move anywhere')); ?>
</td>
<td colspan="3" class="right" valign="middle">
<td colspan="3" class="right vmiddle">
<input type="submit" class="control_at_footer" value="<?php echo __('Go'); ?>" tabindex="<?php echo ($tabindex + $tabindex_for_value + 6); ?>" id="buttonYes" />
<input type="reset" class="control_at_footer" value="<?php echo __('Reset'); ?>" tabindex="<?php echo ($tabindex + $tabindex_for_value + 7); ?>" />
</td>
Expand Down
4 changes: 2 additions & 2 deletions tbl_printview.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
<tr>

<!-- Space usage -->
<td valign="top">
<td class="vtop">
<big><?php echo __('Space usage') . ':'; ?></big>
<table width="100%">
<tr>
Expand Down Expand Up @@ -321,7 +321,7 @@
<td width="20">&nbsp;</td>

<!-- Rows Statistic -->
<td valign="top">
<td class="vtop">
<big><?php echo __('Row Statistics') . ':'; ?></big>
<table width="100%">
<tr>
Expand Down
8 changes: 6 additions & 2 deletions themes/original/css/theme_right.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,15 @@
text-align: right;
}

th.vtop, td.vtop {
tr.vtop, th.vtop, td.vtop {
vertical-align: top;
}

th.vbottom, td.vbottom {
tr.vmiddle, th.vmiddle, td.vmiddle {
vertical-align: middle;
}

tr.vbottom, th.vbottom, td.vbottom {
vertical-align: bottom;
}

Expand Down
8 changes: 6 additions & 2 deletions themes/pmahomme/css/theme_right.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,15 @@
text-align: right;
}

th.vtop, td.vtop {
tr.vtop, th.vtop, td.vtop {
vertical-align: top;
}

th.vbottom, td.vbottom {
tr.vmiddle, th.vmiddle, td.vmiddle {
vertical-align: middle;
}

tr.vbottom, th.vbottom, td.vbottom {
vertical-align: bottom;
}

Expand Down

0 comments on commit c9a370a

Please sign in to comment.