mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: save raw table cell data
This commit is contained in:
parent
9ff5a2ef5f
commit
fec49e144a
@ -5301,7 +5301,7 @@ var config = $('#mytable').data('tablesorter');
|
|||||||
<tr id="variable-cache">
|
<tr id="variable-cache">
|
||||||
<td><a href="#" class="permalink">config.cache</a></td>
|
<td><a href="#" class="permalink">config.cache</a></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
<td>Internal list of table contents (<span class="version">v2.0.18</span>; <span class="version updated">v2.16.0</span> )
|
<td>Internal list of table contents (<span class="version">v2.0.18</span>; <span class="version updated">v2.19.1</span> )
|
||||||
<div class="collapsible">
|
<div class="collapsible">
|
||||||
<br>
|
<br>
|
||||||
This object contains the following:<br>
|
This object contains the following:<br>
|
||||||
@ -5331,6 +5331,8 @@ $('.tablesorter')[0].config.cache[0].normalized[0];
|
|||||||
/* result: ["a1", "bruce", "almighty", 45, 153.19, 44.7, 77, 979830720000, {
|
/* result: ["a1", "bruce", "almighty", 45, 153.19, 44.7, 77, 979830720000, {
|
||||||
$row : jQuery.fn.jQuery.init[1], // row (jQuery object)
|
$row : jQuery.fn.jQuery.init[1], // row (jQuery object)
|
||||||
child : [], // child row raw html, if any
|
child : [], // child row raw html, if any
|
||||||
|
// raw unparsed data from the table cells - added v2.19.1
|
||||||
|
raw : ["A1", "Bruce", "Almighty", "45", "$153.19", "44.7%", "+77", "Jan 18, 2001 9:12 AM"],
|
||||||
order : 3 // original row index (unsorted)
|
order : 3 // original row index (unsorted)
|
||||||
}]
|
}]
|
||||||
*/</pre>
|
*/</pre>
|
||||||
|
@ -326,7 +326,8 @@
|
|||||||
rowData = {
|
rowData = {
|
||||||
// order: original row order #
|
// order: original row order #
|
||||||
// $row : jQuery Object[]
|
// $row : jQuery Object[]
|
||||||
child: [] // child row text (filter widget)
|
child: [], // child row text (filter widget)
|
||||||
|
raw: [] // original row text
|
||||||
};
|
};
|
||||||
/** Add the table data to main data array */
|
/** Add the table data to main data array */
|
||||||
$row = $($tb[k].rows[i]);
|
$row = $($tb[k].rows[i]);
|
||||||
@ -356,6 +357,7 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
t = getElementText(table, $row[0].cells[j], j);
|
t = getElementText(table, $row[0].cells[j], j);
|
||||||
|
rowData.raw.push(t); // save original row text
|
||||||
// do extract before parsing if there is one
|
// do extract before parsing if there is one
|
||||||
if (typeof extractors[j].id === 'undefined') {
|
if (typeof extractors[j].id === 'undefined') {
|
||||||
tx = t;
|
tx = t;
|
||||||
|
Loading…
Reference in New Issue
Block a user