diff --git a/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js b/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js index a872c3d2a8c..2f0e39be264 100644 --- a/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js +++ b/web-ui/src/main/resources/catalog/components/edit/directoryentryselector/DirectoryEntrySelector.js @@ -128,6 +128,10 @@ pre: function preLink(scope) { var directorySearchSettings = gnGlobalSettings.gnCfg.mods.directory || {}; + var sortConfig = ( + directorySearchSettings.sortBy || gnSearchSettings.sortBy + ).split("#"); + scope.searchObj = { any: "", internal: true, @@ -138,8 +142,8 @@ from: 1, to: 20, root: "gmd:CI_ResponsibleParty", - sortBy: directorySearchSettings.sortBy || gnSearchSettings.sortBy, - sortOrder: "", + sortBy: sortConfig[0] || "relevance", + sortOrder: sortConfig[1] || "", resultType: "subtemplates", queryBase: directorySearchSettings.queryBase || gnSearchSettings.queryBase @@ -639,6 +643,10 @@ pre: function preLink(scope) { var directorySearchSettings = gnGlobalSettings.gnCfg.mods.directory || {}; + var sortConfig = ( + directorySearchSettings.sortBy || gnSearchSettings.sortBy + ).split("#"); + scope.searchObj = { internal: true, configId: "directoryInEditor", @@ -648,7 +656,8 @@ from: 1, to: 10, root: "gmd:CI_ResponsibleParty", - sortBy: directorySearchSettings.sortBy || gnSearchSettings.sortBy, + sortBy: sortConfig[0] || "relevance", + sortOrder: sortConfig[1] || "", queryBase: directorySearchSettings.queryBase || gnSearchSettings.queryBase } diff --git a/web-ui/src/main/resources/catalog/js/edit/DirectoryController.js b/web-ui/src/main/resources/catalog/js/edit/DirectoryController.js index 3baa7a89bd0..8c8b6abfe81 100644 --- a/web-ui/src/main/resources/catalog/js/edit/DirectoryController.js +++ b/web-ui/src/main/resources/catalog/js/edit/DirectoryController.js @@ -106,12 +106,17 @@ $scope.facetConfig = directorySearchSettings.facetConfig; + var sortConfig = (directorySearchSettings.sortBy || gnSearchSettings.sortBy).split( + "#" + ); + $scope.defaultSearchObj = { selectionBucket: "d101", configId: "directory", any: "", params: { - sortBy: directorySearchSettings.sortBy || gnSearchSettings.sortBy, + sortBy: sortConfig[0] || "relevance", + sortOrder: sortConfig[1] || "", isTemplate: ["s"], from: 1, to: 20,