diff --git a/ChangeLog b/ChangeLog index 573dc393f3..67880164c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -65,6 +65,9 @@ explanation + rfe #1608 Central columns allowing setting SIGNED / UNSIGNED attribute for integer + rfe #1441 Add regexp match when using AllowArbitraryServer +4.3.12.0 (not yet released) +- bug #4746 Right-aligned columns have left-aligned header + 4.3.11.0 (not yet released) - bug #4774 SQL links are completely wrong - bug #4768 MariaDB: version mismatch diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 2b01f559ad..cc3f382847 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2195,6 +2195,26 @@ class PMA_DisplayResults } // end of the '_getSortOrderLink()' function + /** + * Check if the column contains numeric data. If yes, then set the + * column header's alignment right + * + * @param array $fields_meta set of field properties + * @param array &$th_class array containing classes + * + * @return void + * + * @see _getDraggableClassForSortableColumns() + */ + private function _getClassForNumericColumnType($fields_meta,&$th_class) + { + if (preg_match( + '@int|decimal|float|double|real|bit|boolean|serial@i', + $fields_meta->type + )) { + $th_class[] = 'right'; + } + } /** * Prepare columns to draggable effect for sortable columns @@ -2220,7 +2240,7 @@ class PMA_DisplayResults $draggable_html = '_getClassForNumericColumnType($fields_meta, $th_class); if ($col_visib && !$col_visib_j) { $th_class[] = 'hide'; } @@ -2268,7 +2288,7 @@ class PMA_DisplayResults $draggable_html = '_getClassForNumericColumnType($fields_meta, $th_class); if ($col_visib && !$col_visib_j) { $th_class[] = 'hide'; } diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php index 2610bc8303..22e6b13827 100644 --- a/themes/pmahomme/css/common.css.php +++ b/themes/pmahomme/css/common.css.php @@ -2649,6 +2649,10 @@ fieldset .disabled-field td { display: inline; } +.pma_table th.draggable.right span { + margin-: 0px; +} + .pma_table th.draggable span { margin-: 10px; }