summaryrefslogtreecommitdiff
path: root/addons/website_rating/static/src/js
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-09-18 10:03:51 +0200
committerGéry Debongnie <ged@odoo.com>2017-09-18 11:54:39 +0200
commitf1a85ba70a2412fb0d7bf789a758d8f2d2e86a02 (patch)
treee6e8d2142a12d75c8943b07c192f88ecd3ddf527 /addons/website_rating/static/src/js
parent313f69e9487e991e4db33c75682342b185da5c73 (diff)
[FIX] *: fix a bunch of incorrectly documented docstring
Fix a bunch of ill-documented/incomplete/incorrect method docs Without this, the automatic doc generation does not work.
Diffstat (limited to 'addons/website_rating/static/src/js')
-rw-r--r--addons/website_rating/static/src/js/website_mail.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/addons/website_rating/static/src/js/website_mail.js b/addons/website_rating/static/src/js/website_mail.js
index d672af6788d..4f22fe60eea 100644
--- a/addons/website_rating/static/src/js/website_mail.js
+++ b/addons/website_rating/static/src/js/website_mail.js
@@ -87,7 +87,7 @@ odoo.define('website_rating.thread', function(require) {
/**
* Update the messages format
*
- * @param {Array<Object>}
+ * @param {Array<Object>} messages
* @returns {Array}
*/
preprocessMessages: function(messages){
@@ -102,17 +102,20 @@ odoo.define('website_rating.thread', function(require) {
},
/**
* Round the given value with a precision of 0.5.
- * Example : 1.2 --> 1.0
- * 1.7 --> 1.5
- * 1.9 --> 2.0
- * @param Float
- * @returns Float
+ *
+ * Examples:
+ * - 1.2 --> 1.0
+ * - 1.7 --> 1.5
+ * - 1.9 --> 2.0
+ *
+ * @param {Number} value
+ * @returns Number
**/
round_to_half: function(value) {
var converted = parseFloat(value); // Make sure we have a number
var decimal = (converted - parseInt(converted, 10));
decimal = Math.round(decimal * 10);
- if(decimal == 5){
+ if(decimal === 5){
return (parseInt(converted, 10)+0.5);
}
if((decimal < 3) || (decimal > 7)){