Vertical column highlighing did not work in all cases
This commit is contained in:
10
js/sql.js
10
js/sql.js
@@ -694,27 +694,27 @@ $(document).ready(function() {
|
|||||||
/**
|
/**
|
||||||
* Starting from some th, change the class of all td under it
|
* Starting from some th, change the class of all td under it
|
||||||
*/
|
*/
|
||||||
function PMA_changeClassForColumn($this_th, klass) {
|
function PMA_changeClassForColumn($this_th, newclass) {
|
||||||
// index 0 is the th containing the big T
|
// index 0 is the th containing the big T
|
||||||
var th_index = $this_th.index();
|
var th_index = $this_th.index();
|
||||||
// .eq() is zero-based
|
// .eq() is zero-based
|
||||||
th_index--;
|
th_index--;
|
||||||
var $tr_with_data = $this_th.closest('table').find('tbody tr ').has('td.data_inline_edit');
|
var $tr_with_data = $this_th.closest('table').find('tbody tr ').has('td.data');
|
||||||
$tr_with_data.each(function() {
|
$tr_with_data.each(function() {
|
||||||
$(this).find('td.data_inline_edit:eq('+th_index+')').toggleClass(klass);
|
$(this).find('td.data:eq('+th_index+')').toggleClass(newclass);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
/**
|
/**
|
||||||
* column highlighting in horizontal mode when hovering over the column header
|
* vertical column highlighting in horizontal mode when hovering over the column header
|
||||||
*/
|
*/
|
||||||
$('.column_heading').live('hover', function() {
|
$('.column_heading').live('hover', function() {
|
||||||
PMA_changeClassForColumn($(this), 'hover');
|
PMA_changeClassForColumn($(this), 'hover');
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* column marking in horizontal mode when clicking the column header
|
* vertical column marking in horizontal mode when clicking the column header
|
||||||
*/
|
*/
|
||||||
$('.column_heading').live('click', function() {
|
$('.column_heading').live('click', function() {
|
||||||
PMA_changeClassForColumn($(this), 'marked');
|
PMA_changeClassForColumn($(this), 'marked');
|
||||||
|
@@ -1227,7 +1227,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
$is_field_truncated = false;
|
$is_field_truncated = false;
|
||||||
//If the previous column had blob data, we need to reset the class
|
//If the previous column had blob data, we need to reset the class
|
||||||
// to $data_inline_edit_class
|
// to $data_inline_edit_class
|
||||||
$class = $data_inline_edit_class . ' ' . $alternating_color_class;
|
$class = 'data ' . $data_inline_edit_class . ' ' . $alternating_color_class;
|
||||||
|
|
||||||
// See if this column should get highlight because it's used in the
|
// See if this column should get highlight because it's used in the
|
||||||
// where-query.
|
// where-query.
|
||||||
@@ -1312,8 +1312,9 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
// TEXT fields type so we have to ensure it's really a BLOB
|
// TEXT fields type so we have to ensure it's really a BLOB
|
||||||
$field_flags = PMA_DBI_field_flags($dt_result, $i);
|
$field_flags = PMA_DBI_field_flags($dt_result, $i);
|
||||||
|
|
||||||
// reset $class from $data_inline_edit_class to '' as we can't edit binary data
|
// reset $class from $data_inline_edit_class to just 'data'
|
||||||
$class = '';
|
// as we can't edit binary data
|
||||||
|
$class = 'data';
|
||||||
|
|
||||||
if (stristr($field_flags, 'BINARY')) {
|
if (stristr($field_flags, 'BINARY')) {
|
||||||
if (!isset($row[$i]) || is_null($row[$i])) {
|
if (!isset($row[$i]) || is_null($row[$i])) {
|
||||||
@@ -1352,8 +1353,9 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
|
|||||||
// g e o m e t r y
|
// g e o m e t r y
|
||||||
} elseif ($meta->type == 'geometry') {
|
} elseif ($meta->type == 'geometry') {
|
||||||
$geometry_text = PMA_handle_non_printable_contents('GEOMETRY', (isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options, $default_function, $meta);
|
$geometry_text = PMA_handle_non_printable_contents('GEOMETRY', (isset($row[$i]) ? $row[$i] : ''), $transform_function, $transform_options, $default_function, $meta);
|
||||||
// reset $class from $data_inline_edit_class to '' as we can't edit geometry data
|
// reset $class from $data_inline_edit_class to 'data'
|
||||||
$class = '';
|
// as we can't edit geometry data
|
||||||
|
$class = 'data';
|
||||||
$vertical_display['data'][$row_no][$i] = PMA_buildValueDisplay($class, $condition_field, $geometry_text);
|
$vertical_display['data'][$row_no][$i] = PMA_buildValueDisplay($class, $condition_field, $geometry_text);
|
||||||
unset($geometry_text);
|
unset($geometry_text);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user