Fix Codacy issues

This commit is contained in:
Antonin Delpeuch 2018-03-14 17:17:23 +00:00
parent 2b8ef7a9ae
commit 9583053b1b

View File

@ -208,17 +208,17 @@ SchemaAlignmentDialog._addItem = function(json) {
SchemaAlignmentDialog._initField(inputContainer, "wikibase-item", subject); SchemaAlignmentDialog._initField(inputContainer, "wikibase-item", subject);
var right = $('<div></div>').addClass('wbs-right').appendTo(item); var right = $('<div></div>').addClass('wbs-right').appendTo(item);
$('<div></div>').addClass('wbs-namedesc-container').appendTo(right); $('<div></div>').addClass('wbs-namedesc-container').appendTo(right);
var toolbar = $('<div></div>').addClass('wbs-toolbar').appendTo(right); var termToolbar = $('<div></div>').addClass('wbs-toolbar').appendTo(right);
$('<a></a>').addClass('wbs-add-namedesc').html('<b>+</b>&nbsp;'+ $('<a></a>').addClass('wbs-add-namedesc').html('<b>+</b>&nbsp;'+
$.i18n._('wikidata-schema')["add-term"]) $.i18n._('wikidata-schema')["add-term"])
.click(function() { .click(function() {
SchemaAlignmentDialog._addNameDesc(item, null); SchemaAlignmentDialog._addNameDesc(item, null);
}).appendTo(toolbar); }).appendTo(termToolbar);
$('<div></div>').addClass('wbs-statement-group-container').appendTo(right); $('<div></div>').addClass('wbs-statement-group-container').appendTo(right);
var toolbar = $('<div></div>').addClass('wbs-toolbar').appendTo(right); var statementToolbar = $('<div></div>').addClass('wbs-toolbar').appendTo(right);
$('<a></a>').addClass('wbs-add-statement-group').html('<b>+</b>&nbsp;'+$.i18n._('wikidata-schema')["add-statement"]).click(function() { $('<a></a>').addClass('wbs-add-statement-group').html('<b>+</b>&nbsp;'+$.i18n._('wikidata-schema')["add-statement"]).click(function() {
SchemaAlignmentDialog._addStatementGroup(item, null); SchemaAlignmentDialog._addStatementGroup(item, null);
}).appendTo(toolbar); }).appendTo(statementToolbar);
if (statementGroups) { if (statementGroups) {
for(var i = 0; i != statementGroups.length; i++) { for(var i = 0; i != statementGroups.length; i++) {