Merge "CategorySelector: Add different ways of searching"
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.ForeignStructuredUpload.js
index be63936..3a70a66 100644 (file)
@@ -11,8 +11,8 @@
         * See <https://commons.wikimedia.org/wiki/Commons:Structured_data> for
         * a more detailed description of how that system works.
         *
-        * TODO this currently only supports uploads under CC-BY-SA 4.0,
-        *     and should really have support for more licenses.
+        * **TODO: This currently only supports uploads under CC-BY-SA 4.0,
+        * and should really have support for more licenses.**
         *
         * @inheritdoc
         */
 
        /**
         * Add categories to the upload.
+        *
         * @param {string[]} categories Array of categories to which this upload will be added.
         */
        ForeignStructuredUpload.prototype.addCategories = function ( categories ) {
                var i, category;
 
                for ( i = 0; i < categories.length; i++ ) {
-                       category = categories[i];
+                       category = categories[ i ];
                        this.categories.push( category );
                }
        };
 
        /**
         * Add a description to the upload.
+        *
         * @param {string} language The language code for the description's language. Must have a template on the target wiki to work properly.
         * @param {string} description The description of the file.
         */
@@ -53,6 +55,7 @@
 
        /**
         * Set the date of creation for the upload.
+        *
         * @param {Date} date
         */
        ForeignStructuredUpload.prototype.setDate = function ( date ) {
@@ -62,6 +65,7 @@
        /**
         * Get the text of the file page, to be created on upload. Brings together
         * several different pieces of information to create useful text.
+        *
         * @return {string}
         */
        ForeignStructuredUpload.prototype.getText = function () {
@@ -85,6 +89,7 @@
 
        /**
         * Gets the wikitext for the creation date of this upload.
+        *
         * @private
         * @return {string}
         */
        /**
         * Gets the name of the template to use for creating the file metadata.
         * Override in subclasses for other templates.
+        *
         * @private
         * @return {string}
         */
        /**
         * Fetches the wikitext for any descriptions that have been added
         * to the upload.
+        *
         * @private
         * @return {string}
         */
                var i, desc, templateCalls = [];
 
                for ( i = 0; i < this.descriptions.length; i++ ) {
-                       desc = this.descriptions[i];
+                       desc = this.descriptions[ i ];
                        templateCalls.push( '{{' + desc.language + '|' + desc.text + '}}' );
                }
 
        /**
         * Fetches the wikitext for the categories to which the upload will
         * be added.
+        *
         * @private
         * @return {string}
         */
                var i, cat, categoryLinks = [];
 
                for ( i = 0; i < this.categories.length; i++ ) {
-                       cat = this.categories[i];
+                       cat = this.categories[ i ];
                        categoryLinks.push( '[[Category:' + cat + ']]' );
                }
 
 
        /**
         * Gets the wikitext for the license of the upload. Abstract for now.
+        *
         * @private
         * @return {string}
         */
 
        /**
         * Get the username.
+        *
         * @private
         * @return {string}
         */