From f5901e4a1d9a550e9c44cf6f1f63e470cffb7eed Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sat, 30 Jun 2012 15:03:43 +0000 Subject: [PATCH] Ox.TableList: keep self.options.selected in sync, plus some cleanup --- source/Ox.UI/js/List/TableList.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/Ox.UI/js/List/TableList.js b/source/Ox.UI/js/List/TableList.js index e2450cc7..623b90e1 100644 --- a/source/Ox.UI/js/List/TableList.js +++ b/source/Ox.UI/js/List/TableList.js @@ -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) {