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

Bug: 65689
Change-Id: I55f7af71957634f5c19996be02a51af0288e9e2f
This commit is contained in:
Alex Monk 2014-05-30 21:04:51 +01:00
parent 5e5eb07969
commit 96bcc2dc55

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 );
};
/**