Fixed bug #3374802 - Comment on a column breaks inline editing
This commit is contained in:

committed by
Michal Čihař

parent
11ad4fd992
commit
c17add38ed
@@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog
|
|||||||
3.4.5.0 (not yet released)
|
3.4.5.0 (not yet released)
|
||||||
- bug #3375325 [interface] Page list in navigation frame looks odd
|
- bug #3375325 [interface] Page list in navigation frame looks odd
|
||||||
- bug #3313235 [interface] Error div misplaced
|
- bug #3313235 [interface] Error div misplaced
|
||||||
|
- bug #3374802 [interface] Comment on a column breaks inline editing
|
||||||
|
|
||||||
3.4.4.0 (not yet released)
|
3.4.4.0 (not yet released)
|
||||||
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
|
- bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes
|
||||||
|
16
js/sql.js
16
js/sql.js
@@ -33,10 +33,10 @@ function PMA_urlencode(str) {
|
|||||||
function getFieldName($this_field, disp_mode) {
|
function getFieldName($this_field, disp_mode) {
|
||||||
|
|
||||||
if(disp_mode == 'vertical') {
|
if(disp_mode == 'vertical') {
|
||||||
var field_name = $this_field.siblings('th').find('a').text();
|
var $field = $this_field.siblings('th').find('a').clone();
|
||||||
// happens when just one row (headings contain no a)
|
// happens when just one row (headings contain no a)
|
||||||
if ("" == field_name) {
|
if ($field.length == 0) {
|
||||||
field_name = $this_field.siblings('th').text();
|
$field = $this_field.siblings('th').clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -44,14 +44,14 @@ function getFieldName($this_field, disp_mode) {
|
|||||||
// ltr or rtl direction does not impact how the DOM was generated
|
// ltr or rtl direction does not impact how the DOM was generated
|
||||||
//
|
//
|
||||||
// 5 columns to account for the checkbox, edit, appended inline edit, copy and delete anchors but index is zero-based so substract 4
|
// 5 columns to account for the checkbox, edit, appended inline edit, copy and delete anchors but index is zero-based so substract 4
|
||||||
var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+') a').text();
|
var $field = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+') a').clone();
|
||||||
// happens when just one row (headings contain no a)
|
// happens when just one row (headings contain no a)
|
||||||
if ("" == field_name) {
|
if ($field.length == 0) {
|
||||||
field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+')').text();
|
$field = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+')').clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$field.children().remove();
|
||||||
field_name = $.trim(field_name);
|
var field_name = $.trim($field.text());
|
||||||
|
|
||||||
return field_name;
|
return field_name;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user