From 2f298b4093d75845452cd16a9febaf6bc085df5f Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Tue, 19 Feb 2019 14:42:04 +0000 Subject: [PATCH] Also make suggestions clickable in Wikidata extension --- .../module/scripts/dialogs/schema-alignment-dialog.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js b/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js index f9a1ebc8b..f6060957f 100644 --- a/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js +++ b/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js @@ -802,6 +802,10 @@ SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue, var suggestConfig = $.extend({}, endpoint); suggestConfig.key = null; suggestConfig.query_param_name = "prefix"; + if ('view' in this._reconService && 'url' in this._reconService.view && !('view_url' in endpoint)) { + suggestOptions.view_url = this._reconService.view.url; + } + input.suggestP(suggestConfig).bind("fb-select", function(evt, data) { inputContainer.data("jsonValue", { @@ -820,6 +824,9 @@ SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue, var suggestConfig = $.extend({}, endpoint); suggestConfig.key = null; suggestConfig.query_param_name = "prefix"; + if ('view' in this._reconService && 'url' in this._reconService.view && !('view_url' in endpoint)) { + suggestOptions.view_url = this._reconService.view.url; + } input.suggestP(suggestConfig).bind("fb-select", function(evt, data) { inputContainer.data("jsonValue", {