diff --git a/js/sql.js b/js/sql.js index e37e2259e..5593446b0 100644 --- a/js/sql.js +++ b/js/sql.js @@ -74,7 +74,6 @@ function appendInlineAnchor() { $cloned_tr.find('td') .addClass('inline_edit_anchor') - .find('span.sep, a:last').remove().end() .find('a').attr('href', '#') .find('span') .text(' ' + PMA_messages['strInlineEdit']) @@ -99,7 +98,6 @@ function appendInlineAnchor() { $img_object.attr('src', img_src); $cloned_anchor.addClass('inline_edit_anchor') - .find('span.sep, a:last').remove().end() .find('a').attr('href', '#') .find('span') .text(' ' + PMA_messages['strInlineEdit']) @@ -110,8 +108,8 @@ function appendInlineAnchor() { $('#rowsDeleteForm').find('thead, tbody').find('th').each(function() { var $this_th = $(this); - if ($this_th.attr('colspan') == 3) { - $this_th.attr('colspan', '4') + if ($this_th.attr('colspan') == 4) { + $this_th.attr('colspan', '5') } }); } diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 2831fdf51..54d124ef9 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -641,11 +641,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') { $colspan = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') - ? ' colspan="3"' + ? ' colspan="4"' : ''; } else { $rowspan = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') - ? ' rowspan="3"' + ? ' rowspan="4"' : ''; } @@ -1162,6 +1162,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $copy_url = 'tbl_change.php' . PMA_generate_common_url($_url_params + array('default_action' => 'insert')); $edit_str = PMA_getIcon('b_edit.png', __('Edit'), true); + $copy_str = PMA_getIcon('b_insrow.png', __('Copy'), true); // Class definitions required for inline editing jQuery scripts $edit_anchor_class = "edit_row_anchor"; @@ -1225,7 +1226,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { if (! isset($js_conf)) { $js_conf = ''; } - echo PMA_generateCheckboxAndLinks('left', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'l', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $del_str, $js_conf); + echo PMA_generateCheckboxAndLinks('left', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'l', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf); } // end if (1.3) } // end if (1) @@ -1440,7 +1441,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { if (! isset($js_conf)) { $js_conf = ''; } - echo PMA_generateCheckboxAndLinks('right', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'r', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $del_str, $js_conf); + echo PMA_generateCheckboxAndLinks('right', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'r', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf); } // end if (3) if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal' @@ -2482,19 +2483,44 @@ function PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_cla * * @uses PMA_linkOrButton() * @param string $edit_url - * @param string $copy_url * @param string $class * @param string $edit_str * @param string $where_clause * @param string $where_clause_html * @return string the generated HTML */ -function PMA_generateEditLink($edit_url, $copy_url, $class, $edit_str, $where_clause, $where_clause_html) { +function PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $where_clause_html) { $ret = ''; if (! empty($edit_url)) { $ret .= '