forked from 0x2620/oxjs
improve listmap editing functionality
This commit is contained in:
parent
2996bc9e8b
commit
e80b7bd8e3
8 changed files with 105 additions and 33 deletions
|
|
@ -627,7 +627,6 @@ Ox.TextList = function(options, self) {
|
|||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'items') {
|
||||
//alert('request set!!')
|
||||
that.$body.options(key, value);
|
||||
} else if (key == 'paste') {
|
||||
that.$body.options(key, value);
|
||||
|
|
@ -744,8 +743,9 @@ Ox.TextList = function(options, self) {
|
|||
|
||||
that.value = function(id, key, value) {
|
||||
// fixme: make this accept id, {k: v, ...}
|
||||
Ox.print('value', id, key, value)
|
||||
var $item = getItem(id),
|
||||
//$cell = getCell(id, key),
|
||||
$cell = getCell(id, key),
|
||||
column = self.options.columns[getColumnIndexById(key)];
|
||||
if (arguments.length == 1) {
|
||||
return that.$body.value(id);
|
||||
|
|
@ -753,8 +753,8 @@ Ox.TextList = function(options, self) {
|
|||
return that.$body.value(id, key);
|
||||
} else {
|
||||
that.$body.value(id, key, value);
|
||||
$cell && $cell.html(column.format ? column.format(value) : value);
|
||||
/*
|
||||
$cell && $cell.html(column.format ? column.format(value) : value);
|
||||
if (column.unique) {
|
||||
that.$body.setId($item.data('id'), value);
|
||||
$item.data({id: value});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue