From 43e062fabfa0b220df017c8617e033377c3f04e3 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 11 Dec 2018 15:24:09 +0000 Subject: [PATCH] [FIX] *: JS doc/docstring errors & warnings closes odoo/odoo#29439 --- .../src/js/thread_windows/thread_window.js | 6 +++--- .../static/src/js/product_configurator_mixin.js | 1 + .../src/js/product_configurator_renderer.js | 1 + .../web/static/src/js/chrome/abstract_action.js | 2 +- addons/web/static/src/js/chrome/action_mixin.js | 17 ++++++++++------- addons/web/static/src/js/core/registry.js | 2 +- .../web/static/src/js/services/data_manager.js | 4 +--- .../views/control_panel/control_panel_view.js | 2 -- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/addons/mail/static/src/js/thread_windows/thread_window.js b/addons/mail/static/src/js/thread_windows/thread_window.js index cd5ffa7db94..57907a55943 100644 --- a/addons/mail/static/src/js/thread_windows/thread_window.js +++ b/addons/mail/static/src/js/thread_windows/thread_window.js @@ -132,9 +132,9 @@ var ThreadWindow = AbstractThreadWindow.extend({ * * Do not display the input in the following cases: * - * - no thread related to this window - * - window of a mailbox (temp: let us have mailboxes in window mode) - * - window of a thread with mass mailing + * - no thread related to this window + * - window of a mailbox (temp: let us have mailboxes in window mode) + * - window of a thread with mass mailing * * Any other threads show the input in the window. * diff --git a/addons/sale/static/src/js/product_configurator_mixin.js b/addons/sale/static/src/js/product_configurator_mixin.js index aa1066a0c24..109e08ef38f 100644 --- a/addons/sale/static/src/js/product_configurator_mixin.js +++ b/addons/sale/static/src/js/product_configurator_mixin.js @@ -279,6 +279,7 @@ var ProductConfiguratorMixin = { /** * Will return a deferred: + * * - If the product already exists, immediately resolves it with the product_id * - If the product does not exist yet ("dynamic" variant creation), this method will * create the product first and then resolve the deferred with the created product's id diff --git a/addons/sale/static/src/js/product_configurator_renderer.js b/addons/sale/static/src/js/product_configurator_renderer.js index 9a613501a2f..899656c8065 100644 --- a/addons/sale/static/src/js/product_configurator_renderer.js +++ b/addons/sale/static/src/js/product_configurator_renderer.js @@ -28,6 +28,7 @@ var ProductConfiguratorFormRenderer = FormRenderer.extend(ProductConfiguratorMix * Renders the product configurator within the form * * Will also: + * * - add events handling for variant changes * - trigger variant change to compute the price and other * variant specific changes diff --git a/addons/web/static/src/js/chrome/abstract_action.js b/addons/web/static/src/js/chrome/abstract_action.js index 226802ba76b..a5f98434ddb 100644 --- a/addons/web/static/src/js/chrome/abstract_action.js +++ b/addons/web/static/src/js/chrome/abstract_action.js @@ -31,7 +31,7 @@ var AbstractAction = Widget.extend(ActionMixin, { * to do that, it also needs a specific modelName. * * For example, the Discuss application adds the following line in its - * constructor: + * constructor:: * * this.controlPanelParams.modelName = 'mail.message'; * diff --git a/addons/web/static/src/js/chrome/action_mixin.js b/addons/web/static/src/js/chrome/action_mixin.js index 099244592ad..92d6716a7c0 100644 --- a/addons/web/static/src/js/chrome/action_mixin.js +++ b/addons/web/static/src/js/chrome/action_mixin.js @@ -102,14 +102,17 @@ var ActionMixin = { * This function is called when the current state of the action * should be known. For instance, if the action is a view controller, * this may be useful to reinstantiate a view in the same state. + * * Typically the state can (and should) be encoded in a query object of - * the form - * { - * context: {...}, - * groupBy: [...], - * domain = [...], - * orderedBy = [...], - * } + * the form:: + * + * { + * context: {...}, + * groupBy: [...], + * domain = [...], + * orderedBy = [...], + * } + * * where the context key can contain many information. * This method is mainly called during the creation of a custom filter. * diff --git a/addons/web/static/src/js/core/registry.js b/addons/web/static/src/js/core/registry.js index c6d35229639..cf898c647ca 100644 --- a/addons/web/static/src/js/core/registry.js +++ b/addons/web/static/src/js/core/registry.js @@ -41,7 +41,7 @@ var Registry = Class.extend({ * * @param {string} key * @param {any} value - * @param {[number]} score if given, this value will be used to order keys + * @param {number} [score] if given, this value will be used to order keys * @returns {Registry} can be used to chain add calls. */ add: function (key, value, score) { diff --git a/addons/web/static/src/js/services/data_manager.js b/addons/web/static/src/js/services/data_manager.js index afedaa1148f..348054691bc 100644 --- a/addons/web/static/src/js/services/data_manager.js +++ b/addons/web/static/src/js/services/data_manager.js @@ -126,8 +126,6 @@ return core.Class.extend({ /** * Loads the filters of a given model and optional action id. * - * @param {Object} [dataset] the dataset for which the filters are loaded - * @param {int} [action_id] the id of the action (optional) * @param {Object} params * @param {string} params.modelName * @param {Object} params.context @@ -176,7 +174,7 @@ return core.Class.extend({ /** * Calls 'unlink' on 'ir_filters'. * - * @param {integer} filterId, Id of the filter to remove + * @param {integer} filterId Id of the filter to remove * @return {Deferred} */ delete_filter: function (filterId) { diff --git a/addons/web/static/src/js/views/control_panel/control_panel_view.js b/addons/web/static/src/js/views/control_panel/control_panel_view.js index 3ba7afb2a60..0d842c4182d 100644 --- a/addons/web/static/src/js/views/control_panel/control_panel_view.js +++ b/addons/web/static/src/js/views/control_panel/control_panel_view.js @@ -43,8 +43,6 @@ var ControlPanelView = Factory.extend({ * breadcrumbs won't be rendered * @param {boolean} [params.withSearchBar=true] if set to false, no default * search bar will be rendered - * @param {boolean} [activateDefaultFavorite=false] determine if the default - * custom filters can be activated */ init: function (params) { var self = this;