temporary update for myself
pq.tableToArray = function(tbl) {
var $tbl = $(tbl);
var colModel = [];
var data = [];
var cols = [];
var widths = [];
var $trfirst = $tbl.find("tr:first");
var $trsecond = $tbl.find("tr:eq(1)");
$trfirst.find("th,td").each(function(i, td) {
var $td = $(td);
var title = $td.html();
var width = $td.width();
var dataType = "string";
var $tdsec = $trsecond.find("td:eq(" + i + ")");
var align = $tdsec.attr("align");
var obj = {
title: title,
width: width,
dataType: dataType,
align: align,
dataIndx: i
};
colModel.push(obj);
});
$tbl.children("tbody").children("tr").each(function(i, tr) {
// ----- jk update
// $tbl.find("tr").each(function(i, tr) {
// if (i == 0) {
// return
// }
var $tr = $(tr);
var arr2 = [];
// ----- jk update
// $tr.find("td").each(function(j, td) {
$tr.children("td").each(function(j, td) {
arr2.push($.trim($(td).html()));
});
data.push(arr2);
});
return {
data: data,
colModel: colModel
}
};