From cf578cf6415a371656be0be208d9144066c02ed8 Mon Sep 17 00:00:00 2001 From: Fabian Steeg Date: Mon, 23 Sep 2019 12:22:13 +0200 Subject: [PATCH] Set suggestOptions.type to the selected reconciliation type Remove Freebase-specific option and default value See https://github.com/OpenRefine/OpenRefine/issues/2168 --- .../core/scripts/reconciliation/standard-service-panel.js | 2 +- main/webapp/modules/core/scripts/util/custom-suggest.js | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js index ccca5f99e..9bdbdecec 100644 --- a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js +++ b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js @@ -246,7 +246,7 @@ ReconStandardServicePanel.prototype._rewirePropertySuggests = function(type) { suggestOptions.key = null; suggestOptions.query_param_name = "prefix"; if (type) { - suggestOptions.ac_param = { schema: typeof type == "string" ? type : type.id }; + suggestOptions.type = typeof type == "string" ? type : type.id; } inputs.suggestP(suggestOptions); } diff --git a/main/webapp/modules/core/scripts/util/custom-suggest.js b/main/webapp/modules/core/scripts/util/custom-suggest.js index 17a1760d7..2bf09ae23 100644 --- a/main/webapp/modules/core/scripts/util/custom-suggest.js +++ b/main/webapp/modules/core/scripts/util/custom-suggest.js @@ -91,13 +91,6 @@ var CustomSuggest = {}; var originalSuggestP = $.suggest.suggestP; $.suggest.suggestP = function(input, options) { originalSuggestP.call(this, input, options); - - if ("ac_param" in options) { - var ac_param = options.ac_param; - if ("schema" in ac_param) { - this.options.ac_param.schema = ac_param.schema; - } - } }; $.suggest.suggestP.prototype = originalSuggestP.prototype; @@ -109,7 +102,6 @@ var CustomSuggest = {}; {}, $.suggest.suggest.defaults, { scoring: "schema", - type: "/type/property", css: { pane: "fbs-pane fbs-pane-property" } } )