Also make suggestions clickable in Wikidata extension

This commit is contained in:
Antonin Delpeuch 2019-02-19 14:42:04 +00:00
parent b068e18ada
commit 2f298b4093

View File

@ -802,6 +802,10 @@ SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue,
var suggestConfig = $.extend({}, endpoint); var suggestConfig = $.extend({}, endpoint);
suggestConfig.key = null; suggestConfig.key = null;
suggestConfig.query_param_name = "prefix"; 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) { input.suggestP(suggestConfig).bind("fb-select", function(evt, data) {
inputContainer.data("jsonValue", { inputContainer.data("jsonValue", {
@ -820,6 +824,9 @@ SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue,
var suggestConfig = $.extend({}, endpoint); var suggestConfig = $.extend({}, endpoint);
suggestConfig.key = null; suggestConfig.key = null;
suggestConfig.query_param_name = "prefix"; 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) { input.suggestP(suggestConfig).bind("fb-select", function(evt, data) {
inputContainer.data("jsonValue", { inputContainer.data("jsonValue", {