From 03a2a571636657c90b2d344f2ed83cbe6459c081 Mon Sep 17 00:00:00 2001
From: Xavier Morel <xmo@odoo.com>
Date: Mon, 9 Oct 2017 16:50:29 +0200
Subject: [PATCH] [FIX] unfuck JS docstrings

---
 .../js/reconciliation/reconciliation_model.js |  6 +--
 addons/portal/static/src/js/portal_chatter.js |  6 +--
 .../web/static/src/js/chrome/control_panel.js | 46 +++++++++----------
 addons/web/static/src/js/core/dom.js          |  6 +--
 .../static/src/js/views/basic/basic_model.js  |  2 +-
 5 files changed, 32 insertions(+), 34 deletions(-)

diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js
index b35802422e4a..877dae2c9e0c 100644
--- a/addons/account/static/src/js/reconciliation/reconciliation_model.js
+++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js
@@ -397,7 +397,7 @@ var StatementModel = BasicModel.extend({
     /**
      * Load more bank statement line
      *
-     * @param {integer} quantity to load
+     * @param {integer} qty quantity to load
      * @returns {Deferred}
      */
     loadMore: function(qty) {
@@ -412,8 +412,8 @@ var StatementModel = BasicModel.extend({
     /**
      * RPC method to load informations on lines
      * 
-     * @param {Array} ids of bank statement line passed to rpc call
-     * @param {Array} list of move_line ids that needs to be excluded from search
+     * @param {Array} ids ids of bank statement line passed to rpc call
+     * @param {Array} excluded_ids list of move_line ids that needs to be excluded from search
      * @returns {Deferred}
      */
     loadData: function(ids, excluded_ids) {
diff --git a/addons/portal/static/src/js/portal_chatter.js b/addons/portal/static/src/js/portal_chatter.js
index 6e1dfdafb1f5..a35a97ed09b8 100644
--- a/addons/portal/static/src/js/portal_chatter.js
+++ b/addons/portal/static/src/js/portal_chatter.js
@@ -13,9 +13,9 @@ var _t = core._t;
 /**
  * Widget PortalChatter
  *
- *  - Fetch message fron controller
- *  - Display chatter: pager, total message, composer (according to access right)
- *  - Provider API to filter displayed messages
+ * - Fetch message fron controller
+ * - Display chatter: pager, total message, composer (according to access right)
+ * - Provider API to filter displayed messages
  */
 var PortalChatter = Widget.extend({
     template: 'portal.chatter',
diff --git a/addons/web/static/src/js/chrome/control_panel.js b/addons/web/static/src/js/chrome/control_panel.js
index 8be394205d50..98ce7814b7a3 100644
--- a/addons/web/static/src/js/chrome/control_panel.js
+++ b/addons/web/static/src/js/chrome/control_panel.js
@@ -10,32 +10,32 @@ odoo.define('web.ControlPanelMixin', function (require) {
  * we get the time to refactor the control panel.
  *
  * For example, here is what a typical client action would need to do to add
- * support for a control panel with some buttons:
+ * support for a control panel with some buttons::
  *
- * var ControlPanelMixin = require('web.ControlPanelMixin');
+ *     var ControlPanelMixin = require('web.ControlPanelMixin');
  *
- * var SomeClientAction = Widget.extend(ControlPanelMixin, {
- *     ...
- *     start: function () {
- *         this._renderButtons();
- *         this._updateControlPanel();
+ *     var SomeClientAction = Widget.extend(ControlPanelMixin, {
  *         ...
- *     },
- *     do_show: function () {
- *          ...
- *          this._updateControlPanel();
- *     },
- *     _renderButtons: function () {
- *         this.$buttons = $(QWeb.render('SomeTemplate.Buttons'));
- *         this.$buttons.on('click', ...);
- *     },
- *     _updateControlPanel: function () {
- *         this.update_control_panel({
- *             breadcrumbs: this.action_manager.get_breadcrumbs(),
- *             cp_content: {
- *                $buttons: this.$buttons,
- *             },
- *      });
+ *         start: function () {
+ *             this._renderButtons();
+ *             this._updateControlPanel();
+ *             ...
+ *         },
+ *         do_show: function () {
+ *              ...
+ *              this._updateControlPanel();
+ *         },
+ *         _renderButtons: function () {
+ *             this.$buttons = $(QWeb.render('SomeTemplate.Buttons'));
+ *             this.$buttons.on('click', ...);
+ *         },
+ *         _updateControlPanel: function () {
+ *             this.update_control_panel({
+ *                 breadcrumbs: this.action_manager.get_breadcrumbs(),
+ *                 cp_content: {
+ *                    $buttons: this.$buttons,
+ *                 },
+ *          });
  */
 var ControlPanelMixin = {
     need_control_panel: true,
diff --git a/addons/web/static/src/js/core/dom.js b/addons/web/static/src/js/core/dom.js
index b39f39cab9cc..274f82bcc538 100644
--- a/addons/web/static/src/js/core/dom.js
+++ b/addons/web/static/src/js/core/dom.js
@@ -159,10 +159,8 @@ return {
     /**
      * Returns the selection range of an input or textarea
      *
-     * @param {Object} DOM item input or texteara
+     * @param {Object} node DOM item input or texteara
      * @returns {Object} range
-     * @returns {integer} range.start
-     * @returns {integer} range.end
      */
     getSelectionRange: function (node) {
         return {
@@ -174,7 +172,7 @@ return {
      * Returns the distance between a DOM element and the top-left corner of the
      * window
      *
-     * @param {Object} node DOM element (input or texteara)
+     * @param {Object} e DOM element (input or texteara)
      * @return {Object} the left and top distances in pixels
      */
     getPosition: function (e) {
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 294d7ce077ba..5c6f5d2d8514 100644
--- a/addons/web/static/src/js/views/basic/basic_model.js
+++ b/addons/web/static/src/js/views/basic/basic_model.js
@@ -198,7 +198,7 @@ var BasicModel = AbstractModel.extend({
      * behind must be applied. This function applies changes stored in
      * '_rawChanges' for a given viewType.
      *
-     * @param {string} id local resource id of a record
+     * @param {string} recordID local resource id of a record
      * @param {string} viewType the current viewType
      * @returns {Deferred<string>} resolves to the id of the record
      */
-- 
GitLab