From 27c57ef671b3553542be164fdd39570a4ae5f890 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 9 May 2011 08:54:57 +0200 Subject: [PATCH] [IMP] add some documentation to openerp.base.ListView.List bzr revid: xmo@openerp.com-20110509065457-idl2j16krsyyb0du --- addons/base/static/src/js/list.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/addons/base/static/src/js/list.js b/addons/base/static/src/js/list.js index c3b433c943b..467b9c5cde1 100644 --- a/addons/base/static/src/js/list.js +++ b/addons/base/static/src/js/list.js @@ -383,7 +383,28 @@ openerp.base.ListView = openerp.base.Controller.extend( }); _.extend(openerp.base.ListView.prototype, openerp.base.ActionExecutor); -openerp.base.ListView.List = Class.extend({ +openerp.base.ListView.List = Class.extend( + /** @lends openerp.base.ListView.List# */{ + /** + * List display for the ListView, handles basic DOM events and transforms + * them in the relevant higher-level events, to which the list view (or + * other consumers) can subscribe. + * + * Events on this object are registered via jQuery. + * + * Available events: + * + * `selected` + * Triggered when a row is selected (using check boxes), provides an + * array of ids of all the selected records. + * + * `deleted` + * Triggered when deletion buttons are hit, provide an array of ids of + * all the records being marked for suppression. + * + * @constructs + * @param {Object} opts display options, identical to those of :js:class:`openerp.base.ListView` + */ init: function (opts) { var self = this; // columns, rows, options @@ -453,7 +474,7 @@ openerp.base.ListView.List = Class.extend({ row_id: function (row) { return this.rows[this.row_position(row)].data.id.value; } - // Click events: action, delete, row itself + // Click events: action, row itself // drag and drop // editable? });