1
0
Fork 0
forked from 0x2620/oxjs

url controller updates, list bugfixes

This commit is contained in:
rlx 2011-09-28 17:31:35 +00:00
commit 3965eed153
12 changed files with 98 additions and 48 deletions

View file

@ -196,7 +196,7 @@ Ox.TextList = function(options, self) {
sortable: self.options.sortable,
type: 'text',
unique: self.unique
}, Ox.extend({}, self)) // pass event handler
}, Ox.clone(self)) // pass event handler
.addClass('OxBody')
.css({
top: (self.options.columnsVisible ? 16 : 0) + 'px',
@ -222,7 +222,6 @@ Ox.TextList = function(options, self) {
//that.triggerEvent('init', data);
},
select: function() {
Ox.print('SELECT????')
self.options.selected = that.$body.options('selected');
}
})
@ -929,18 +928,19 @@ Ox.TextList = function(options, self) {
return that.$body.value(id, key);
} else {
that.$body.value(id, key, value);
//Ox.print('? ? ?', column, column.format)
if (key == self.unique) {
// unique id has changed
self.options.selected = self.options.selected.map(function(id_) {
return id_ == id ? value : id_
});
id = value;
}
$cell = getCell(id, key);
$cell && $cell.html(formatValue(key, value));
if (key == self.options.sort[0].key) {
// sort key has changed
that.$body.sort();
}
/* fixme: something like this is needed:
if (column.unique) {
that.$body.setId($item.data('id'), value);
$item.data({id: value});
}
*/
return that;
}
}