Merge ""Use an existing reference" in the reference dialog should be disabled when there is content"

This commit is contained in:
jenkins-bot 2014-05-30 22:26:33 +00:00 committed by Gerrit Code Review
commit 21ab1a9b7e

View file

@ -140,9 +140,10 @@ ve.ui.MWReferenceDialog.static.pasteRules = ve.extendObject(
ve.ui.MWReferenceDialog.prototype.onDocumentTransact = function () {
var data = this.referenceSurface.getContent(),
// TODO: Check for other types of empty, e.g. only whitespace?
disabled = data.length <= 4;
applyDisabled = data.length <= 4;
this.applyButton.setDisabled( disabled );
this.applyButton.setDisabled( applyDisabled );
this.selectButton.setDisabled( !applyDisabled );
};
/**