Ox.TableList: keep self.options.selected in sync, plus some cleanup

This commit is contained in:
rlx 2012-06-30 15:03:43 +00:00
parent 146078e7ce
commit f5901e4a1d

View file

@ -271,9 +271,10 @@ Ox.TableList = function(options, self) {
Ox.Log('List', 'cancel edit', data);
} else if (event == 'edit') {
that.editCell(data.id, data.key);
} else {
that.triggerEvent(event, data);
} else if (event == 'select') {
self.options.selected = data.ids;
}
that.triggerEvent(event, data);
})
.appendTo(that);
@ -1011,10 +1012,7 @@ Ox.TableList = function(options, self) {
@*/
that.value = function(id, key, value) {
// fixme: make this accept id, {k: v, ...}
//Ox.Log('List', 'value', id, key, value)
var $cell,
$item = getItem(id);
//column = self.options.columns[getColumnIndexById(key)];
var $cell;
if (arguments.length == 1) {
return that.$body.value(id);
} else if (arguments.length == 2) {