Ox.TableList: keep self.options.selected in sync, plus some cleanup
This commit is contained in:
parent
146078e7ce
commit
f5901e4a1d
1 changed files with 4 additions and 6 deletions
|
@ -271,9 +271,10 @@ Ox.TableList = function(options, self) {
|
||||||
Ox.Log('List', 'cancel edit', data);
|
Ox.Log('List', 'cancel edit', data);
|
||||||
} else if (event == 'edit') {
|
} else if (event == 'edit') {
|
||||||
that.editCell(data.id, data.key);
|
that.editCell(data.id, data.key);
|
||||||
} else {
|
} else if (event == 'select') {
|
||||||
that.triggerEvent(event, data);
|
self.options.selected = data.ids;
|
||||||
}
|
}
|
||||||
|
that.triggerEvent(event, data);
|
||||||
})
|
})
|
||||||
.appendTo(that);
|
.appendTo(that);
|
||||||
|
|
||||||
|
@ -1011,10 +1012,7 @@ Ox.TableList = function(options, self) {
|
||||||
@*/
|
@*/
|
||||||
that.value = function(id, key, value) {
|
that.value = function(id, key, value) {
|
||||||
// fixme: make this accept id, {k: v, ...}
|
// fixme: make this accept id, {k: v, ...}
|
||||||
//Ox.Log('List', 'value', id, key, value)
|
var $cell;
|
||||||
var $cell,
|
|
||||||
$item = getItem(id);
|
|
||||||
//column = self.options.columns[getColumnIndexById(key)];
|
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
return that.$body.value(id);
|
return that.$body.value(id);
|
||||||
} else if (arguments.length == 2) {
|
} else if (arguments.length == 2) {
|
||||||
|
|
Loading…
Reference in a new issue