[IMP] add some documentation to openerp.base.ListView.List

bzr revid: xmo@openerp.com-20110509065457-idl2j16krsyyb0du
This commit is contained in:
Xavier Morel 2011-05-09 08:54:57 +02:00
parent 0c08f61d13
commit 27c57ef671
1 changed files with 23 additions and 2 deletions

View File

@ -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?
});