1
0
Fork 0
forked from 0x2620/oxjs

fix regressions introduced by garbage collection

This commit is contained in:
rlx 2011-11-05 11:44:31 +00:00
commit 2df5d05980
3 changed files with 11 additions and 7 deletions

View file

@ -588,7 +588,7 @@ Ox.TextList = function(options, self) {
function getCell(id, key) {
Ox.Log('List', 'getCell', id, key)
var $item = getItem(id);
key = key || '';
key = key || ''; // fixme: what is this?
return $($item.find('.OxCell.OxColumn' + Ox.toTitleCase(key))[0]);
}
@ -611,7 +611,7 @@ Ox.TextList = function(options, self) {
function getItem(id) {
//Ox.Log('List', 'getItem', id)
var $item = null;
that.find('.OxItem').each(function() {
that.$element.find('.OxItem').each(function() {
$this = $(this);
if ($this.data('id') == id) {
$item = $this;
@ -737,12 +737,13 @@ Ox.TextList = function(options, self) {
that.$element.find('.OxCell.OxColumn' + Ox.toTitleCase(self.options.columns[i].id)).css({
width: width - (self.options.columnsVisible ? 9 : 8) + 'px'
});
Ox.Log('??? resize column')
setWidth();
}
function setWidth() {
var width = getItemWidth();
that.$body.$content.find('.OxItem').css({ // fixme: can we avoid this lookup?
that.$body.$content.$element.find('.OxItem').css({ // fixme: can we avoid this lookup?
width: width + 'px'
});
that.$body.$content.css({