Fix colspan computation

This commit is contained in:
Cédric Krier committed 2013-02-05 15:51:38 +01:00
1 parent 3b50ea5d44
commit 7a1fe6775d
1 file changed
+5 -2
+5 -2
View File
@@ -638,8 +638,11 @@
},
add: function(colspan, widget) {
if (colspan === undefined) colspan = 1;
var len = 0;
var row = this.row();
var len = row.children().length;
row.children().map(function(i, e) {
len += Number(jQuery(e).attr('colspan') || 1);
});
if (len + colspan > this.col) {
this.add_row();
row = this.row();
@@ -649,7 +652,7 @@
el = widget.el;
}
var cell = row.append(jQuery('<td/>', {
colspan: colspan
'colspan': colspan
}).append(el));
}
});