From 39df74eb2c79bf31813740f66d365ce13a3404d4 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Tue, 15 Jul 2014 11:33:25 +0100 Subject: [PATCH] Fix: `dt-init createdCell` cellData prarameter now passes in the original data for the cell * This reverts the last commit which documented the old behaviour. Thinking again about it, if you want to modify the rendered data use `$(cell).html()`. --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 2 +- media/js/jquery.dataTables.min.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index facfe55a..c79b3912 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -c7226999b07adfef09527d7f9235e808b17b5c2c +c444c66d749cdfde6a15d29a34c7b2126d3c0cc1 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 6b16e68a..cba4c36f 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -1631,7 +1631,7 @@ if ( oCol.fnCreatedCell ) { oCol.fnCreatedCell.call( oSettings.oInstance, - nTd, _fnGetCellData( oSettings, iRow, i, 'display' ), rowData, iRow, i + nTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i ); } } diff --git a/media/js/jquery.dataTables.min.js b/media/js/jquery.dataTables.min.js index e45b5056..c77e3662 100644 --- a/media/js/jquery.dataTables.min.js +++ b/media/js/jquery.dataTables.min.js @@ -18,9 +18,9 @@ if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){ a[e[i]]||a[e[i]]===l)a[e[i]]={};a=a[e[i]]}if(f.match(Q))a[f.replace(Q,"")](d);else a[f.replace($,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ha(a){return C(a.aoData,"_aData")}function ja(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0}function ka(a,b,c){for(var d=-1,e=0,f=a.length;eb&&a[e]--; -1!=d&&c===l&&a.splice(d,1)}function la(a,b,c,d){var e=a.aoData[b],f;if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData= ia(a,e).data;else{var g=e.anCells,j;if(g){c=0;for(f=g.length;c").appendTo(g));b=0;for(c=m.length;btr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(o.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(o.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b").appendTo(g));b=0;for(c=m.length;btr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(o.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(o.sFooterTH);if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=-1);var g=a._iDisplayStart,o=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,B(a,!1);else if(j){if(!a.bDestroying&&!jb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:o;for(j=j?0:g;j",{"class":e?d[0]:""}).append(h("",{valign:"top",colSpan:Z(a),"class":a.oClasses.sRowEmpty}).html(c))[0];u(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ha(a),g,o,i]);u(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],