fix regressions introduced by garbage collection
This commit is contained in:
parent
1d09d19423
commit
2df5d05980
3 changed files with 11 additions and 7 deletions
|
@ -376,8 +376,10 @@ Ox.Element = function(options, self) {
|
|||
};
|
||||
|
||||
that.setElement = function($element) {
|
||||
that.$element.replaceWith(that.$element = $element);
|
||||
that.$element.data({oxid: that.id});
|
||||
//$element[0].className = that.$element[0].className;
|
||||
$element.addClass('OxElement').data({oxid: that.id});
|
||||
that.$element.replaceWith($element);
|
||||
that.$element = $element;
|
||||
that[0] = that.$element[0];
|
||||
};
|
||||
|
||||
|
|
|
@ -40,10 +40,11 @@ Ox.ListItem = function(options, self) {
|
|||
});
|
||||
if (update) {
|
||||
that.$element.hasClass('OxSelected') && $element.addClass('OxSelected');
|
||||
//that.$element.replaceWith($element);
|
||||
// that.$element.replaceWith($element);
|
||||
}
|
||||
//that.$element = $element;
|
||||
// that.$element = $element;
|
||||
that.setElement($element);
|
||||
Ox.print('LISTITEM', that.$element.data('id'))
|
||||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue