var PerformEditsDialog = {}; PerformEditsDialog.launch = function(logged_in_username) { var self = this; var elmts = this._elmts; var frame = this.frame; console.log(this.missingSchema); if (this.missingSchema) { return; } this._level = DialogSystem.showDialog(frame); this._elmts.dialogHeader.text($.i18n._('perform-wikidata-edits')["dialog-header"]); this._elmts.reviewYourEdits.html($.i18n._('perform-wikidata-edits')["review-your-edits"]); this._elmts.loggedInAs.text($.i18n._('perform-wikidata-edits')["logged-in-as"]); this._elmts.editSummaryLabel.text($.i18n._('perform-wikidata-edits')["edit-summary-label"]); this._elmts.performEditsButton.text($.i18n._('perform-wikidata-edits')["perform-edits"]); this._elmts.cancelButton.text($.i18n._('perform-wikidata-edits')["cancel"]); var dismiss = function() { DialogSystem.dismissUntil(self._level - 1); }; elmts.loggedInUsername.text(logged_in_username); frame.find('.cancel-button').click(function() { dismiss(); }); elmts.performEditsButton.click(function() { Refine.postProcess( "wikidata", "perform-wikibase-edits", {}, { summary: elmts.editSummary.val(), }, { includeEngine: true, cellsChanged: true, columnStatsChanged: true }, { onDone: function() { dismiss(); } }); }); }; PerformEditsDialog._updateWarnings = function(data) { var warnings = data.warnings; var mainDiv = this._elmts.warningsArea; // clear everything mainDiv.empty(); var table = $('