diff --git a/app/assets/javascripts/admin/controllers/admin_api_controller.js b/app/assets/javascripts/admin/controllers/admin_api_controller.js index 8a0861c6ea4..856c39c3d56 100644 --- a/app/assets/javascripts/admin/controllers/admin_api_controller.js +++ b/app/assets/javascripts/admin/controllers/admin_api_controller.js @@ -25,7 +25,7 @@ Discourse.AdminApiController = Ember.ArrayController.extend({ Creates an API key instance with internal user object @method regenerateKey - @param {Discourse.ApiKey} the key to regenerate + @param {Discourse.ApiKey} key the key to regenerate **/ regenerateKey: function(key) { bootbox.confirm(I18n.t("admin.api.confirm_regen"), I18n.t("no_value"), I18n.t("yes_value"), function(result) { @@ -39,7 +39,7 @@ Discourse.AdminApiController = Ember.ArrayController.extend({ Revokes an API key @method revokeKey - @param {Discourse.ApiKey} the key to revoke + @param {Discourse.ApiKey} key the key to revoke **/ revokeKey: function(key) { var self = this; diff --git a/app/assets/javascripts/admin/models/api_key.js b/app/assets/javascripts/admin/models/api_key.js index 4c21df9a513..40968855841 100644 --- a/app/assets/javascripts/admin/models/api_key.js +++ b/app/assets/javascripts/admin/models/api_key.js @@ -40,7 +40,7 @@ Discourse.ApiKey.reopenClass({ Creates an API key instance with internal user object @method create - @param {Object} the properties to create + @param {...} var_args the properties to initialize this with @returns {Discourse.ApiKey} the ApiKey instance **/ create: function() { diff --git a/app/assets/javascripts/admin/routes/admin_backups_route.js b/app/assets/javascripts/admin/routes/admin_backups_route.js index 74cd765c6cc..deadc2407e3 100644 --- a/app/assets/javascripts/admin/routes/admin_backups_route.js +++ b/app/assets/javascripts/admin/routes/admin_backups_route.js @@ -69,7 +69,7 @@ Discourse.AdminBackupsRoute = Discourse.Route.extend({ Destroys a backup @method destroyBackup - @param {Discourse.Backup} the backup to destroy + @param {Discourse.Backup} backup the backup to destroy **/ destroyBackup: function(backup) { var self = this; @@ -91,7 +91,7 @@ Discourse.AdminBackupsRoute = Discourse.Route.extend({ Start a restore and redirect the user to the logs tab @method startRestore - @param {Discourse.Backup} the backup to restore + @param {Discourse.Backup} backup the backup to restore **/ startRestore: function(backup) { var self = this; diff --git a/app/assets/javascripts/discourse/dialects/bbcode_dialect.js b/app/assets/javascripts/discourse/dialects/bbcode_dialect.js index 51357be810d..d47698d8b68 100644 --- a/app/assets/javascripts/discourse/dialects/bbcode_dialect.js +++ b/app/assets/javascripts/discourse/dialects/bbcode_dialect.js @@ -4,7 +4,14 @@ @method replaceBBCode @param {tag} tag the tag we want to match @param {function} emitter the function that creates JsonML for the tag - @param {Object} hash of options to pass to `inlineBetween` + @param {Object} opts options to pass to Discourse.Dialect.inlineBetween + @param {Function} [opts.emitter] The function that will be called with the contents and returns JsonML. + @param {String} [opts.start] The starting token we want to find + @param {String} [opts.stop] The ending token we want to find + @param {String} [opts.between] A shortcut for when the `start` and `stop` are the same. + @param {Boolean} [opts.rawContents] If true, the contents between the tokens will not be parsed. + @param {Boolean} [opts.wordBoundary] If true, the match must be on a word boundary + @param {Boolean} [opts.spaceBoundary] If true, the match must be on a sppace boundary **/ function replaceBBCode(tag, emitter, opts) { opts = opts || {}; diff --git a/app/assets/javascripts/discourse/dialects/dialect.js b/app/assets/javascripts/discourse/dialects/dialect.js index cf12fc64d1d..d3d35b645d5 100644 --- a/app/assets/javascripts/discourse/dialects/dialect.js +++ b/app/assets/javascripts/discourse/dialects/dialect.js @@ -143,6 +143,7 @@ Discourse.Dialect = { @method cook @param {String} text the raw text to cook + @param {Object} opts hash of options @returns {String} the cooked text **/ cook: function(text, opts) { @@ -288,9 +289,8 @@ Discourse.Dialect = { the other helpers such as `replaceBlock` so consider using them first! @method registerBlock - @param {String} the name of the block handler - @param {Function} the handler - + @param {String} name the name of the block handler + @param {Function} handler the handler **/ registerBlock: function(name, handler) { dialect.block[name] = handler; diff --git a/app/assets/javascripts/discourse/lib/markdown.js b/app/assets/javascripts/discourse/lib/markdown.js index a2bdfde351e..00748dfae1c 100644 --- a/app/assets/javascripts/discourse/lib/markdown.js +++ b/app/assets/javascripts/discourse/lib/markdown.js @@ -13,10 +13,10 @@ Discourse.Markdown = { validIframes: [], /** - Whitelists classes for sanitization + Whitelists more classes for sanitization. + @param {...String} var_args Classes to whitelist @method whiteListClass - @param {String} val The value to whitelist. Can supply more than one argument **/ whiteListClass: function() { var args = Array.prototype.slice.call(arguments), @@ -113,7 +113,10 @@ Discourse.Markdown = { Checks to see if a URL is allowed in the cooked content @method urlAllowed - @param {String} url Url to check + @param {String} uri Url to check + @param {Number} effect ignored + @param {Number} ltype ignored + @param {Object} hints an object with hints, used to check if this url is from an iframe @return {String} url to insert in the cooked content **/ urlAllowed: function (uri, effect, ltype, hints) { diff --git a/app/assets/javascripts/discourse/lib/utilities.js b/app/assets/javascripts/discourse/lib/utilities.js index 0e4e913524e..71dbe19522c 100644 --- a/app/assets/javascripts/discourse/lib/utilities.js +++ b/app/assets/javascripts/discourse/lib/utilities.js @@ -210,7 +210,7 @@ Discourse.Utilities = { Check the extension of the file against the list of authorized extensions @method isAuthorizedUpload - @param {File} files The file we want to upload + @param {File} file The file we want to upload **/ isAuthorizedUpload: function(file) { var extensions = Discourse.SiteSettings.authorized_extensions; diff --git a/app/assets/javascripts/discourse/mixins/modal_functionality.js b/app/assets/javascripts/discourse/mixins/modal_functionality.js index acb22820496..8cb98fc86a8 100644 --- a/app/assets/javascripts/discourse/mixins/modal_functionality.js +++ b/app/assets/javascripts/discourse/mixins/modal_functionality.js @@ -13,7 +13,8 @@ Discourse.ModalFunctionality = Em.Mixin.create({ Flash a message at the top of the modal @method blank - @param {String} name the name of the property we want to check + @param {String} message I18n name of the message + @param {String} messageClass CSS class to apply @return {Boolean} **/ flash: function(message, messageClass) { diff --git a/app/assets/javascripts/discourse/models/post_stream.js b/app/assets/javascripts/discourse/models/post_stream.js index c66f1a82d19..90e78859c0f 100644 --- a/app/assets/javascripts/discourse/models/post_stream.js +++ b/app/assets/javascripts/discourse/models/post_stream.js @@ -179,7 +179,6 @@ Discourse.PostStream = Em.Object.extend({ Cancel any active filters on the stream. @method cancelFilter - @returns {Ember.Deferred} a promise that resolves when the filter has been cancelled. **/ cancelFilter: function() { this.set('summary', false); @@ -373,8 +372,8 @@ Discourse.PostStream = Em.Object.extend({ `undoPost` when it fails. @method stagePost - @param {Discourse.Post} the post to stage in the stream - @param {Discourse.User} the user creating the post + @param {Discourse.Post} post the post to stage in the stream + @param {Discourse.User} user the user creating the post **/ stagePost: function(post, user) { diff --git a/app/assets/javascripts/discourse/models/topic_list.js b/app/assets/javascripts/discourse/models/topic_list.js index 7c8b2e07f37..5c2d1b1cd6d 100644 --- a/app/assets/javascripts/discourse/models/topic_list.js +++ b/app/assets/javascripts/discourse/models/topic_list.js @@ -162,7 +162,7 @@ Discourse.TopicList.reopenClass({ Stitch together side loaded topic data @method topicsFrom - @param {Object} JSON object with topic data + @param {Object} result JSON object with topic data @returns {Array} the list of topics **/ topicsFrom: function(result) { @@ -204,8 +204,8 @@ Discourse.TopicList.reopenClass({ Lists topics on a given menu item @method list - @param {Object} The menu item to filter to - @param {Object} Any additional params + @param {Object} filter The menu item to filter to + @param {Object} params Any additional params to pass to TopicList.find() @returns {Promise} a promise that resolves to the list of topics **/ list: function(filter, params) { diff --git a/app/assets/javascripts/discourse/models/user.js b/app/assets/javascripts/discourse/models/user.js index c09e53feb50..e253b0c4766 100644 --- a/app/assets/javascripts/discourse/models/user.js +++ b/app/assets/javascripts/discourse/models/user.js @@ -461,6 +461,7 @@ Discourse.User.reopenClass(Discourse.Singleton, { @method checkUsername @param {String} username A username to check @param {String} email An email address to check + @param {Number} forUserId user id - provide when changing username **/ checkUsername: function(username, email, forUserId) { return Discourse.ajax('/users/check_username', { @@ -472,7 +473,7 @@ Discourse.User.reopenClass(Discourse.Singleton, { Groups the user's statistics @method groupStats - @param {Array} Given stats + @param {Array} stats Given stats @returns {Object} **/ groupStats: function(stats) { @@ -507,6 +508,7 @@ Discourse.User.reopenClass(Discourse.Singleton, { @param {String} name This user's name @param {String} email This user's email @param {String} password This user's password + @param {String} username This user's username @param {String} passwordConfirm This user's confirmed password @param {String} challenge @returns Result of ajax call diff --git a/app/assets/javascripts/discourse/views/container_view.js b/app/assets/javascripts/discourse/views/container_view.js index 580a690b742..65b3e70ae33 100644 --- a/app/assets/javascripts/discourse/views/container_view.js +++ b/app/assets/javascripts/discourse/views/container_view.js @@ -14,7 +14,7 @@ Discourse.ContainerView = Ember.ContainerView.extend(Discourse.Presence, { @method attachViewWithArgs @param {Object} viewArgs The arguments to pass when creating the view - @param {Class} klass The view class we want to create + @param {Class} viewClass The view class we want to create **/ attachViewWithArgs: function(viewArgs, viewClass) { if (!viewClass) { viewClass = Ember.View.extend(); } @@ -26,7 +26,7 @@ Discourse.ContainerView = Ember.ContainerView.extend(Discourse.Presence, { Attaches a view with no arguments and wires up the container properly @method attachViewClass - @param {Class} klass The view class we want to create + @param {Class} viewClass The view class we want to add **/ attachViewClass: function(viewClass) { this.attachViewWithArgs(null, viewClass);