fix #833 (JS error when collapsing sidebar in timelines view)

This commit is contained in:
rlx 2012-06-13 08:37:07 +00:00
parent 8bc8c57373
commit ba5bea09f0

View file

@ -41,7 +41,7 @@ Ox.InfoList = function(options, self) {
var width = getItemWidth(); var width = getItemWidth();
$('.OxInfoElement').each(function() { $('.OxInfoElement').each(function() {
var $parent = $(this).parent(), var $parent = $(this).parent(),
id = parseInt(/OxId(.*?)$/.exec(this.className)[1]); id = parseInt(/OxId(.*?)$/.exec(this.className)[1], 10);
$parent.css({width: width - 144}); $parent.css({width: width - 144});
$parent.parent().css({width: width - 144}); $parent.parent().css({width: width - 144});
$parent.parent().parent().css({width: width - 8}); $parent.parent().parent().css({width: width - 8});
@ -149,7 +149,7 @@ Ox.InfoList = function(options, self) {
.addClass('OxInfoElement'); .addClass('OxInfoElement');
data.info.css && $element.css(data.info.css); data.info.css && $element.css(data.info.css);
data.info.events && $element.bindEvent(data.info.events); data.info.events && $element.bindEvent(data.info.events);
$element.addClass('OxId' + $element.id); // fixme: needed? $element.addClass('OxId' + $element.oxid); // fixme: needed?
$infobox.append($element); $infobox.append($element);
} }
return $item; return $item;