Fix suggest middle click in Wikidata schema

This commit is contained in:
Antonin Delpeuch 2019-02-25 10:15:29 +00:00
parent f9ef60e839
commit ac07457306

View File

@ -803,11 +803,11 @@ SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue,
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)) { if ('view' in this._reconService && 'url' in this._reconService.view && !('view_url' in endpoint)) {
suggestOptions.view_url = this._reconService.view.url; suggestConfig.view_url = this._reconService.view.url;
} }
input.suggestP(suggestConfig).bind("fb-select", function(evt, data) { input.suggest(suggestConfig).bind("fb-select", function(evt, data) {
inputContainer.data("jsonValue", { inputContainer.data("jsonValue", {
type : "wbitemconstant", type : "wbitemconstant",
qid : data.id, qid : data.id,
@ -824,9 +824,6 @@ 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", {