From 82f4a55191ed10f901ae1b9e74004664cc6752bd Mon Sep 17 00:00:00 2001 From: gknights Date: Fri, 30 Aug 2013 16:26:06 +0100 Subject: [PATCH] Add row as parameter to the format function calls #367 The JQuery object for the row is passed to the format functions as 5th argument. --- js/jquery.tablesorter.widgets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.tablesorter.widgets.js b/js/jquery.tablesorter.widgets.js index 6c6d1278..42825de1 100644 --- a/js/jquery.tablesorter.widgets.js +++ b/js/jquery.tablesorter.widgets.js @@ -452,10 +452,10 @@ ts.addWidget({ ff = ($ths.filter('[data-column="' + i + '"]:last').hasClass('filter-match')) ? xi.search(val) >= 0 : v[i] === x; } else if (typeof wo.filter_functions[i] === 'function'){ // filter callback( exact cell content, parser normalized content, filter input value, column index ) - ff = wo.filter_functions[i](x, c.cache[k].normalized[j][i], v[i], i); + ff = wo.filter_functions[i](x, c.cache[k].normalized[j][i], v[i], i, $tr.eq(j)); } else if (typeof wo.filter_functions[i][v[i]] === 'function'){ // selector option function - ff = wo.filter_functions[i][v[i]](x, c.cache[k].normalized[j][i], v[i], i); + ff = wo.filter_functions[i][v[i]](x, c.cache[k].normalized[j][i], v[i], i, $tr.eq(j)); } // Look for regex } else if (wo.filter_regex.regex.test(val)){