From 7d269f18c364600c95d0ca6a67f4297b94bcfaf4 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 12 Feb 2011 07:00:57 -0500 Subject: [PATCH 1/2] Inline edit (horizontal) broken after addition of the Copy column --- js/sql.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/sql.js b/js/sql.js index 80f43375b..0966156e9 100644 --- a/js/sql.js +++ b/js/sql.js @@ -37,11 +37,11 @@ function getFieldName($this_field, disp_mode) { var this_field_index = $this_field.index(); // ltr or rtl direction does not impact how the DOM was generated // - // 4 columns to account for the checkbox, edit, delete and appended inline edit anchors but index is zero-based so substract 3 - var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+') a').text(); + // 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(); // happens when just one row (headings contain no a) if ("" == field_name) { - field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-3 )+')').text(); + field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+')').text(); } } From 6169cc11e1aa2cacf96f3bb507f6a98ecc36520e Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 12 Feb 2011 07:27:52 -0500 Subject: [PATCH 2/2] Vertical display was broken --- libraries/display_tbl.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 0486e4c57..90aea59fe 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1473,7 +1473,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { } if (isset($edit_url)) { - $vertical_display['edit'][$row_no] .= PMA_generateEditLink($edit_url, $copy_url, $alternating_color_class . ' ' . $edit_anchor_class . $vertical_class, $edit_str, $where_clause, $where_clause_html); + $vertical_display['edit'][$row_no] .= PMA_generateEditLink($edit_url, $alternating_color_class . ' ' . $edit_anchor_class . $vertical_class, $edit_str, $where_clause, $where_clause_html); } else { unset($vertical_display['edit'][$row_no]); } @@ -2559,6 +2559,7 @@ function PMA_generateDeleteLink($del_url, $del_str, $js_conf, $class) { /** * Generates checkbox and links at some position (left or right) + * (only called for horizontal mode) * * @uses PMA_generateCheckboxForMulti() * @uses PMA_generateEditLink()