1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-30 12:24:10 +01:00
Commit Graph

33 Commits

Author SHA1 Message Date
Allan Jardine
bb5bb1c37f Fix: Modify unit tests for all warnings enabled in PHP and remove depricated function calls 2011-03-01 21:45:57 +00:00
Allan Jardine
ede9f77de8 Updated: Reliability of unit tests in non-webkit browsers 2010-12-15 21:22:22 +00:00
Allan Jardine
65b7c9b1e6 Performance: Re-written the sorting implementation so it doesn't use either eval() of $.inArray(). inArray was found to have a serious negative effect on IE which counts operations to give the 'script is running slow' error message - the new implemention uses a value / key reverse mapping to make the look up as fast as a single object parameter retreival. Furthermore, I've done some optimisation and feature completeness work on the non-eval version of the sorting (previously the AIR sorting method) and I've found this to be at least as good (faster in some cases) than the old eval() sort, so this is now the default and only sorting method DataTables provides - 2922 2010-11-28 14:42:38 +00:00
Allan Jardine
d141d8370a Fixed: The behaviour for complex headers has been altered slightly for complex headers in that only the first of non-unique TH elements will be click to sort-able. Unit test update needed as this is different behaviour from before when all elements belonging to a column were click to sort. 2010-11-17 08:25:54 +00:00
Allan Jardine
612070b2d7 Update: Slightly modification to timing for unit tests to be more flexible 2010-10-30 08:01:28 +01:00
Allan Jardine
4e11bf9e9c Fixed: Unit tests could fail due to interaction between state saving cookies. Now when tests which state save end, they must call fnCookieDestroy. 2010-10-17 07:43:17 +01:00
Allan Jardine
a2d7a32b2f Fixed: Sorting disabled classes were not being correctly applied if sorting was disabled. This was particularly obvious with jQuery UI theming - 3064 2010-10-16 10:59:21 +01:00
Allan Jardine
d41c572798 Updated: Optimisation on fnDeleteRow to simply remove the search array entry, rather than rebuilding the whole array, also on fnUpdate to only rebuild the single row, rather than the entire thing, and finally fnAddData - allow the redraw to update the search array. 2010-10-16 10:06:49 +01:00
Allan Jardine
44bf320ac8 Fixed: Now restore the width of the original table on fnDestory. This is needed for when using sScrollXInner, and on other occasions where using DataTables will force the table to be wider than it otherwise would be - 2840 2010-09-30 22:06:41 +01:00
Allan Jardine
81107d0b7d Fixed: State saving when there were no column being sorted was broken - 2914 2010-09-30 20:18:33 +01:00
Allan Jardine
e4bed66535 Fixed: Stable sorting algorithm was slightly wrong when dealing with values which match each other. The idea for the stable sort is that the position shouldn't change so it should do a numeric sort of the row's current positions (the comment reflected this...) but it was in fact doing the sort on the value (aoData index), thus the "stable sort" position would reflect the original starting positions of the data, rather than the current position. The fix is to correctly look up the position of the index in the array and sort on that position (note the array is cloned, so it doesn't try to sort the dynamically sorted positions, which would make the sort unstable) - 2746 2010-09-30 08:17:38 +01:00
Allan Jardine
34aa952ec1 Fixed: When initialising multiple tables it was possible (no aoColumns given, and different number of columns) for DataTables to get confused and think one table's columns belong to another (due to a non-unique array in the initialisation object which was being wrongly used). 2010-09-20 13:15:06 +01:00
Allan Jardine
7f04b7ffb5 Fixed: When infinite scrolling, DataTables would clear it's internal cache of rows on every draw, when server-side processing was being used. This could result in fnGetNodes giving only a subset of the nodes which are visible, rather than the full set (which it now does). 2010-09-15 10:29:03 +01:00
Allan Jardine
eacaca1083 Fixed: The 'rewind' of the display start point wasn't being calculated in the same way for server-side processing and client-side. This was due to a bug in the calculation of fnDisplayEnd for server-side - 2600. 2010-09-14 20:19:21 +01:00
Allan Jardine
23fe13c68b Fixed: Column visibility was not being saved when calling fnSetColumnVis. It would require another draw to save the state before - 2635.
Fixed: Column visibility was not be restored from the state saving cookie. A small tidy up of the column creation code as well - 2635.
2010-09-14 19:43:04 +01:00
Allan Jardine
fb20b17856 Fixed: When destroying a table which had been filtered to no results, the 'No results' row was not automatically removed, returning in the table being unable to be re-initialised (since it has a colspan).
Fixed: Now use escape() and unescape() for state saving cookie with the filtering strings - 2608
2010-09-14 18:51:41 +01:00
Allan Jardine
8b4769f809 Fixed: When infinte scrolling, the display start count should always be at 1, rather
than reflecting the paging that DataTables is using internally.
2010-09-14 16:07:43 +01:00
Allan Jardine
a8ade0297b New: It is now possible to have elements created by sDom have an ID assigned to them as well as a class. An extension of the previous class only syntax you can now do something like "#id.class", "#id" or "class" - 2666 2010-09-08 21:08:52 +01:00
Allan Jardine
332d511649 Fixed: Destroying a scrolling table was not correctly reassembling the table from it's component parts which are split up for scrolling. 2010-09-08 20:40:18 +01:00
Allan Jardine
2c4def9353 Fixed: fnInitComplete was being called too early for server-side processing. It is now called after the first draw is complete, like the other data sources. 2010-09-07 21:37:56 +01:00
Allan Jardine
fde6ba858a New: Infinite scrolling! Building on the scrolling feature set that was introduced with 1.7, you can now have DataTables do infinite scrolling (bScrollInfinite: true), where data is loaded dynamically as and when needed by the user's interaction with scrolling. Infinite scrolling can be used by all DataTables' supported data sources without modification.
New: The distance from the end of the current scrolling container before new data is added (with infinite scrolling) can be controlled with iScrollLoadGap (which is a numeric value in pixels).

New: Example (basic_init/scrolling_y_infinite.html) to show how infinite scrolling can be used.

Fixed: iDraw was not being incremented for a draw that did not use server-side processing.
2010-09-05 10:21:26 +01:00
Allan Jardine
bd992cb10a New: When using jQuery UI theme option, DataTables will wrap the contents of sortable TH element in a DIV which can then be used to position the sorting arrow accurately across all columns. The required CSS has been added to the CSS files to show this effect. 2010-09-03 08:33:44 +01:00
Allan Jardine
aec4505a8f Fix: Looser test for IE to pass. Different date format string 2010-08-22 16:18:44 +01:00
Allan Jardine
29d7a0a182 Fixed: fnDestroy didn't restore columns which had been hidden by DataTables, resulting in these columns being completely lost - 2569 2010-08-22 08:47:06 +01:00
Allan Jardine
505bfce7c2 Fixed: The width of the table is now not fixed to the width of the container when scrolling is not applied (this is the same behaviour as 1.6-) - 2530 2010-08-21 10:05:07 +01:00
Allan Jardine
85b923cff3 New: Cookie callback function (can be passed as an initialisation parameter) called fnCookieCallback, which allows the developer to modify the information stored in the cookie. Takes four arguments (sName, oData, sExpires, sPath) and expects a complete cookie string to be returned (with name, value, expires and path correctly formatted).
Updated: Now use jQuery's JSON parse function (in jQuery 1.4) rather than JSON.js

Fixed: State saving cookie used single quote strings in places (in correct JSON). This has now been addressed, and a work around in place (replace) until a sufficient period has passed
2010-08-20 18:52:16 +01:00
Allan Jardine
25148e4fec Fixed: The second parameter for fnServerData was being passed as null when used without server-side processing. It makes much more sense to pass an empty array - 2553 2010-08-20 18:07:34 +01:00
Allan Jardine
9e6094e792 New: Language callback function for the information element. This can be used to customise the language shown in the information element beyond what is possible with the built in language string options (for example plurals). The arguments are fnInfoCallback( oSettings, iStart, iEnd, iMax /*no filter*/, iTotal /*after filter*/, sOut /*DT rendered string*/ ) - 2520 2010-08-17 23:29:12 +01:00
Allan Jardine
8e2efc004f Updated: Complex headers have been relaxed such that TH elements no longer need to be unique. There does need to be the correct TH elements with colspans and rowspans which add up, and each column requires at least one TH element for itself, but it is now possible to have two (or more) TH elements for each column. 2010-08-17 23:03:17 +01:00
Allan Jardine
2c76d845d6 Fixed: Columns with zero length strings only in them and with a given width would be missed from the width calculations - 2530 2010-08-17 19:00:46 +01:00
Allan Jardine
151b0ace94 Fixed: Rows with HTML entities and BR tags in them could break filtering in IE and Opera - 2512 2010-08-17 18:47:07 +01:00
Allan Jardine
fb0eee822e Fixed: When displaying full data set with server-side processing (_iDisplayLength = -1), this would incorrectly be shown in the table information - 2440 2010-08-17 18:39:57 +01:00
Allan Jardine
9fcaccb570 Initial commit - DataTables 1.7.0 2010-08-17 08:42:13 +01:00