From a56372a4caa8b716ac0a4c36b3265ddce2d7b8d1 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 24 Jul 2018 12:06:13 +0200 Subject: [FIX] various broken JS docstrings Resulting in sphinx warnings or ill-formatted doc all the way to the doc not building at all. --- addons/web/static/src/js/core/py_utils.js | 12 ++++--- .../web/static/src/js/views/basic/basic_model.js | 14 ++++---- .../web/static/src/js/views/kanban/kanban_model.js | 6 ++-- addons/web/static/src/js/widgets/dropdown_menu.js | 37 +++++++++++----------- addons/web/static/src/js/widgets/rainbow_man.js | 8 +---- 5 files changed, 37 insertions(+), 40 deletions(-) (limited to 'addons/web/static/src/js') diff --git a/addons/web/static/src/js/core/py_utils.js b/addons/web/static/src/js/core/py_utils.js index 83e24b207c6..9bcd66864e5 100644 --- a/addons/web/static/src/js/core/py_utils.js +++ b/addons/web/static/src/js/core/py_utils.js @@ -335,11 +335,13 @@ function py_eval(expr, context) { /** * Assemble domains into a single domains using an 'OR' or an 'AND' operator. * - * Note: - this function does not evaluate anything inside the domain. This is - * actually quite critical because this allows the manipulation of unevaluated - * (dynamic) domains. - * - this function gives a normalized domain as result, - * - applied on a list of length 1, it returns the domain normalized. + * .. note: + * + * - this function does not evaluate anything inside the domain. This + * is actually quite critical because this allows the manipulation of + * unevaluated (dynamic) domains. + * - this function gives a normalized domain as result, + * - applied on a list of length 1, it returns the domain normalized. * * @param {string[]} domains list of string representing domains * @param {"AND" | "OR"} operator used to combine domains (default "AND") diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index e0c516f02fb..186d0798e8f 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -685,12 +685,14 @@ var BasicModel = AbstractModel.extend({ * * Case for not abandoning the record: * - * 1. flagged as 'no abandon' (i.e. during a `default_get`, including any - * `onchange` from a `default_get`) - * 2. registered in a list on addition - * 2.1. registered as non-new addition - * 2.2. registered as new additon on update - * 3. record is not new + * 1. flagged as 'no abandon' (i.e. during a `default_get`, including any + * `onchange` from a `default_get`) + * 2. registered in a list on addition + * + * 2.1. registered as non-new addition + * 2.2. registered as new additon on update + * + * 3. record is not new * * Otherwise, the record can be abandoned. * diff --git a/addons/web/static/src/js/views/kanban/kanban_model.js b/addons/web/static/src/js/views/kanban/kanban_model.js index 6c4ea1f133c..6cd3fb836fd 100644 --- a/addons/web/static/src/js/views/kanban/kanban_model.js +++ b/addons/web/static/src/js/views/kanban/kanban_model.js @@ -133,9 +133,9 @@ var KanbanModel = BasicModel.extend({ /** * Add the following (kanban specific) keys when performing a `get`: * - * - tooltipData - * - progressBarValues - * - isGroupedByM2ONoColumn + * - tooltipData + * - progressBarValues + * - isGroupedByM2ONoColumn * * @override * @see _readTooltipFields diff --git a/addons/web/static/src/js/widgets/dropdown_menu.js b/addons/web/static/src/js/widgets/dropdown_menu.js index 6fb8aab9bb4..a3a83519678 100644 --- a/addons/web/static/src/js/widgets/dropdown_menu.js +++ b/addons/web/static/src/js/widgets/dropdown_menu.js @@ -21,24 +21,23 @@ var DropdownMenu = Widget.extend({ * override * * @param {Widget} parent - * @param {Object} dropdowHeader object used to customize the dropdown menu. The keys: - * - 'title' (e.g. 'Group By') - * - 'icon' (e.g. 'fa-bars') - * - 'symbol' (e.g. 'caret') - * - 'category' (describes the type of items) - * - 'style' (button style) - * @param {Object} items list of menu items (type IGMenuItem below) - * interface IMenuItem { - * itemId: string; (optional) unique id associated with the item - * description: string; label printed on screen - * groupId: string; - * isActive: boolean; (optional) determines if the item is considered active - * isOpen: boolean; (optional) in case there are options the submenu presenting the options - * is opened or closed according to isOpen - * isRemovable: boolean; (optional) can be removed from menu - * options: array of objects with 'optionId' and 'description' keys; (optional) - * currentOptionId: string refers to an optionId that is activated if item is active (optional) - * } + * @param {Object} dropdownHeader object used to customize the dropdown menu. + * @param {String} dropdownHeader.title + * @param {String} dropdownHeader.icon + * @param {String} dropdownHeader.symbol + * @param {String} dropdownHeader.category descripbes the type of items + * @param {String} dropdownHeader.style the button style + * @param {Object[]} items list of menu items + * + * Menu items: + * + * * itemId: string; (optional) unique id associated with the item + * * description: string; label printed on screen + * * groupId: string; + * * isActive: boolean; (optional) determines if the item is considered active + * * isOpen: boolean; (optional) in case there are options the submenu presenting the options is opened or closed according to isOpen + * * isRemovable: boolean; (optional) can be removed from menu options: array of objects with 'optionId' and 'description' keys; (optional) + * * currentOptionId: string refers to an optionId that is activated if item is active (optional) */ init: function (parent, dropdownHeader, items) { this._super(parent); @@ -67,7 +66,7 @@ var DropdownMenu = Widget.extend({ //-------------------------------------------------------------------------- /** - * @param {Array[number]} groupIds + * @param {Number[]} groupIds */ unsetGroups: function (groupIds) { var self = this; diff --git a/addons/web/static/src/js/widgets/rainbow_man.js b/addons/web/static/src/js/widgets/rainbow_man.js index e46201584bc..99a8f9dba79 100644 --- a/addons/web/static/src/js/widgets/rainbow_man.js +++ b/addons/web/static/src/js/widgets/rainbow_man.js @@ -25,13 +25,7 @@ var RainbowMan = Widget.extend({ * @constructor * @param {Object} [options] * @param {string} [options.message] Message to be displayed on rainbowman card - * @param {string} [options.fadeout='medium'] Delay for rainbowman to disappear - * [options.fadeout='fast'] will make rainbowman dissapear quickly, - * [options.fadeout='medium'] and [options.fadeout='slow'] will wait - * little longer before disappearing (can be used when [options.message] - * is longer), - * [options.fadeout='no'] will keep rainbowman on screen until user clicks - * anywhere outside rainbowman + * @param {string} [options.fadeout='medium'] Delay for rainbowman to disappear. 'fast' will make rainbowman dissapear quickly, 'medium' and 'slow' will wait little longer before disappearing (can be used when options.message is longer), 'no' will keep rainbowman on screen until user clicks anywhere outside rainbowman * @param {string} [options.img_url] URL of the image to be displayed */ init: function (options) { -- cgit v1.2.3