From a70a2f38b7ade6ccd1ada37c614a44d8cb382ed8 Mon Sep 17 00:00:00 2001 From: Stefan Scheu Date: Wed, 10 May 2023 12:49:17 +0200 Subject: [PATCH] fix: change sorting behavior to not change sort method --- .../AdminBundle/Resources/public/js/pimcore/object/tree.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/AdminBundle/Resources/public/js/pimcore/object/tree.js b/bundles/AdminBundle/Resources/public/js/pimcore/object/tree.js index d3307a32591..0878c52960b 100644 --- a/bundles/AdminBundle/Resources/public/js/pimcore/object/tree.js +++ b/bundles/AdminBundle/Resources/public/js/pimcore/object/tree.js @@ -782,7 +782,7 @@ pimcore.object.tree = Class.create({ let currentSortMethod = record.data.sortBy; - if (currentSortMethod !== "key" || user.admin || user.isAllowed("objects_sort_method")) { + if (currentSortMethod === "key" || user.admin || user.isAllowed("objects_sort_method")) { sortByItems.push({ text: t('by_key'), iconCls: "pimcore_icon_alphabetical_sorting_az", @@ -795,7 +795,7 @@ pimcore.object.tree = Class.create({ }); } - if (currentSortMethod !== "index" || user.admin || user.isAllowed("objects_sort_method")) { + if (currentSortMethod === "index" || user.admin || user.isAllowed("objects_sort_method")) { sortByItems.push({ text: t('by_index'), iconCls: "pimcore_icon_index_sorting",