Content deleted Content added
. |
. |
||
Line 302:
this.fileSelectField = new OO.ui.FieldLayout(this.fileSelect, { label: 'Upload', align: 'left' });
this.fileSelect.field = this.fileSelectField;
this.urlInputField = new OO.ui.FieldLayout(this.urlInput, { label: 'URL', align: 'left' });
this.urlInput.field = this.urlInputField;
this.imagePreviewField = new OO.ui.FieldLayout(this.imagePreview, { label: 'Preview:', align: 'top' });
this.titleInputField = new OO.ui.FieldLayout(this.titleInput, { label: 'File name', align: 'left' });
Line 334 ⟶ 336:
CoveryDialog.prototype.onFileChosen = function (filePromise, widgetUsed, otherWidget) {
widgetUsed.pushPending();
widgetUsed.
otherWidget.setDisabled(true);
var self = this;
Line 348 ⟶ 350:
);
widgetUsed.popPending();
widgetUsed.
otherWidget.setDisabled(false);
otherWidget.
if (resizedFile.name) { self.titleInput.setValue(resizedFile.name) };
self.onRequiredInputChange();
Line 358 ⟶ 360:
self.resizedFile = null;
widgetUsed.popPending();
widgetUsed.
widgetUsed.
otherWidget.setDisabled(false);
otherWidget.
self.onRequiredInputChange();
}
Line 397 ⟶ 399:
// Only allow uploading if requirements are met
CoveryDialog.prototype.onRequiredInputChange = function (change) {
var self = this;
$.when(change && change.titleIsValid || this.titleInput.getValidity())
.then(
function () {
var requirementsMet = (
!
!
!!
!!
!!
!!
);
upload: requirementsMet
});
},
function () {
upload: false
});
|