summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome
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/web/static/src/js/chrome
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/web/static/src/js/chrome')
-rw-r--r--addons/web/static/src/js/chrome/abstract_web_client.js11
-rw-r--r--addons/web/static/src/js/chrome/action_manager.js14
-rw-r--r--addons/web/static/src/js/chrome/search_filters.js44
-rw-r--r--addons/web/static/src/js/chrome/search_view.js6
-rw-r--r--addons/web/static/src/js/chrome/view_manager.js5
5 files changed, 41 insertions, 39 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 2a5bb5310ce..8492adc33f6 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -206,16 +206,17 @@ var AbstractWebClient = Widget.extend(mixins.ServiceProvider, {
// Window title handling
// --------------------------------------------------------------
/**
- Sets the first part of the title of the window, dedicated to the current action.
+ * Sets the first part of the title of the window, dedicated to the current action.
*/
set_title: function (title) {
this.set_title_part("action", title);
},
/**
- Sets an arbitrary part of the title of the window. Title parts are identified by strings. Each time
- a title part is changed, all parts are gathered, ordered by alphabetical order and displayed in the
- title of the window separated by '-'.
- */
+ * Sets an arbitrary part of the title of the window. Title parts are
+ * identified by strings. Each time a title part is changed, all parts
+ * are gathered, ordered by alphabetical order and displayed in the title
+ * of the window separated by ``-``.
+ */
set_title_part: function (part, title) {
var tmp = _.clone(this.get("title_part"));
tmp[part] = title;
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js
index 131a31ad776..e18a3d60734 100644
--- a/addons/web/static/src/js/chrome/action_manager.js
+++ b/addons/web/static/src/js/chrome/action_manager.js
@@ -67,7 +67,7 @@ var Action = core.Class.extend({
},
/**
* Stores the DOM fragment of the action
- * @param {jQuery} [fragment] the DOM fragment
+ * @param {jQuery} [$fragment] the DOM fragment
*/
set_fragment: function($fragment) {
this.$fragment = $fragment;
@@ -300,11 +300,11 @@ var ActionManager = Widget.extend({
/**
* Add a new action to the action manager
*
- * widget: typically, widgets added are openerp.web.ViewManager. The action manager
- * uses the stack of actions to handle the breadcrumbs.
- * action_descr: new action description
- * options.on_reverse_breadcrumb: will be called when breadcrumb is clicked on
- * options.clear_breadcrumbs: boolean, if true, action stack is destroyed
+ * @param {Widget} widget typically, widgets added are openerp.web.ViewManager. The action manager uses the stack of actions to handle the breadcrumbs.
+ * @param {Object} action_descr new action description
+ * @param {Object} options
+ * @param options.on_reverse_breadcrumb will be called when breadcrumb is clicked on
+ * @param options.clear_breadcrumbs: boolean, if true, action stack is destroyed
*/
push_action: function(widget, action_descr, options) {
var self = this;
@@ -613,7 +613,7 @@ var ActionManager = Widget.extend({
/**
* Execute an OpenERP action
*
- * @param {Number|String|String|Object} Can be either an action id, an action XML id, a client action tag or an action descriptor.
+ * @param {Number|String|String|Object} action Can be either an action id, an action XML id, a client action tag or an action descriptor.
* @param {Object} [options]
* @param {Boolean} [options.clear_breadcrumbs=false] Clear the breadcrumbs history list
* @param {Boolean} [options.replace_breadcrumb=false] Replace the current breadcrumb with the action
diff --git a/addons/web/static/src/js/chrome/search_filters.js b/addons/web/static/src/js/chrome/search_filters.js
index a0e3c1c077f..b9cf1b0fce9 100644
--- a/addons/web/static/src/js/chrome/search_filters.js
+++ b/addons/web/static/src/js/chrome/search_filters.js
@@ -96,7 +96,7 @@ var ExtendedSearchProposition = Widget.extend(/** @lends instance.web.search.Ext
},
});
-ExtendedSearchProposition.Field = Widget.extend({
+var Field = Widget.extend({
init: function (parent, field) {
this._super(parent);
this.field = field;
@@ -153,7 +153,7 @@ ExtendedSearchProposition.Field = Widget.extend({
}
});
-ExtendedSearchProposition.Char = ExtendedSearchProposition.Field.extend({
+var Char = Field.extend({
tagName: 'input',
className: 'o_input',
attributes: {
@@ -172,7 +172,7 @@ ExtendedSearchProposition.Char = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.DateTime = ExtendedSearchProposition.Field.extend({
+var DateTime = Field.extend({
tagName: 'span',
attributes: {
type: 'datetime'
@@ -241,7 +241,7 @@ ExtendedSearchProposition.DateTime = ExtendedSearchProposition.Field.extend({
},
});
-ExtendedSearchProposition.Date = ExtendedSearchProposition.DateTime.extend({
+var Date = DateTime.extend({
attributes: {
type: 'date'
},
@@ -250,7 +250,7 @@ ExtendedSearchProposition.Date = ExtendedSearchProposition.DateTime.extend({
},
});
-ExtendedSearchProposition.Integer = ExtendedSearchProposition.Field.extend({
+var Integer = Field.extend({
tagName: 'input',
className: 'o_input',
attributes: {
@@ -280,11 +280,11 @@ ExtendedSearchProposition.Integer = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.Id = ExtendedSearchProposition.Integer.extend({
+var Id = Integer.extend({
operators: [{value: "=", text: _lt("is")}]
});
-ExtendedSearchProposition.Float = ExtendedSearchProposition.Field.extend({
+var Float = Field.extend({
template: 'SearchView.extended_search.proposition.float',
operators: [
{value: "=", text: _lt("is equal to")},
@@ -313,7 +313,7 @@ ExtendedSearchProposition.Float = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.Selection = ExtendedSearchProposition.Field.extend({
+var Selection = Field.extend({
template: 'SearchView.extended_search.proposition.selection',
operators: [
{value: "=", text: _lt("is")},
@@ -331,7 +331,7 @@ ExtendedSearchProposition.Selection = ExtendedSearchProposition.Field.extend({
}
});
-ExtendedSearchProposition.Boolean = ExtendedSearchProposition.Field.extend({
+var Boolean = Field.extend({
tagName: 'span',
operators: [
{value: "=", text: _lt("is true")},
@@ -347,19 +347,19 @@ ExtendedSearchProposition.Boolean = ExtendedSearchProposition.Field.extend({
});
core.search_filters_registry
- .add('char', ExtendedSearchProposition.Char)
- .add('text', ExtendedSearchProposition.Char)
- .add('one2many', ExtendedSearchProposition.Char)
- .add('many2one', ExtendedSearchProposition.Char)
- .add('many2many', ExtendedSearchProposition.Char)
- .add('datetime', ExtendedSearchProposition.DateTime)
- .add('date', ExtendedSearchProposition.Date)
- .add('integer', ExtendedSearchProposition.Integer)
- .add('float', ExtendedSearchProposition.Float)
- .add('monetary', ExtendedSearchProposition.Float)
- .add('boolean', ExtendedSearchProposition.Boolean)
- .add('selection', ExtendedSearchProposition.Selection)
- .add('id', ExtendedSearchProposition.Id);
+ .add('char', Char)
+ .add('text', Char)
+ .add('one2many', Char)
+ .add('many2one', Char)
+ .add('many2many', Char)
+ .add('datetime', DateTime)
+ .add('date', Date)
+ .add('integer', Integer)
+ .add('float', Float)
+ .add('monetary', Float)
+ .add('boolean', Boolean)
+ .add('selection', Selection)
+ .add('id', Id);
return {
ExtendedSearchProposition: ExtendedSearchProposition
diff --git a/addons/web/static/src/js/chrome/search_view.js b/addons/web/static/src/js/chrome/search_view.js
index 630183d89ff..d8d02ac9a41 100644
--- a/addons/web/static/src/js/chrome/search_view.js
+++ b/addons/web/static/src/js/chrome/search_view.js
@@ -265,7 +265,7 @@ var SearchView = Widget.extend({
*
* @param parent
* @param dataset
- * @param fields_view
+ * @param fvg
* @param {Object} [options]
* @param {Boolean} [options.hidden=false] hide the search view
* @param {Boolean} [options.disable_custom_filters=false] do not load custom filters from ir.filters
@@ -499,8 +499,8 @@ var SearchView = Widget.extend({
.$el.focus();
},
/**
- * @param {openerp.web.search.SearchQuery | undefined} Undefined if event is change
- * @param {openerp.web.search.Facet}
+ * @param {openerp.web.search.SearchQuery | undefined} collection Undefined if event is change
+ * @param {openerp.web.search.Facet} model
* @param {Object} [options]
*/
renderFacets: function (collection, model, options) {
diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js
index 8f62ff101f7..03eb2da27d8 100644
--- a/addons/web/static/src/js/chrome/view_manager.js
+++ b/addons/web/static/src/js/chrome/view_manager.js
@@ -232,8 +232,9 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
},
/**
* Returns the default view with the following fallbacks:
- * - use the default_view defined in the flags, if any
- * - use the first view in the view_order
+ *
+ * - use the default_view defined in the flags, if any
+ * - use the first view in the view_order
*
* @returns {Object} the default view
*/