Bug #942392 - Wrapping sort order
link in a way that the image always belongs to the last word
This commit is contained in:
@@ -11,6 +11,8 @@ $Source$
|
|||||||
* Almost everyting: Be valid XHTML (probably still not completely).
|
* Almost everyting: Be valid XHTML (probably still not completely).
|
||||||
|
|
||||||
2004-04-27 Garvin Hicking <pma@supergarv.de>
|
2004-04-27 Garvin Hicking <pma@supergarv.de>
|
||||||
|
* libraries/display_tbl.lib.php: Bug #942392 - Wrapping sort order
|
||||||
|
link in a way that the image always belongs to the last word
|
||||||
* libraries/display_tbl.lib.php: RFE #867284 - Click on result row
|
* libraries/display_tbl.lib.php: RFE #867284 - Click on result row
|
||||||
to mark the checkbox.
|
to mark the checkbox.
|
||||||
* tbl_select.php: RFE #940194 - Add REGEXP to table search options
|
* tbl_select.php: RFE #940194 - Add REGEXP to table search options
|
||||||
|
@@ -812,36 +812,33 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|
|||||||
. '&sql_query=' . urlencode($sorted_sql_query);
|
. '&sql_query=' . urlencode($sorted_sql_query);
|
||||||
|
|
||||||
// 2.1.5 Displays the sorting url
|
// 2.1.5 Displays the sorting url
|
||||||
|
$order_link_pre = '<a href="sql.php?' . $url_query . '" ' . (($disp_direction == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'css') ? 'style="direction: ltr; writing-mode: tb-rl;"' : '') . ' title="' . $GLOBALS['strSort'] . '"' . '>';
|
||||||
|
$order_link_post = '</a>';
|
||||||
|
$order_link_content = ($disp_direction == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'fake' ? PMA_flipstring(htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name)), "<br />\n") : htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name)));
|
||||||
|
$order_link_words = explode(' ', $order_link_content);
|
||||||
|
if (isset($order_link_words[1])) {
|
||||||
|
$order_last_word_index = count($order_link_words)-1;
|
||||||
|
$order_last_word = $order_link_words[$order_last_word_index];
|
||||||
|
unset($order_link_words[$order_last_word_index]);
|
||||||
|
$order_link = $order_link_pre . implode(' ', $order_link_words)
|
||||||
|
. ' <div class="nobr">' . $order_last_word . $order_img . '</div>' . $order_link_post . "\n";
|
||||||
|
} else {
|
||||||
|
$order_link = '<div class="nobr">' . $order_link_pre . $order_link_content . $order_link_post . $order_img . '</div>' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') {
|
if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') {
|
||||||
echo "\n";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<th <?php echo $column_style; ?> <?php if ($disp_direction == 'horizontalflipped') echo 'valign="bottom"'; ?>>
|
<th <?php echo $column_style; ?> <?php if ($disp_direction == 'horizontalflipped') echo 'valign="bottom"'; ?>>
|
||||||
<?php
|
<?php echo $comments_table_wrap_pre; ?>
|
||||||
echo $comments_table_wrap_pre;
|
<?php echo $order_link; ?>
|
||||||
|
<?php echo $comments_table_wrap_post; ?>
|
||||||
echo '<a href="sql.php?' . $url_query . '" ';
|
|
||||||
if ($disp_direction == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'css') {
|
|
||||||
echo 'style="direction: ltr; writing-mode: tb-rl;"';
|
|
||||||
}
|
|
||||||
echo ' title="' . $GLOBALS['strSort'] . '">';
|
|
||||||
|
|
||||||
if ($disp_direction == 'horizontalflipped' && $GLOBALS['cfg']['HeaderFlipType'] == 'fake') {
|
|
||||||
echo PMA_flipstring(htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name)), "<br />\n");
|
|
||||||
} else {
|
|
||||||
echo htmlspecialchars(PMA_convert_display_charset($fields_meta[$i]->name));
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '</a>';
|
|
||||||
echo $order_img . "\n";
|
|
||||||
echo $comments_table_wrap_post;
|
|
||||||
?>
|
|
||||||
</th>
|
</th>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
$vertical_display['desc'][] = ' <th ' . $column_style . '>' . "\n"
|
$vertical_display['desc'][] = ' <th ' . $column_style . '>' . "\n"
|
||||||
. $comments_table_wrap_pre
|
. $comments_table_wrap_pre
|
||||||
. ' <a href="sql.php?' . $url_query . '">'
|
. $order_link
|
||||||
. htmlspecialchars($fields_meta[$i]->name) . '</a>' . $order_img . "\n"
|
|
||||||
. $comments_table_wrap_post
|
. $comments_table_wrap_post
|
||||||
. ' </th>' . "\n";
|
. ' </th>' . "\n";
|
||||||
} // end if (2.1)
|
} // end if (2.1)
|
||||||
@@ -1089,7 +1086,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql)
|
|||||||
}
|
}
|
||||||
} // end if (1.2.1)
|
} // end if (1.2.1)
|
||||||
|
|
||||||
if ($table == $GLOBALS['cfg']['Bookmark']['table'] && $db == $GLOBALS['cfg']['Bookmark']['db']) {
|
if ($table == $GLOBALS['cfg']['Bookmark']['table'] && $db == $GLOBALS['cfg']['Bookmark']['db'] && isset($row[1]) && isset($row[0])) {
|
||||||
$bookmark_go = '<a href="read_dump.php?'
|
$bookmark_go = '<a href="read_dump.php?'
|
||||||
. PMA_generate_common_url($row[1], '')
|
. PMA_generate_common_url($row[1], '')
|
||||||
. '&id_bookmark=' . $row[0]
|
. '&id_bookmark=' . $row[0]
|
||||||
|
Reference in New Issue
Block a user