From 2c8868dd5320d9845ebc2cb0837c61872b583eae Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Mon, 2 May 2011 22:32:54 +0100 Subject: [PATCH] Update version number to 1.8.0.dev.2 for beta 2 development work Fix: Call fnRender only once when using using bUseRendered (don't need to call it twice since our internal data cache already has the rendered value stored) sin ce this can cause some confusion with re-writing the data source value - 4871 --- media/js/jquery.dataTables.js | 10 ++++++---- .../tests_onhold/3_ajax/aoColumns.fnRender.js | 2 +- .../tests_onhold/4_server-side/aoColumns.fnRender.js | 4 ++-- .../tests_onhold/5_ajax_objects/aoColumns.fnRender.js | 2 +- .../6_delayed_rendering/aoColumns.fnRender.js | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index d697d55e..010bb265 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -1,6 +1,6 @@ /* * File: jquery.dataTables.js - * Version: 1.8.0.beta.1 + * Version: 1.8.0.dev.2 * Description: Paginate, search and sort HTML tables * Author: Allan Jardine (www.sprymedia.co.uk) * Created: 28/3/2008 @@ -67,7 +67,7 @@ * Notes: Allowed format is a.b.c.d.e where: * a:int, b:int, c:int, d:string(dev|beta), e:int. d and e are optional */ - _oExt.sVersion = "1.8.0.beta.1"; + _oExt.sVersion = "1.8.0.dev.2"; /* * Variable: sErrMode @@ -2733,8 +2733,10 @@ var oCol = oSettings.aoColumns[i]; nTd = document.createElement('td'); - /* Render if needed */ - if ( typeof oCol.fnRender == 'function' ) + /* Render if needed - if bUseRendered is true then we already have the rendered + * value in the data source - so can just use that + */ + if ( typeof oCol.fnRender == 'function' && !oCol.bUseRendered ) { nTd.innerHTML = oCol.fnRender( { "iDataRow": iRow, diff --git a/media/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js b/media/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js index ca374e34..c60f7bd4 100755 --- a/media/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js +++ b/media/unit_testing/tests_onhold/3_ajax/aoColumns.fnRender.js @@ -22,7 +22,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Single column - fnRender is called twice for each row", null, - function () { return mTmp == 114; } + function () { return mTmp == 57; } ); oTest.fnWaitTest( diff --git a/media/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js b/media/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js index 6bc7554d..899299fe 100755 --- a/media/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js +++ b/media/unit_testing/tests_onhold/4_server-side/aoColumns.fnRender.js @@ -21,9 +21,9 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); oTest.fnWaitTest( - "Single column - fnRender is called twice for each row", + "Single column - fnRender is called once for each row", null, - function () { return mTmp == 20; } + function () { return mTmp == 10; } ); oTest.fnWaitTest( diff --git a/media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js b/media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js index cbb4f3e0..3eaa68b1 100755 --- a/media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js +++ b/media/unit_testing/tests_onhold/5_ajax_objects/aoColumns.fnRender.js @@ -25,7 +25,7 @@ $(document).ready( function () { oTest.fnWaitTest( "Single column - fnRender is called twice for each row", null, - function () { return mTmp == 114; } + function () { return mTmp == 57; } ); oTest.fnWaitTest( diff --git a/media/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js b/media/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js index 56a3db3e..c72fed81 100755 --- a/media/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js +++ b/media/unit_testing/tests_onhold/6_delayed_rendering/aoColumns.fnRender.js @@ -21,9 +21,9 @@ $(document).ready( function () { var oSettings = oTable.fnSettings(); oTest.fnWaitTest( - "Single column - fnRender is called once for each row, plus once for the node draw", + "Single column - fnRender is called once for each row", null, - function () { return mTmp == 67; } + function () { return mTmp == 57; } ); oTest.fnWaitTest(