Skip to content
Commits on Sep 8, 2015
Commits on Aug 12, 2015
Commits on May 1, 2014
  1. Test file

Commits on Feb 16, 2013
Commits on Feb 10, 2013
  1. New: `ajax` parameter to control all aspects of Ajax that DataTables …

    - DataTables 1.9 had 5 different parameters that controlled how Ajax
      data was obtained, which with its own naming properties, often mapping
      to the jQuery.ajax methods, or otherwise extending them. To hugely
      simply and extend the Ajax functionality DataTables has, these five
      parameters have now been deprecated and the funtionality provided by
      them merged into the new `ajax` parameter.
    - Deprecated properties:
       - sAjaxSource
       - fnServerData
       - sAjaxDataProp
       - sServerMethod
       - fnServerParams
    - Note that these parameters are still fully supported and can be used,
      but for new projects, `ajax` should be used as they will eventually be
      removed (likely DataTables v2 whenever that is, as they are too widely
      used to be removed in v1.x).
    - Added additional / missing tests for the deprecated properties to
      ensure full backwards compatiblity
    - The new `ajax` property is fully documented in the doc comments, but
      as a summary it can take three forms:
       - string - the url to get the data from (i.e. this is the new
       - object - maps directly to jQuery.ajax, allowing full control of the
         Ajax call (provides the abilities of fnServerParams, sServerMethod,
       - function - a function so you can get the data your own way
         (provides the abilities of fnServerData)
    - Added unit tests for the new `ajax` property and doc comment examples
      updated to use this property exclusively.
Commits on Oct 31, 2012
  1. Tests: With the change for the state saving into localStorage we need…

    … to update the state destroy in the unit tests
Commits on Oct 19, 2012
  1. Fix - core: Stripe removal was broken - it was stripping the classes …

    …from only the first row rows, rather than all of them, which was wrong. This was unfortunatly introduced in 1.9.4 and there weren't any unit tests to catch it. There are now, and I've rewritten the code that wil remove existing stripe classes. Its now much smaller and should be a little faster. Now it only checks the first row to see if it has any exisiting stripe classes, which is good enough. The smallest this could could be would be a simple removeClass, but that may result in significant overhead which really isn't needed in cases where there are no exisiting stripe classes.
Commits on Sep 29, 2012
  1. Update: Significant update to how sorting is applied internally in Da…

    …taTables - there is no difference to how the sort is actually done, with the single exception that the -asc and -desc are not depricated in favour of the -pre method only.
    - With the introduction of the -pre method in DataTables 1.9, the -asc and -desc sorting functions became more or less redundant since they are simple comparisons (all of the complexity is now in the -pre formatting function). As such the call to the -asc / -desc method is overhead that really isn't needed, and this commit introduces a sort function that doesn't call the -asc / -desc methods, instead just doing the comparison itself. In tests, this relatively simple change leads to a performance improvement of around 15% in all browsers (it also has the side benefit of less operations, so IE8- will be able to sort larger tables before flagging up a slow script warning).
    - We can't just remove the sorting method which will call -asc / -desc though since not all sorting plug-ins will have a -pre method. Therefore, for backwards compatiblity the old sort function (albeit updated for the changed variables) is retained. The backwards compatibality code adds around 300 bytes to the library, but this is an unaccounced change, so backwards compatiblity must be retained.
    - The old sort method will be removed in v1.11. The -asc and -desc methods are now fully depricated.
    - Altered the sorting method to flatten the aaSorting array since the introduction of aDataSort in v1.9 required an extra loop in several locations. The functionality is very useful, but the extra loop can be a bit messy and slightly hit performance, so it is now flattened to be a single array (with object information so it makes sense, rather htan array indexes!).
    - Altered the order of sorting when building _aSortData since it was looking up the same variable smultiple times which really wasn't needed.
    This is part of a small incremental changes plan for DataTables! There are still a huge number of things to improve in this area, but this is a nice clean up and a nice 15% sorting performance improvement to get us started :-).
Commits on Aug 8, 2012
  1. Dev fix: In the update to the search array building methods I neglegt…

    …ed to strip \n\r from all rows (only HMTL rows were being stripped) - this is required for searching to work as expected. Picked up by the unit tests.
  2. Fix #39 - null values should also be considered like undefined values…

    … when working with nested data and have properties created as needed.
Commits on Jun 29, 2012
  1. Update: Unit test updated for the mData name change from mDataProp. N…

    …ote that a number of tests to test the backwards compability of mDataProp!
  2. Updated: mDataProp syntax now has the ability to accept array syntax …

    …(for example "access[].name" would get an array of the 'name' properties from the access property of the data source). This is exceptionally useful for manipulating arrays - however, you are very _strongly_ advised not to use in in mDataProp itself, since when setting arrays, you will overwrite the old array (thus destroying any other properties that it already has!). Instead, see the new mRender property if you want to make use of this syntax for drawing the table.
Commits on Apr 13, 2012
  1. Fix unit tests: Witht he change to allow info macros in any of the st…

    …rings the unit tests need updating to reflect this
  2. Fix - unit test: Async behaviour could cause test to fail since the i…

    …nit might not have been complete (amazing that it was passing all this time - faster computers and faster JS engines now causing it to fail!)
Commits on Feb 17, 2012
  1. Fix: When sorting non-string data as a string (type to type detection…

    …) then DataTables 1.9 would automatically convert the non-string data to an empty string so it can be sorted. This can result in unexpected ordering in the table. The fix is to check for a toString() function that is available for the data and if it is there, then use it (great for numeric data, dates etc), otherwise the empty string is used (null, methods without toString). This brings 1.9 back into line with how 1.8 behaved - 8549
Commits on Feb 6, 2012
  1. Fix: x-scrolling to the end of a table would cause the header and the…

    … columns to go out of alignment due to the header not being able to scroll as far as was needed (this was caused by the changes in 876a75f) - 8332.
    Fix: Table could conitnually expand when x-scrolling was enabled. This was partly addressed in 6776, but the fix was incomplete as it would still occur on Safari Mac (possibly other browsers as well). This fix is very closely related to 8332 (hence commiting together as they are interdependent). Now use padding right on the header/footer wrapper to provide the overflow scroll ability, but only add it when a scrollbar is present - otherwise the width gets added on and we get the forever expanding table.
    Dev: Unit tests - New tests for scrolling to ensure 6776 and 8332 don't occur again
Commits on Feb 1, 2012
  1. Fix: When mDataProp was used to get a nested object, but a parent obj…

    …ect didn't exist it would throw an unrecoverable error. With this change the behaviour matches that of single level data whereby if data cannot be found, at any level, then undefined is returned from the data get object. This means that if sDefaultContent is defined then that will be used instead, and if not defined an error will still be given (although this one under DataTables' control).
    Dev: Removed the "fast lookup" function for data get and set as they weren't really that useful in terms of speed and would require more code to be added to copy with the above change to the error handling for missing objects. Smaller code and virtually no difference in speed. Sold.
