Add paste button on new statements, fix invalidation of 'copied' state
This commit is contained in:
parent
a7482ff0d2
commit
d0a27543f5
@ -627,8 +627,10 @@ SchemaAlignmentDialog._addStatement = function(container, datatype, json) {
|
|||||||
var pasteToolbar = $('<div></div>').addClass('wbs-toolbar').appendTo(referencesToggleContainer);
|
var pasteToolbar = $('<div></div>').addClass('wbs-toolbar').appendTo(referencesToggleContainer);
|
||||||
var referencePaste = $('<span></span>')
|
var referencePaste = $('<span></span>')
|
||||||
.addClass('wbs-paste-reference')
|
.addClass('wbs-paste-reference')
|
||||||
.appendTo(pasteToolbar)
|
.appendTo(pasteToolbar);
|
||||||
.hide();
|
if (SchemaAlignmentDialog._copiedReference === null) {
|
||||||
|
referencePaste.hide();
|
||||||
|
}
|
||||||
var pasteIcon = $('<span></span>').addClass('wbs-icon').appendTo(referencePaste);
|
var pasteIcon = $('<span></span>').addClass('wbs-icon').appendTo(referencePaste);
|
||||||
var referencePasteButton = $('<a></a>')
|
var referencePasteButton = $('<a></a>')
|
||||||
.addClass('wbs-paste-reference-button')
|
.addClass('wbs-paste-reference-button')
|
||||||
@ -1232,6 +1234,10 @@ SchemaAlignmentDialog._hasChanged = function() {
|
|||||||
SchemaAlignmentDialog._schemaElmts.discardButton
|
SchemaAlignmentDialog._schemaElmts.discardButton
|
||||||
.prop('disabled', false)
|
.prop('disabled', false)
|
||||||
.removeClass('disabled');
|
.removeClass('disabled');
|
||||||
|
$('.wbs-copy-reference-button')
|
||||||
|
.text($.i18n('wikidata-schema/copy-reference'));
|
||||||
|
$('.wbs-copy-reference')
|
||||||
|
.removeClass('wbs-copied-reference');
|
||||||
}
|
}
|
||||||
|
|
||||||
SchemaAlignmentDialog.updateNbEdits = function(nb_edits) {
|
SchemaAlignmentDialog.updateNbEdits = function(nb_edits) {
|
||||||
|
Loading…
Reference in New Issue
Block a user