From 6d128829463cff5e3a293ace173fdaa014a60f0f Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 12 Jan 2015 13:51:34 +0530 Subject: [PATCH 1/8] Remove display direction Signed-off-by: Madhura Jayaratne --- config.sample.inc.php | 6 - doc/config.rst | 20 - libraries/DisplayResults.class.php | 575 +++----------------- libraries/config.default.php | 20 - libraries/config.values.php | 1 - libraries/config/messages.inc.php | 3 - libraries/config/setup.forms.php | 2 - libraries/config/user_preferences.forms.php | 2 - test/classes/PMA_DisplayResults_test.php | 63 +-- 9 files changed, 80 insertions(+), 612 deletions(-) diff --git a/config.sample.inc.php b/config.sample.inc.php index 048b42d2fd..035ebb80db 100644 --- a/config.sample.inc.php +++ b/config.sample.inc.php @@ -115,12 +115,6 @@ $cfg['SaveDir'] = ''; //$cfg['DefaultLang'] = 'en'; //$cfg['DefaultLang'] = 'de'; -/** - * default display direction (horizontal|vertical|horizontalflipped) - */ -//$cfg['DefaultDisplay'] = 'vertical'; - - /** * How many columns should be used for table display of a database? * (a value larger than 1 results in some information being hidden) diff --git a/doc/config.rst b/doc/config.rst index f5603e3b1b..ae47e5b9c2 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -2252,18 +2252,6 @@ Design customization the left side, right side, both sides or nowhere). "left" and "right" are parsed as "top" and "bottom" with vertical display mode. -.. config:option:: $cfg['DefaultDisplay'] - - :type: string - :default: ``'horizontal'`` - - There are 3 display modes: horizontal, horizontalflipped and vertical. - Define which one is displayed by default. The first mode displays each - row on a horizontal line, the second rotates the headers by 90 - degrees, so you can use descriptive headers even though columns only - contain small values and still print them out. The vertical mode sorts - each row on a vertical lineup. - .. config:option:: $cfg['RememberSorting'] :type: boolean @@ -2516,14 +2504,6 @@ Web server upload/save/import directories Various display setting ----------------------- -.. config:option:: $cfg['ShowDisplayDirection'] - - :type: boolean - :default: false - - Defines whether or not type display direction option is shown when - browsing a table. - .. config:option:: $cfg['RepeatCells'] :type: integer diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 0cf7924bc7..4fc8522861 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -35,10 +35,6 @@ class PMA_DisplayResults const PLACE_TOP_DIRECTION_DROPDOWN = 'top_direction_dropdown'; const PLACE_BOTTOM_DIRECTION_DROPDOWN = 'bottom_direction_dropdown'; - const DISP_DIR_HORIZONTAL = 'horizontal'; - const DISP_DIR_HORIZONTAL_FLIPPED = 'horizontalflipped'; - const DISP_DIR_VERTICAL = 'vertical'; - const DISPLAY_FULL_TEXT = 'F'; const DISPLAY_PARTIAL_TEXT = 'P'; @@ -508,8 +504,6 @@ class PMA_DisplayResults && ($unlim_num_rows < 2) && ! PMA_Table::isView($db, $table) ) { - // force display of navbar for vertical/horizontal display-choice. - // $displayParts['nav_bar'] = (string) '0'; $displayParts['sort_lnk'] = (string) '0'; } } // end if (3) @@ -970,23 +964,6 @@ class PMA_DisplayResults $_SESSION['tmpval']['max_rows'], '', 'autosubmit', $numberOfRowsPlaceholder ); - if ($GLOBALS['cfg']['ShowDisplayDirection']) { - // Display mode (horizontal/vertical) - $additional_fields_html .= __('Mode:') . ' ' . "\n"; - $choices = array( - 'horizontal' => __('horizontal'), - 'horizontalflipped' => __('horizontal (rotated headers)'), - 'vertical' => __('vertical') - ); - - $additional_fields_html .= PMA_Util::getDropdown( - 'disp_direction', $choices, - $_SESSION['tmpval']['disp_direction'], - $id_for_direction_dropdown, 'autosubmit' - ); - unset($choices); - } - return $additional_fields_html; } // end of the '_getAdditionalFieldsForTableNavigation()' function @@ -1031,17 +1008,10 @@ class PMA_DisplayResults ? 0 : $_SESSION['tmpval']['query'][$sql_md5]['max_rows']; - $direction = isset($_SESSION['tmpval']['disp_direction']) - ? $_SESSION['tmpval']['disp_direction'] - : ''; - if ($analyzed_sql == '') { $analyzed_sql = array(); } - $directionCondition = ($direction == self::DISP_DIR_HORIZONTAL) - || ($direction == self::DISP_DIR_HORIZONTAL_FLIPPED); - // can the result be sorted? if ($displayParts['sort_lnk'] == '1') { @@ -1093,7 +1063,7 @@ class PMA_DisplayResults // text button or link list($colspan, $rowspan, $button_html) = $this->_getFieldVisibilityParams( - $directionCondition, $displayParts, $full_or_partial_text_link + $displayParts, $full_or_partial_text_link ); $table_headers_html .= $button_html; @@ -1104,9 +1074,7 @@ class PMA_DisplayResults // 2.0.1 Prepare Display column comments if enabled // ($GLOBALS['cfg']['ShowBrowseComments']). - // Do not show comments, if using horizontalflipped mode, - // because of space usage - $comments_map = $this->_getTableCommentsArray($direction, $analyzed_sql); + $comments_map = $this->_getTableCommentsArray($analyzed_sql); // See if we have to highlight any header fields of a WHERE query. // Uses SQL-Parser results. @@ -1139,7 +1107,7 @@ class PMA_DisplayResults = $this->_getOrderLinkAndSortedHeaderHtml( $fields_meta[$i], $sort_expression, $sort_expression_nodirection, $i, $unsorted_sql_query, - $session_max_rows, $direction, $comments, + $session_max_rows, $comments, $sort_direction, $col_visib, $col_visib[$j] ); @@ -1154,13 +1122,11 @@ class PMA_DisplayResults } else { // 2.2 Results can't be sorted - if ($directionCondition) { - $table_headers_html - .= $this->_getDraggableClassForNonSortableColumns( - $col_visib, $col_visib[$j], $condition_field, - $direction, $fields_meta[$i], $comments - ); - } + $table_headers_html + .= $this->_getDraggableClassForNonSortableColumns( + $col_visib, $col_visib[$j], $condition_field, + $fields_meta[$i], $comments + ); $vertical_display['desc'][] = ' __get('fields_cnt') . '">' - . '' - . '' - . ''; - - // end horizontal/horizontalflipped mode - } else { - - $span = $this->__get('num_rows') + 1 + floor( - $this->__get('num_rows') - / $_SESSION['tmpval']['repeat_cells'] - ); - $button_html .= ''; - - } // end vertical mode + $button_html .= '' + . '' + . '' + . ''; } elseif ((($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_LEFT) || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH)) @@ -1419,19 +1357,8 @@ class PMA_DisplayResults = (($displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE) && ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE)) ? 4 : 0; - if ($directionCondition) { - - $button_html .= '' - . $full_or_partial_text_link . ''; - // end horizontal/horizontalflipped mode - - } else { - - $vertical_display['textbtn'] - = ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; - } // end vertical mode + $button_html .= '' + . $full_or_partial_text_link . ''; } elseif ((($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_LEFT) || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH)) @@ -1444,19 +1371,9 @@ class PMA_DisplayResults = (($displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE) && ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE)) ? 4 : 0; - if ($directionCondition) { + $button_html .= ''; - $button_html .= ''; - - // end horizontal/horizontalfipped mode - } else { - $vertical_display['textbtn'] = ' ' . "\n"; - } // end vertical mode - - } elseif (($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_NONE) - && ($directionCondition) - ) { + } elseif (($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_NONE)) { // ... elseif display an empty column if the actions links are // disabled to match the rest of the table $button_html .= ''; @@ -1472,9 +1389,7 @@ class PMA_DisplayResults /** * Get table comments as array * - * @param boolean $direction display direction, horizontal - * or horizontalflipped - * @param array $analyzed_sql the analyzed query + * @param array $analyzed_sql the analyzed query * * @return array $comments_map table comments when condition true * null when condition falls @@ -1483,14 +1398,12 @@ class PMA_DisplayResults * * @see _getTableHeaders() */ - private function _getTableCommentsArray($direction, $analyzed_sql) + private function _getTableCommentsArray($analyzed_sql) { $comments_map = null; - if ($GLOBALS['cfg']['ShowBrowseComments'] - && ($direction != self::DISP_DIR_HORIZONTAL_FLIPPED) - ) { + if ($GLOBALS['cfg']['ShowBrowseComments']) { $comments_map = array(); if (isset($analyzed_sql[0]) && is_array($analyzed_sql[0]) @@ -1832,7 +1745,6 @@ class PMA_DisplayResults * @param integer $column_index the index of the column * @param string $unsorted_sql_query the unsorted sql query * @param integer $session_max_rows maximum rows resulted by sql - * @param string $direction the display direction * @param string $comments comment for row * @param array $sort_direction sort direction * @param boolean $col_visib column is visible(false) @@ -1847,7 +1759,7 @@ class PMA_DisplayResults */ private function _getOrderLinkAndSortedHeaderHtml( $fields_meta, $sort_expression, $sort_expression_nodirection, - $column_index, $unsorted_sql_query, $session_max_rows, $direction, + $column_index, $unsorted_sql_query, $session_max_rows, $comments, $sort_direction, $col_visib, $col_visib_j ) { @@ -1907,12 +1819,12 @@ class PMA_DisplayResults // Displays the sorting URL // enable sort order swapping for image $order_link = $this->_getSortOrderLink( - $order_img, $column_index, $direction, + $order_img, $column_index, $fields_meta, $single_order_url, $multi_order_url ); $sorted_header_html .= $this->_getDraggableClassForSortableColumns( - $col_visib, $col_visib_j, $direction, + $col_visib, $col_visib_j, $fields_meta, $order_link, $comments ); @@ -2175,7 +2087,6 @@ class PMA_DisplayResults * * @param string $order_img the sort order image * @param integer $col_index the index of the column - * @param string $direction the display direction * @param array $fields_meta set of field properties * @param string $order_url the url for sort * @param string $multi_order_url the url for sort @@ -2187,7 +2098,7 @@ class PMA_DisplayResults * @see _getTableHeaders() */ private function _getSortOrderLink( - $order_img, $col_index, $direction, + $order_img, $col_index, $fields_meta, $order_url, $multi_order_url ) { $order_link_params = array(); @@ -2201,27 +2112,7 @@ class PMA_DisplayResults } } - if ($GLOBALS['cfg']['HeaderFlipType'] == self::HEADER_FLIP_TYPE_AUTO) { - - $GLOBALS['cfg']['HeaderFlipType'] - = (PMA_USR_BROWSER_AGENT == 'IE') - ? self::HEADER_FLIP_TYPE_CSS - : self::HEADER_FLIP_TYPE_FAKE; - } - - if ($direction == self::DISP_DIR_HORIZONTAL_FLIPPED - && $GLOBALS['cfg']['HeaderFlipType'] == self::HEADER_FLIP_TYPE_CSS - ) { - $order_link_params['style'] = 'direction: ltr; writing-mode: tb-rl;'; - } - - $order_link_content = (($direction == self::DISP_DIR_HORIZONTAL_FLIPPED) - && ($GLOBALS['cfg']['HeaderFlipType'] == self::HEADER_FLIP_TYPE_FAKE)) - ? PMA_Util::flipstring( - htmlspecialchars($fields_meta->name), - "
\n" - ) - : htmlspecialchars($fields_meta->name); + $order_link_content = htmlspecialchars($fields_meta->name); $inner_link_content = $order_link_content . $order_img . ''; @@ -2239,7 +2130,6 @@ class PMA_DisplayResults * @param boolean $col_visib the column is visible (false) * array the column is not visible (string array) * @param string $col_visib_j element of $col_visib array - * @param string $direction the display direction * @param array $fields_meta set of field properties * @param string $order_link the order link * @param string $comments the comment for the column @@ -2251,7 +2141,7 @@ class PMA_DisplayResults * @see _getTableHeaders() */ private function _getDraggableClassForSortableColumns( - $col_visib, $col_visib_j, $direction, $fields_meta, + $col_visib, $col_visib_j, $fields_meta, $order_link, $comments ) { @@ -2272,13 +2162,9 @@ class PMA_DisplayResults $th_class[] = 'marker'; } - $draggable_html .= ' class="' . implode(' ', $th_class); + $draggable_html .= ' class="' . implode(' ', $th_class) . '"'; - if ($direction == self::DISP_DIR_HORIZONTAL_FLIPPED) { - $draggable_html .= ' vbottom'; - } - - $draggable_html .= '" data-column="' . htmlspecialchars($fields_meta->name) + $draggable_html .= ' data-column="' . htmlspecialchars($fields_meta->name) . '">' . $order_link . $comments . ''; return $draggable_html; @@ -2293,7 +2179,6 @@ class PMA_DisplayResults * array the column is not visible (string array) * @param string $col_visib_j element of $col_visib array * @param boolean $condition_field whether to add CSS class condition - * @param string $direction the display direction * @param array $fields_meta set of field properties * @param string $comments the comment for the column * @@ -2305,7 +2190,7 @@ class PMA_DisplayResults */ private function _getDraggableClassForNonSortableColumns( $col_visib, $col_visib_j, $condition_field, - $direction, $fields_meta, $comments + $fields_meta, $comments ) { $draggable_html = 'name) . '">'; - if (($direction == self::DISP_DIR_HORIZONTAL_FLIPPED) - && ($GLOBALS['cfg']['HeaderFlipType'] == self::HEADER_FLIP_TYPE_FAKE) - ) { - - $draggable_html .= PMA_Util::flipstring( - htmlspecialchars($fields_meta->name), '
' - ); - - } else { - $draggable_html .= htmlspecialchars($fields_meta->name); - } + $draggable_html .= htmlspecialchars($fields_meta->name); $draggable_html .= "\n" . $comments . ''; @@ -2358,8 +2223,6 @@ class PMA_DisplayResults * Prepare column to show at right side - check boxes or empty column * * @param array &$displayParts which elements to display - * @param boolean $directionCondition display direction horizontal - * or horizontalflipped * @param string $full_or_partial_text_link full/partial link or text button * @param string $colspan column span of table header * @param string $rowspan row span of table header @@ -2371,7 +2234,7 @@ class PMA_DisplayResults * @see _getTableHeaders() */ private function _getColumnAtRightSide( - &$displayParts, $directionCondition, $full_or_partial_text_link, + &$displayParts, $full_or_partial_text_link, $colspan, $rowspan ) { @@ -2391,18 +2254,10 @@ class PMA_DisplayResults = (($displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE) && ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE)) ? 4 : 1; - if ($directionCondition) { - $right_column_html .= "\n" - . '' . $full_or_partial_text_link - . ''; + $right_column_html .= "\n" + . '' . $full_or_partial_text_link + . ''; - // end horizontal/horizontalflipped mode - } else { - $vertical_display['textbtn'] = ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; - } // end vertical mode } elseif ((($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_LEFT) || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH)) && (($displayParts['edit_lnk'] == self::NO_EDIT_OR_DELETE) @@ -2416,15 +2271,7 @@ class PMA_DisplayResults = (($displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE) && ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE)) ? 4 : 1; - if ($directionCondition) { - $right_column_html .= "\n" - . ''; - - // end horizontal/horizontalflipped mode - } else { - $vertical_display['textbtn'] = ' ' . "\n"; - } // end vertical mode + $right_column_html .= "\n" . ''; } $this->__set('vertical_display', $vertical_display); @@ -2662,26 +2509,19 @@ class PMA_DisplayResults // delete/edit options correctly for tables without keys. $odd_row = true; - $directionCondition - = ($_SESSION['tmpval']['disp_direction'] - == self::DISP_DIR_HORIZONTAL) - || ($_SESSION['tmpval']['disp_direction'] - == self::DISP_DIR_HORIZONTAL_FLIPPED); while ($row = $GLOBALS['dbi']->fetchRow($dt_result)) { // "vertical display" mode stuff $table_body_html .= $this->_getVerticalDisplaySupportSegments( - $vertical_display, $row_no, $directionCondition + $vertical_display, $row_no ); $alternating_color_class = ($odd_row ? 'odd' : 'even'); $odd_row = ! $odd_row; - if ($directionCondition) { - // pointer code part - $table_body_html .= ''; - } + // pointer code part + $table_body_html .= ''; // 1. Prepares the row // 1.1 Results from a "SELECT" statement -> builds the @@ -2730,9 +2570,8 @@ class PMA_DisplayResults ); // 1.3 Displays the links at left if required - if ((($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_LEFT) - || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH)) - && $directionCondition + if (($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_LEFT) + || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH) ) { $table_body_html .= $this->_getPlacedLinks( @@ -2742,9 +2581,7 @@ class PMA_DisplayResults $edit_str, $copy_str, $del_str, $js_conf ); - } elseif (($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_NONE) - && $directionCondition - ) { + } elseif ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_NONE) { $table_body_html .= $this->_getPlacedLinks( self::POSITION_NONE, $del_url, $displayParts, $row_no, @@ -2761,13 +2598,12 @@ class PMA_DisplayResults $table_body_html .= $this->_getRowValues( $dt_result, $row, $row_no, $col_order, $map, $grid_edit_class, $col_visib, $where_clause, - $url_sql_query, $analyzed_sql, $directionCondition + $url_sql_query, $analyzed_sql ); // 3. Displays the modify/delete links on the right if required - if ((($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_RIGHT) - || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH)) - && $directionCondition + if (($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_RIGHT) + || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH) ) { $table_body_html .= $this->_getPlacedLinks( @@ -2779,9 +2615,7 @@ class PMA_DisplayResults } // end if (3) - if ($directionCondition) { - $table_body_html .= ''; - } // end if + $table_body_html .= ''; // 4. Gather links of del_urls and edit_urls in an array for later // output @@ -2792,7 +2626,7 @@ class PMA_DisplayResults $condition_array ); - $table_body_html .= $directionCondition ? "\n" : ''; + $table_body_html .= "\n"; $row_no++; } // end while @@ -2839,20 +2673,19 @@ class PMA_DisplayResults /** * Get the values for one data row * - * @param integer &$dt_result the link id associated to the query - * which results have to be displayed - * @param array $row current row data - * @param integer $row_no the index of current row - * @param array $col_order the column order - * false when a property not found - * @param array $map the list of relations - * @param string $grid_edit_class the class for all editable columns - * @param boolean $col_visib column is visible(false) - * array column isn't visible(string array) - * @param string $where_clause where clause - * @param string $url_sql_query the analyzed sql query - * @param array $analyzed_sql the analyzed query - * @param boolean $directionCondition the directional condition + * @param integer &$dt_result the link id associated to the query + * which results have to be displayed + * @param array $row current row data + * @param integer $row_no the index of current row + * @param array $col_order the column order + * false when a property not found + * @param array $map the list of relations + * @param string $grid_edit_class the class for all editable columns + * @param boolean $col_visib column is visible(false) + * array column isn't visible(string array) + * @param string $where_clause where clause + * @param string $url_sql_query the analyzed sql query + * @param array $analyzed_sql the analyzed query * * @return string $row_values_html html content * @@ -2863,7 +2696,7 @@ class PMA_DisplayResults private function _getRowValues( &$dt_result, $row, $row_no, $col_order, $map, $grid_edit_class, $col_visib, $where_clause, - $url_sql_query, $analyzed_sql, $directionCondition + $url_sql_query, $analyzed_sql ) { $row_values_html = ''; @@ -2890,10 +2723,7 @@ class PMA_DisplayResults $not_null_class = $meta->not_null ? 'not_null' : ''; $relation_class = isset($map[$meta->name]) ? 'relation' : ''; - $hide_class = ($col_visib && ! $col_visib[$currentColumn] - // hide per only if the display dir is not vertical - && ($_SESSION['tmpval']['disp_direction'] - != self::DISP_DIR_VERTICAL)) + $hide_class = ($col_visib && ! $col_visib[$currentColumn]) ? 'hide' : ''; @@ -3088,10 +2918,7 @@ class PMA_DisplayResults } // output stored cell - if ($directionCondition) { - $row_values_html - .= $vertical_display['data'][$row_no][$i]; - } + $row_values_html .= $vertical_display['data'][$row_no][$i]; if (isset($vertical_display['rowdata'][$i][$row_no])) { $vertical_display['rowdata'][$i][$row_no] @@ -3380,10 +3207,9 @@ class PMA_DisplayResults /** * Prepare vertical display mode necessary HTML stuff * - * @param array $vertical_display information used with vertical - * display mode - * @param integer $row_no the index of current row - * @param boolean $directionCondition the directional condition + * @param array $vertical_display information used with vertical + * display mode + * @param integer $row_no the index of current row * * @return string $vertical_disp_html html content * @@ -3392,14 +3218,13 @@ class PMA_DisplayResults * @see _getTableBody() */ private function _getVerticalDisplaySupportSegments( - $vertical_display, $row_no, $directionCondition + $vertical_display, $row_no ) { $support_html = ''; if ((($row_no != 0) && ($_SESSION['tmpval']['repeat_cells'] != 0)) && !($row_no % $_SESSION['tmpval']['repeat_cells']) - && $directionCondition ) { $support_html .= '' . "\n"; @@ -3695,21 +3520,6 @@ class PMA_DisplayResults $class = 'data ' . $grid_edit_class . ' ' . $not_null_class . ' ' . $relation_class . ' ' . $hide_class . ' ' . $field_type_class; - $disp_direction = $_SESSION['tmpval']['disp_direction']; - if (($disp_direction == self::DISP_DIR_VERTICAL) - && (! isset($printview) || ($printview != '1')) - ) { - // the row number corresponds to a data row, not HTML table row - $class .= ' row_' . $row_no; - if ($GLOBALS['cfg']['BrowsePointerEnable'] == true) { - $class .= ' vpointer'; - } - - if ($GLOBALS['cfg']['BrowseMarkerEnable'] == true) { - $class .= ' vmarker'; - } - } - return $class; } // end of the '_getClassesForColumn()' function @@ -4060,217 +3870,15 @@ class PMA_DisplayResults } // end of the '_getDataCellForNonNumericColumns()' function - /** - * Get one link for the vertical direction mode. - * - * @param string $leftOrRight 'left' or 'right' constant - * @param string $linkName the name of the link to generate - * @param array $vertical_display the vertical display elements - * - * @return string html content - * - * @access private - * - */ - private function _getOneLink($leftOrRight, $linkName, $vertical_display) - { - $html = ''; - if ((($GLOBALS['cfg']['RowActionLinks'] == $leftOrRight) - || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH)) - && is_array($vertical_display[$linkName]) - && ((count($vertical_display[$linkName]) > 0) - || !empty($vertical_display['textbtn'])) - ) { - $html .= $this->_getOperationLinksForVerticalTable( - $linkName - ); - } // end if - return $html; - } - - /** - * Get three links for the vertical direction mode. - * - * @param string $leftOrRight 'left' or 'right' constant - * @param array $vertical_display the vertical display elements - * - * @return string html content - * - * @access private - * - */ - private function _getThreeLinks($leftOrRight, $vertical_display) - { - $html = ''; - - // Prepares "edit" link if required - $html .= $this->_getOneLink( - $leftOrRight, 'edit', $vertical_display - ); - - // Prepares "copy" link if required - $html .= $this->_getOneLink( - $leftOrRight, 'copy', $vertical_display - ); - - // Prepares "delete" link if required - $html .= $this->_getOneLink( - $leftOrRight, 'delete', $vertical_display - ); - return $html; - } - - /** - * Get the resulted table with the vertical direction mode. - * - * @param array $analyzed_sql the analyzed query - * @param array $displayParts which elements to display - * - * @return string html content - * - * @access private - * - * @see _getTable() - */ - private function _getVerticalTable($analyzed_sql, $displayParts) - { - - $vertical_table_html = ''; - $vertical_display = $this->__get('vertical_display'); - - // Prepares "multi row delete" link at top if required - if (($GLOBALS['cfg']['RowActionLinks'] != self::POSITION_RIGHT) - && is_array($vertical_display['row_delete']) - && ((count($vertical_display['row_delete']) > 0) - || !empty($vertical_display['textbtn'])) - ) { - - $vertical_table_html .= '' . "\n"; - if ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_NONE) { - // if we are not showing the RowActionLinks, then we need to show - // the Multi-Row-Action checkboxes - $vertical_table_html .= '' . "\n"; - } - - $vertical_table_html .= $vertical_display['textbtn'] - . $this->_getCheckBoxesForMultipleRowOperations('_left', $displayParts) - . '' . "\n"; - } // end if - - // Prepare three links at top if required - $vertical_table_html .= $this->_getThreeLinks( - self::POSITION_LEFT, $vertical_display - ); - - list($col_order, $col_visib) = $this->_getColumnParams($analyzed_sql); - - // Prepares data - foreach ($vertical_display['desc'] as $j => $val) { - - // assign appropriate key with current column order - $key = $col_order ? $col_order[$j] : $j; - - $vertical_table_html .= '' . "\n" - . $val; - - $cell_displayed = 0; - foreach ($vertical_display['rowdata'][$key] as $subval) { - - if (($cell_displayed != 0) - && ($_SESSION['tmpval']['repeat_cells'] != 0) - && ! ($cell_displayed % $_SESSION['tmpval']['repeat_cells']) - ) { - $vertical_table_html .= $val; - } - - $vertical_table_html .= $subval; - $cell_displayed++; - - } // end while - - $vertical_table_html .= '' . "\n"; - } // end while - - // Prepares "multi row delete" link at bottom if required - if ((($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_RIGHT) - || ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_BOTH)) - && is_array($vertical_display['row_delete']) - && ((count($vertical_display['row_delete']) > 0) - || !empty($vertical_display['textbtn'])) - ) { - - $vertical_table_html .= '' . "\n" - . $vertical_display['textbtn'] - . $this->_getCheckBoxesForMultipleRowOperations( - '_right', $displayParts - ) - . '' . "\n"; - } // end if - - // Prepare three links at bottom if required - $vertical_table_html .= $this->_getThreeLinks( - self::POSITION_RIGHT, $vertical_display - ); - - return $vertical_table_html; - - } // end of the '_getVerticalTable' function - - - /** - * Prepare edit, copy and delete links for vertical table - * - * @param string $operation edit/copy/delete - * - * @return string $links_html html content - * - * @access private - * - * @see _getVerticalTable() - */ - private function _getOperationLinksForVerticalTable($operation) - { - - $link_html = '' . "\n"; - $vertical_display = $this->__get('vertical_display'); - - if (! is_array($vertical_display['row_delete'])) { - - if (($operation == 'edit') || ($operation == 'copy')) { - $link_html .= $vertical_display['textbtn']; - - } elseif ($operation == 'delete') { - - if (! is_array($vertical_display['edit'])) { - $link_html .= $vertical_display['textbtn']; - } - } - } - - foreach ($vertical_display[$operation] as $val) { - $link_html .= $val; - } // end while - - $link_html .= '' . "\n"; - - return $link_html; - - } // end of the '_getOperationLinksForVerticalTable' function - - /** * Get checkboxes for multiple row data operations * * @param string $dir _left / _right - * @param array $displayParts which elements to display + * @param array $displayParts which elements to display * * @return String $checkBoxes_html html content * * @access private - * - * @see _getVerticalTable() */ private function _getCheckBoxesForMultipleRowOperations($dir, $displayParts) { @@ -4330,20 +3938,6 @@ class PMA_DisplayResults $query['sql'] = $this->__get('sql_query'); - $valid_disp_dir = PMA_isValid( - $_REQUEST['disp_direction'], - array(self::DISP_DIR_HORIZONTAL, self::DISP_DIR_VERTICAL, - self::DISP_DIR_HORIZONTAL_FLIPPED - ) - ); - - if ($valid_disp_dir) { - $query['disp_direction'] = $_REQUEST['disp_direction']; - unset($_REQUEST['disp_direction']); - } elseif (empty($query['disp_direction'])) { - $query['disp_direction'] = $GLOBALS['cfg']['DefaultDisplay']; - } - if (empty($query['repeat_cells'])) { $query['repeat_cells'] = $GLOBALS['cfg']['RepeatCells']; } @@ -4472,9 +4066,6 @@ class PMA_DisplayResults = $query['max_rows']; $_SESSION['tmpval']['repeat_cells'] = $query['repeat_cells']; - $_SESSION['tmpval']['disp_direction'] - = $query['disp_direction']; - } @@ -4653,11 +4244,6 @@ class PMA_DisplayResults $dt_result, $displayParts, $map, $analyzed_sql, $is_limited_display ); - // vertical output case - if ($_SESSION['tmpval']['disp_direction'] == self::DISP_DIR_VERTICAL) { - $table_html .= $this->_getVerticalTable($analyzed_sql, $displayParts); - } // end if - $this->__set('vertical_display', null); $table_html .= '' . "\n" @@ -5106,13 +4692,10 @@ class PMA_DisplayResults $url_query = $this->__get('url_query'); $delete_text = ($del_link == self::DELETE_ROW) ? __('Delete') : __('Kill'); - if ($_SESSION['tmpval']['disp_direction'] != self::DISP_DIR_VERTICAL) { - - $links_html .= '' . __('With selected:') . ''; - } + $links_html .= '' . __('With selected:') . ''; $links_html .= ' __('Descending') ); $cfg_db['ProtectBinary'] = array(false, 'blob', 'noblob', 'all'); -$cfg_db['DefaultDisplay'] = array('horizontal', 'vertical', 'horizontalflipped'); $cfg_db['CharEditing'] = array('input', 'textarea'); $cfg_db['TabsMode'] = array( 'icons' => __('Icons'), diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index c7fbd6495a..514c08fd31 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -78,7 +78,6 @@ $strConfigConfirm_desc = __( ); $strConfigConfirm_name = __('Confirm DROP queries'); $strConfigDBG_sql_name = __('Debug SQL'); -$strConfigDefaultDisplay_name = __('Default display direction'); $strConfigDefaultTabDatabase_desc = __('Tab that is displayed when entering a database.'); $strConfigDefaultTabDatabase_name = __('Default database tab'); @@ -725,8 +724,6 @@ $strConfigShowDbStructureLastUpdate_desc = __('Show or hide a column displaying $strConfigShowDbStructureLastUpdate_name = __('Show Last update timestamp'); $strConfigShowDbStructureLastCheck_desc = __('Show or hide a column displaying the Last check timestamp for all tables.'); $strConfigShowDbStructureLastCheck_name = __('Show Last check timestamp'); -$strConfigShowDisplayDirection_desc = __('Defines whether or not type display direction option is shown when browsing a table.'); -$strConfigShowDisplayDirection_name = __('Show display direction'); $strConfigShowFieldTypesInDataEditView_desc = __('Defines whether or not type fields should be initially displayed in edit/insert mode.'); $strConfigShowFieldTypesInDataEditView_name = __('Show field types'); $strConfigShowFunctionFields_desc = __('Display the function fields in edit/insert mode.'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index 8c285f8d53..066f9431cf 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -206,12 +206,10 @@ $forms['Main_panel']['Browse'] = array( 'BrowseMarkerEnable', 'GridEditing', 'SaveCellsAtOnce', - 'ShowDisplayDirection', 'RepeatCells', 'LimitChars', 'RowActionLinks', 'TablePrimaryKeyOrder', - 'DefaultDisplay', 'RememberSorting'); $forms['Main_panel']['Edit'] = array( 'ProtectBinary', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 6792e2e756..a64bda446b 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -114,12 +114,10 @@ $forms['Main_panel']['Browse'] = array( 'BrowseMarkerEnable', 'GridEditing', 'SaveCellsAtOnce', - 'ShowDisplayDirection', 'RepeatCells', 'LimitChars', 'RowActionLinks', 'TablePrimaryKeyOrder', - 'DefaultDisplay', 'RememberSorting'); $forms['Main_panel']['Edit'] = array( 'ProtectBinary', diff --git a/test/classes/PMA_DisplayResults_test.php b/test/classes/PMA_DisplayResults_test.php index 05c132d70c..6d4283eba5 100644 --- a/test/classes/PMA_DisplayResults_test.php +++ b/test/classes/PMA_DisplayResults_test.php @@ -186,9 +186,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase $GLOBALS['num_rows'] = '20'; $GLOBALS['unlim_num_rows'] = '50'; $GLOBALS['cfg']['ShowAll'] = true; - $GLOBALS['cfg']['ShowDisplayDirection'] = true; $_SESSION['tmpval']['repeat_cells'] = '1'; - $_SESSION['tmpval']['disp_direction'] = '1'; /** * FIXME Counting words of a generated large HTML is not a good way @@ -270,8 +268,6 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase ) { $GLOBALS['cfg']['BrowsePointerEnable'] = true; $GLOBALS['cfg']['BrowseMarkerEnable'] = true; - $_SESSION['tmpval']['disp_direction'] - = PMA_DisplayResults::DISP_DIR_VERTICAL; $this->assertEquals( $output, @@ -333,63 +329,6 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase ); } - /** - * Provide data for testGetOperationLinksForVerticalTable - * - * @return array parameters and output - */ - public function dataProviderForTestGetOperationLinksForVerticalTable() - { - return array( - array( - 'edit', - ' - -' - ), - array( - 'copy', - "\nCOPY1COPY2\n" - ), - array( - 'delete', - "\nDELETE1DELETE2\n" - ), - ); - } - - /** - * Test for _getOperationLinksForVerticalTable - * - * @param string $operation edit/copy/delete - * @param string $output output of _getOperationLinksForVerticalTable - * - * @return void - * - * @dataProvider dataProviderForTestGetOperationLinksForVerticalTable - */ - public function testGetOperationLinksForVerticalTable( - $operation, $output - ) { - $vertical_display = array( - 'row_delete' => array(), - 'textbtn' => '\n \n \n', - 'edit' => array(), - 'copy' => array('COPY1', 'COPY2'), - 'delete' => array('DELETE1', 'DELETE2'), - ); - - $this->object->__set('vertical_display', $vertical_display); - - $this->assertEquals( - $output, - $this->_callPrivateFunction( - '_getOperationLinksForVerticalTable', - array($operation) - ) - ); - } - /** * Data provider for testGetCheckBoxesForMultipleRowOperations * @@ -420,7 +359,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase * Test for _getCheckBoxesForMultipleRowOperations * * @param string $dir _left / _right - * @param array $displayParts which parts to display + * @param array $displayParts which parts to display * @param string $output output of _getCheckBoxesForMultipleRowOperations * * @return void From e3ed81fbbd6a62bc922131c9b4303e6939fc13ea Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 12 Jan 2015 14:39:16 +0530 Subject: [PATCH 2/8] Rename the method to a more meaningful one Signed-off-by: Madhura Jayaratne --- libraries/DisplayResults.class.php | 66 ++++++++++++++---------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 4fc8522861..829b71e9b5 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2512,10 +2512,14 @@ class PMA_DisplayResults while ($row = $GLOBALS['dbi']->fetchRow($dt_result)) { - // "vertical display" mode stuff - $table_body_html .= $this->_getVerticalDisplaySupportSegments( - $vertical_display, $row_no - ); + // add repeating headers + if ((($row_no != 0) && ($_SESSION['tmpval']['repeat_cells'] != 0)) + && !($row_no % $_SESSION['tmpval']['repeat_cells']) + ) { + $table_body_html .= $this->_getRepeatingHeaders( + $vertical_display, $row_no + ); + } $alternating_color_class = ($odd_row ? 'odd' : 'even'); $odd_row = ! $odd_row; @@ -3205,56 +3209,48 @@ class PMA_DisplayResults /** - * Prepare vertical display mode necessary HTML stuff + * Get HTML for reapeating headers * * @param array $vertical_display information used with vertical * display mode * @param integer $row_no the index of current row * - * @return string $vertical_disp_html html content + * @return string $header_html html content * * @access private * * @see _getTableBody() */ - private function _getVerticalDisplaySupportSegments( + private function _getRepeatingHeaders( $vertical_display, $row_no ) { + $header_html = '' . "\n"; - $support_html = ''; + if ($vertical_display['emptypre'] > 0) { - if ((($row_no != 0) && ($_SESSION['tmpval']['repeat_cells'] != 0)) - && !($row_no % $_SESSION['tmpval']['repeat_cells']) - ) { + $header_html .= ' ' + . "\n" . '  ' . "\n"; - $support_html .= '' . "\n"; + } else if ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_NONE) { + $header_html .= ' ' . "\n"; + } - if ($vertical_display['emptypre'] > 0) { + foreach ($vertical_display['desc'] as $val) { + $header_html .= $val; + } - $support_html .= ' ' - . "\n" . '  ' . "\n"; + if ($vertical_display['emptyafter'] > 0) { + $header_html + .= ' ' + . "\n" . '  ' . "\n"; + } + $header_html .= '' . "\n"; - } else if ($GLOBALS['cfg']['RowActionLinks'] == self::POSITION_NONE) { - $support_html .= ' ' . "\n"; - } + return $header_html; - foreach ($vertical_display['desc'] as $val) { - $support_html .= $val; - } - - if ($vertical_display['emptyafter'] > 0) { - $support_html - .= ' ' - . "\n" . '  ' . "\n"; - } - $support_html .= '' . "\n"; - } // end if - - return $support_html; - - } // end of the '_getVerticalDisplaySupportSegments()' function + } // end of the '_getRepeatingHeaders()' function /** From fe151dd9db89cf94e73cbe0b75190accfb6689fd Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 12 Jan 2015 14:48:52 +0530 Subject: [PATCH 3/8] This method is not user without display direction configuration Signed-off-by: Madhura Jayaratne --- libraries/DisplayResults.class.php | 121 ----------------------------- 1 file changed, 121 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 829b71e9b5..e85a4ecec6 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2620,16 +2620,6 @@ class PMA_DisplayResults } // end if (3) $table_body_html .= ''; - - // 4. Gather links of del_urls and edit_urls in an array for later - // output - $this->_gatherLinksForLaterOutputs( - $row_no, $displayParts, $where_clause, $where_clause_html, $js_conf, - $del_url, $del_str, $edit_anchor_class, $edit_url, - $edit_str, $copy_url, $copy_str, $alternating_color_class, - $condition_array - ); - $table_body_html .= "\n"; $row_no++; @@ -2940,117 +2930,6 @@ class PMA_DisplayResults } // end of the '_getRowValues()' function - - /** - * Gather delete/edit url links for further outputs - * - * @param integer $row_no the index of current row - * @param array $displayParts which elements to display - * @param string $where_clause where clause - * @param string $where_clause_html the html encoded where clause - * @param string $js_conf text for the JS confirmation - * @param string $del_url the url for delete row - * @param string $del_str the label for delete row - * @param string $edit_anchor_class the class for html element for edit - * @param string $edit_url the url for edit row - * @param string $edit_str the label for edit row - * @param string $copy_url the url for copy row - * @param string $copy_str the label for copy row - * @param string $alternating_color_class class for display two colors in rows - * @param array $condition_array array of keys - * (primary,unique,condition) - * - * @return void - * - * @access private - * - * @see _getTableBody() - */ - private function _gatherLinksForLaterOutputs( - $row_no, $displayParts, $where_clause, $where_clause_html, $js_conf, - $del_url, $del_str, $edit_anchor_class, $edit_url, $edit_str, - $copy_url, $copy_str, $alternating_color_class, $condition_array - ) { - - $vertical_display = $this->__get('vertical_display'); - - if (! isset($vertical_display['edit'][$row_no])) { - $vertical_display['edit'][$row_no] = ''; - $vertical_display['copy'][$row_no] = ''; - $vertical_display['delete'][$row_no] = ''; - $vertical_display['row_delete'][$row_no] = ''; - } - - $vertical_class = ' row_' . $row_no; - if ($GLOBALS['cfg']['BrowsePointerEnable'] == true) { - $vertical_class .= ' vpointer'; - } - - if ($GLOBALS['cfg']['BrowseMarkerEnable'] == true) { - $vertical_class .= ' vmarker'; - } - - if (!empty($del_url) - && ($displayParts['del_lnk'] != self::KILL_PROCESS) - ) { - - $vertical_display['row_delete'][$row_no] - .= $this->_getCheckboxForMultiRowSubmissions( - $del_url, $displayParts, $row_no, $where_clause_html, - $condition_array, '[%_PMA_CHECKBOX_DIR_%]', - $alternating_color_class . $vertical_class - ); - - } else { - unset($vertical_display['row_delete'][$row_no]); - } - - if (isset($edit_url)) { - - $vertical_display['edit'][$row_no] .= $this->_getEditLink( - $edit_url, - $alternating_color_class . ' ' . $edit_anchor_class - . $vertical_class, $edit_str, - $where_clause, - $where_clause_html - ); - - } else { - unset($vertical_display['edit'][$row_no]); - } - - if (isset($copy_url)) { - - $vertical_display['copy'][$row_no] .= $this->_getCopyLink( - $copy_url, $copy_str, $where_clause, $where_clause_html, - $alternating_color_class . $vertical_class - ); - - } else { - unset($vertical_display['copy'][$row_no]); - } - - if (isset($del_url)) { - - if (! isset($js_conf)) { - $js_conf = ''; - } - - $vertical_display['delete'][$row_no] - .= $this->_getDeleteLink( - $del_url, $del_str, $js_conf, - $alternating_color_class . $vertical_class - ); - - } else { - unset($vertical_display['delete'][$row_no]); - } - - $this->__set('vertical_display', $vertical_display); - - } // end of the '_gatherLinksForLaterOutputs()' function - - /** * Get link for display special schema links * From 8320e9510f82c6cf4c619ed90a61620d6dd6ec78 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 12 Jan 2015 15:17:30 +0530 Subject: [PATCH 4/8] Remove documentation for 'HeaderFlipType' Signed-off-by: Madhura Jayaratne --- doc/config.rst | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index ae47e5b9c2..4fc1c9511e 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -2268,19 +2268,6 @@ Design customization when there is no sort order defines externally. Acceptable values : ['NONE', 'ASC', 'DESC'] -.. config:option:: $cfg['HeaderFlipType'] - - :type: string - :default: ``'auto'`` - - The HeaderFlipType can be set to 'auto', 'css' or 'fake'. When using - 'css' the rotation of the header for horizontalflipped is done via - CSS. The CSS transformation currently works only in Internet - Explorer.If set to 'fake' PHP does the transformation for you, but of - course this does not look as good as CSS. The 'auto' option enables - CSS transformation when browser supports it and use PHP based one - otherwise. - .. config:option:: $cfg['ShowBrowseComments'] :type: boolean From c31b50e168d396b2b3dd84ca739cf0fc59bf1e31 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 13 Jan 2015 13:01:59 +0530 Subject: [PATCH 5/8] Update tests Signed-off-by: Madhura Jayaratne --- test/classes/PMA_DisplayResults_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/classes/PMA_DisplayResults_test.php b/test/classes/PMA_DisplayResults_test.php index 6d4283eba5..708813483e 100644 --- a/test/classes/PMA_DisplayResults_test.php +++ b/test/classes/PMA_DisplayResults_test.php @@ -242,7 +242,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase '', '', 0, - 'data grid_edit not_null row_0 vpointer vmarker' + 'data grid_edit not_null ' ) ); } From c00bf37821176ea6a89e24f4ccdd33516a848468 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 13 Jan 2015 13:14:47 +0530 Subject: [PATCH 6/8] Remove client side code related to display modes Signed-off-by: Madhura Jayaratne --- js/functions.js | 59 +------------------------------------------------ 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/js/functions.js b/js/functions.js index 8719627b44..9648fd74c3 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3587,70 +3587,13 @@ AJAX.registerOnload('functions.js', function () { * Unbind all event handlers before tearing down a page */ AJAX.registerTeardown('functions.js', function () { - $(document).off('mouseenter', '.vpointer'); - $(document).off('mouseleave', '.vpointer'); - $(document).off('click', '.vmarker'); $(document).off('change', 'select.pageselector'); $(document).off('click', 'a.formLinkSubmit'); $('#update_recent_tables').unbind('ready'); $('#sync_favorite_tables').unbind('ready'); }); -/** - * Vertical pointer - */ + AJAX.registerOnload('functions.js', function () { - $(document).on('mouseenter', '.vpointer', - //handlerIn - function (e) { - var $this_td = $(this); - var row_num = PMA_getRowNumber($this_td.attr('class')); - // for all td of the same vertical row, add hover - $('.vpointer').filter('.row_' + row_num).addClass('hover'); - } - ); - $(document).on('mouseleave', '.vpointer', - //handlerOut - function (e) { - var $this_td = $(this); - var row_num = PMA_getRowNumber($this_td.attr('class')); - // for all td of the same vertical row, remove hover - $('.vpointer').filter('.row_' + row_num).removeClass('hover'); - } - ); - - - /** - * Vertical marker - */ - $(document).on('click', '.vmarker', function (e) { - // do not trigger when clicked on anchor - if ($(e.target).is('a, img, a *')) { - return; - } - - var $this_td = $(this); - var row_num = PMA_getRowNumber($this_td.attr('class')); - - // XXX: FF fires two click events for