*/
mw.ForeignStructuredUpload.BookletLayout.prototype.getText = function () {
var language = mw.config.get( 'wgContentLanguage' );
+ this.upload.clearDescriptions();
this.upload.addDescription( language, this.descriptionWidget.getValue() );
this.upload.setDate( this.dateWidget.getValue() );
+ this.upload.clearCategories();
this.upload.addCategories( this.categoriesWidget.getItemsData() );
return this.upload.getText();
};
}
};
+ /**
+ * Empty the list of categories for the upload.
+ */
+ ForeignStructuredUpload.prototype.clearCategories = function () {
+ this.categories = [];
+ };
+
/**
* Add a description to the upload.
*
} );
};
+ /**
+ * Empty the list of descriptions for the upload.
+ */
+ ForeignStructuredUpload.prototype.clearDescriptions = function () {
+ this.descriptions = [];
+ };
+
/**
* Set the date of creation for the upload.
*