diff --git a/ChangeLog b/ChangeLog index 76d38d5eba..e3b2dd6243 100644 --- a/ChangeLog +++ b/ChangeLog @@ -48,6 +48,7 @@ phpMyAdmin - ChangeLog - issue Fix double encoding on User Groups pages - issue Fix list of users of an user group not showing up - issue Fix duplicate query params in the SQL message card +- issue #18314 Fix dragged row in index form 5.2.1 (2023-02-07) - issue #17522 Fix case where the routes cache file is invalid diff --git a/js/src/modules/functions.ts b/js/src/modules/functions.ts index 04bea45062..1cbb71c172 100644 --- a/js/src/modules/functions.ts +++ b/js/src/modules/functions.ts @@ -2868,14 +2868,29 @@ function showIndexEditDialog ($outer) { checkIndexType(); checkIndexName('index_frm'); var $indexColumns = $('#index_columns'); - $indexColumns.find('td').each(function () { - $(this).css('width', $(this).width() + 'px'); - }); - $indexColumns.find('tbody').sortable({ axis: 'y', containment: $indexColumns.find('tbody'), - tolerance: 'pointer' + tolerance: 'pointer', + forcePlaceholderSize: true, + // Add custom dragged row + // @ts-ignore + helper: function (event, tr: any) { + var $originalCells = (tr as JQuery).children(); + var $helper = (tr as JQuery).clone(); + $helper.children().each(function (index) { + // Set cell width in dragged row + $(this).width($originalCells.eq(index).outerWidth()); + var $childrenSelect = $originalCells.eq(index).children('select'); + if ($childrenSelect.length) { + var selectedIndex = $childrenSelect.prop('selectedIndex'); + // Set correct select value in dragged row + $(this).children('select').prop('selectedIndex', selectedIndex); + } + }); + + return $helper; + } }); Functions.showHints($outer); diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e20369be8b..da97fbd21b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -2100,6 +2100,11 @@ parameters: count: 2 path: libraries/classes/Controllers/Table/FindReplaceController.php + - + message: "#^Cannot cast mixed to string\\.$#" + count: 3 + path: libraries/classes/Controllers/Table/GetFieldController.php + - message: "#^Parameter \\#1 \\$string of function mb_strlen expects string, string\\|null given\\.$#" count: 1 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 3ac8955e3d..cd8ccb5102 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -3445,25 +3445,9 @@ - - - - - - - - - - - - - $result - - $request - diff --git a/templates/database/central_columns/main.twig b/templates/database/central_columns/main.twig index c95e3c164c..a24a0137e6 100644 --- a/templates/database/central_columns/main.twig +++ b/templates/database/central_columns/main.twig @@ -271,7 +271,7 @@ {{ get_icon('b_edit', 'Edit' | trans) | raw }} - {{ get_icon('b_drop', 'Delete' | trans) }} + {{ get_icon('b_drop', 'Delete' | trans) }}