1
0
Fork 0
forked from 0x2620/oxjs

improve listmap editing functionality

This commit is contained in:
rolux 2011-05-24 08:15:44 +02:00
commit e80b7bd8e3
8 changed files with 105 additions and 33 deletions

View file

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