fixes #4145 Schema import dialog improvement (#4154)

Co-authored-by: tejas <tejas@rezolvinfo.com>
This commit is contained in:
Tejas Raghavendra Bhat M 2021-09-17 13:00:11 +05:30 committed by GitHub
parent b98cfc18d3
commit 29ab7b509f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -8,7 +8,7 @@ ImportSchemaDialog.launch = function() {
this._elmts.dialogHeader.text($.i18n('import-wikibase-schema/dialog-header')); this._elmts.dialogHeader.text($.i18n('import-wikibase-schema/dialog-header'));
this._elmts.fileLabel.html($.i18n('import-wikibase-schema/file-label')); this._elmts.fileLabel.html($.i18n('import-wikibase-schema/file-label'));
this._elmts.schemaLabel.text($.i18n('import-wikibase-schema/schema-label')); this._elmts.schemaLabel.text($.i18n('import-wikibase-schema/schema-label'));
this._elmts.cancelButton.text($.i18n('core-project/cancel')); this._elmts.cancelButton.text($.i18n('core-buttons/cancel'));
this._elmts.importButton.text($.i18n('import-wikibase-schema/import')); this._elmts.importButton.text($.i18n('import-wikibase-schema/import'));
this._level = DialogSystem.showDialog(frame); this._level = DialogSystem.showDialog(frame);
@ -58,7 +58,9 @@ ImportSchemaDialog.launch = function() {
{ {
onDone: function() { onDone: function() {
theProject.overlayModels.wikibaseSchema = schema; theProject.overlayModels.wikibaseSchema = schema;
if (SchemaAlignment._isSetUp) {
SchemaAlignment._discardChanges(); SchemaAlignment._discardChanges();
}
dismiss(); dismiss();
}, },
onError: function(e) { onError: function(e) {

View File

@ -1388,4 +1388,3 @@ SchemaAlignment._updateWarnings = function(warnings, totalCount) {
countsElem.show(); countsElem.show();
} }
}; };