Commits on Dec 28, 2011
  1. New: Add unit tests for fnCreatedCell and fnCreatedRow

    New: New init option fnCreatedRow - very similar to fnCreatedCell but in this case used for TR elements
    Updated: fnCreatedCell now also gets the column index passed in
Commits on Dec 27, 2011
  1. Dev update: Remove the 'row' event. On experimenting with CellCreated…

    … I've found that I'm getting around 4'500 triggers / sec with Safari 5.1, which really isn't close to fast enough (about two orders of magnitude out from what I would like) which means that a table with 2000 rows and 9 columns would see an additional overhead of about 4 seconds on initialisation - ouch!!! As such I've removed the 'row' event here and it would seriously impact larger tables. events are still extremely useful, however, I would suggest that plug-ins should use the callback arrays rather than events since it is much faster. These arrays might be developed further into DataTables' own triggering methods in future. Something to to be aware of certainly going into 1.10.
Commits on Dec 14, 2011
  1. Tidy up use of typeof and undefined in DataTables - the main goal is …

    …to reduce code size under 70K here, but its a good opertunity to get this area sorted out. Note that the unit test update for fnInitComplete is because 'json' is now always passed through, although it will be undefined in anything but Ajax sourced client-side processing.
Commits on Dec 7, 2011
  1. New: Use localeCompare to do string comparison, allowing much better …

    …internationlisation support for sorting strings in DataTables
Commits on Dec 6, 2011
  1. Update unit tests to take account of the change to the pagination ele…

    …ments now being A tags, rather than SPANs/DIVs. Good that the change broke the unit tests since it is backwards incompatible
Commits on Dec 4, 2011
  1. Unit tests were using asStripClasses which was an old legacy typo... …

    …It should be asStripeClasses and I've removed the alias in 1.9, thus the unit tests need to be updated.
Commits on Dec 3, 2011
Commits on Nov 7, 2011
  1. @mbp

    Fix typo 'destory' -> 'destroy'.

    mbp committed
Commits on Sep 10, 2011
Commits on Sep 9, 2011
  1. Fix: HTML column type could sometimes be overridden by the string sor…

    …ting type. If a cell was found to have just a string and no HTML in it then the whole column would be treated as a string column, even if other cells had HTML. Now put a check in place to ensure that string can't overrule html type. Unit test added.
Commits on Jun 29, 2011
  1. Fix: When filtering is applied to a table which has y-scrolling, and …

    …the filter was sufficient to make the scrolling disappear, the table width would increase by the scrollbar width. This was of course incorrect and the result of a change for 1.8.1 - we need to test is the scrollbar is present or not for the fix to be correct, which it now does. Unit test added.
    Fix: As with the fix in 1.8.1 for the x-scrolling appearing when disabled the footer needs the same consideration as the header, otherwise it can be cut off visually.
Commits on Jun 25, 2011
  1. Dev fix: fnDestry wasn't reapplying original with correctly due to a …

    …mistake in an earlier commit - picked up by unit tests
Commits on Jun 21, 2011
  1. Fix: The ability to use complex data structures in 1.8 means that arr…

    …ays which are passed into to fnUpdate need not strictly be the same length as the number of columns in the table - therefore the warning that is given if you do this is wrong... no other code changes needed - just no need to generate the warning! Unit test added - 5396
Something went wrong with that request. Please try again.