Allan Jardine
0ed6ceda95
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.
2012-06-29 17:47:00 +01:00
Allan Jardine
56b0d11c96
Fix: When fnUpdate is called with a column index given, assume that the update is for an individual cell (which the API call has specified, so this is the correct thing to do). This also lets us tidy up some of the code in fnUpate, partiuclarly when regarding deeply nested options.
2012-06-26 17:09:03 +01:00
Allan Jardine
a022e2f736
Dev - remove debug
2012-06-25 20:06:19 +01:00
Allan Jardine
40a236a7cc
Update: Remove use of $.browser since this is depricated in jQuery 1.8 and will be completely removed in jQuery 1.9. Instead we now use feature detection to determine if there is a browser bug with the width calculation of scrolling elements that needs to be worked around. This does unfortunatly increase the code size a bit - it is either this or using user agent string detection (which is exactly what is being removed from jQuery).
...
Starting 1.9.3 development
2012-06-25 11:19:56 +01:00
Allan Jardine
1bd6b29fe4
DataTables 1.9.2 :-)
2012-06-22 08:19:26 +01:00
Allan Jardine
1055d27887
Fix: Regex filter escaping wasn't escaping the dash ('-') character believe it or not. That's been there since very early DataTables!
2012-06-13 18:27:04 +01:00
Allan Jardine
284658e3c9
Fix: When setting deeply nested object properties, where the parent object doesn't yet exist, don't just silently fail. Since we are setting a value, we are at liberty to create the parent object and then set the value - this now does so.
2012-06-07 09:43:47 +01:00
Allan Jardine
29e0d112cb
Fix - docs: Add jqXHR saving to fnServerData example
2012-06-01 07:42:01 +01:00
Allan Jardine
3d802a685b
Fix - docs: JSDoc syntax errors which were picked up by JSDoc Toolkit
2012-05-20 10:55:23 +01:00
Allan Jardine
391cd6a7a6
Fix - API: $ method, when used with defered rendering, when all rows have not been rendered, results in jQUery trying to perform a selector on 'null' which throws an error. Now check for the tr having being created before adding it to the array to pass to jQuery - 8862
2012-05-20 10:33:35 +01:00
Allan Jardine
b64dda47c3
Fix: fnDeleteRow could cause the page to drop back by one - 9505
2012-05-02 07:05:00 +01:00
Allan Jardine
49fe9f2e0e
Fix: Calling fnClose in fnPreDrawCallback would result in an error - 9702
2012-04-29 18:57:37 +01:00
Allan Jardine
d512e8cce7
Dev - build the last change ( fee3ba7
)
2012-04-29 10:15:51 +01:00
Allan Jardine
c2a2b4f531
Fix - docs: fnStateLoad example has a spare parameter (although not in the parameters list). Removed
2012-04-29 08:23:17 +01:00
Allan Jardine
2884ee23d2
Start 1.9.2 development
...
Fix - docs: sDom default had an error in it for the closing bracket
2012-04-27 16:17:22 +01:00
Allan Jardine
ba85dc22d6
DataTables - 1.9.1 release :-)
2012-04-15 19:16:24 +01:00
Allan Jardine
9ec52faec5
Dev fix: The change to set all Ajax properties has a knock on effect on setting deep objects that don't exist, since that is now attempted. Picked up by unit test.
2012-04-13 17:56:46 +01:00
Allan Jardine
814ce1f7d5
Update: Bring the mDataProp as a function functionality to parity for Ajax / JS sourced data and DOM sourced data. Previously DOM sourced data would call the 'set' option for the mDataProp function but Ajax/JS sourced data would not, resulting in the set option never being called for those table types, which is a total bummer when you want to do some formatting in the set option. So now it is called. I was slightly conerned about the performance hit since this means a couple of extra function calls for each cell, but its all in JS, no DOM and I can see virtally no difference with about 50'000 rows and 5 columns of data, so acceptable for the benefits.
2012-04-13 17:25:25 +01:00
Allan Jardine
513d6d5440
New: "destroy" event - when the table is destroyed the destroy event is now triggered. This is very similar to how aoDestroyCallback worked before, but this brings the implementation into line with the newer callback/events mechanisim used in DataTable
2012-04-13 15:26:30 +01:00
Allan Jardine
ac9e454e11
New: Column option "sCellType" - allows you to create TD (default) or TH cells for a column. Useful for creating row headings in the TBODY.
2012-04-13 13:31:02 +01:00
Allan Jardine
732d25b229
Fix: IE8 bug where an empty string read from a DOM input element is JSON encoded as '"null"' - absolutely mental! See this blog post for more information http://blogs.msdn.com/b/jscript/archive/2009/06/23/serializing-the-value-of-empty-dom-elements-using-native-json-in-ie8.aspx .
2012-04-13 11:56:01 +01:00
Allan Jardine
773c88b9f6
Fix: When mDataProp is given as a function, an error in getting the data would be rather ugly - 8400
2012-04-13 11:40:45 +01:00
Allan Jardine
8a66adc2d4
New: The _START_, _END_, _MAX_ and _TOTAL_ macros for the information language strings can now be used in any info string, rather than being limited to just the ones noted in the documentation - a new internal function called _fnInfoMacros is introduced to allow this to work - 9211
2012-04-13 11:29:56 +01:00
Allan Jardine
2a60a96177
New: Static API method - fnVersionCheck same as the version check that is already available as an instance method, but here available as a static API method attached to $.fn.dataTable
...
New: Static API method - fnIsDataTable - check if a TABLE node is a DataTable or not
New: Static API method - fnTables - get the DataTables that are initialised on the table (optionally limit to just the visible tables)
Examples update - Tabs and scrolling updated to use the new static fnTables method
Fix: Settings object model was missing the nScrollHead and nScrollFoot properties from the documentation
2012-04-13 10:44:25 +01:00
Allan Jardine
0518525f59
Fix: Captions which were positioned using caption-side:bottom (CSS) would be positioned incorrectly if using a scrolling table. Need to work around webkit bug 83867 to address this and add an empty tfoot element if one is not given - 2022
2012-04-13 09:25:47 +01:00
Allan Jardine
4be9b362c8
Fix: When scrolling and row height collapse was enabled, it was possible that the table column width applied would be too small due to the fact that a scrollbar would be shown for a fraction of a second, due to the height of the scroll body container enforced by the scroll collapse. Fix is to take into account the header height before the width calculation is done
2012-04-12 17:27:05 +01:00
Allan Jardine
3a27a605b9
Fix: Scrollbody height in IE7- - use offsetHeight consistently - 9424
2012-04-12 09:25:35 +01:00
Allan Jardine
5114e98a93
API - fix: The parameter for fnDraw was inverted by mistake in the 1.9.0 release - 7825
2012-04-04 08:28:35 +01:00
Allan Jardine
35a23adb75
Dev fix: Missed a variable def in the recent _fnLanguageCompat change
2012-04-02 11:53:13 +01:00
Allan Jardine
cd0babca54
Fix: IE6/7 return an empty string for getAttribute('id') when there is no ID attribute, rather than null. As such tables were not automatically being given an ID when they didn't have one, which created a situation where the settings object for a table could be 'lost' in IE6/7. Now check for empty string when checking the table ID.
2012-04-02 10:25:52 +01:00
Allan Jardine
04d4786455
Fix: IE6/7 when scrolling is enabled could loose the sorting event due to the way cloned nodes work in those browsers. Note that this was introduced after 1.9.0. Related - jQuery bug 10437 - http://bugs.jquery.com/ticket/10437
2012-04-02 10:03:47 +01:00
Allan Jardine
c1e40a8596
Fix: Language backwards compatibility could override developer defined defaults - 9267
2012-03-30 15:30:19 +01:00
Allan Jardine
e815062197
Fix: When -1 is selected for the display length (show all) the full numbers paging control didn't show page '1' - 9170
2012-03-30 07:48:33 +01:00
Allan Jardine
dec097ef50
Docs - fix: Show oSettings parameter in fnDrawCallback example - 9067
2012-03-26 07:50:38 +01:00
Allan Jardine
1d62b40f66
Docs - fix: Typos
2012-03-21 08:53:21 +00:00
Allan Jardine
f883df1afd
Docs - fix: fnSort documentation updated to indicate column sorting - 9094
2012-03-21 06:49:24 +00:00
Allan Jardine
2096244c60
Fix: afnSortData functions were not being executed with the DataTables instance's scope
2012-03-19 12:09:49 +00:00
Allan Jardine
b5f4938d7d
Fix: If sType for a column is html and the data is null, then _fnDataToSearch could throw an error - 8987
2012-03-14 07:51:07 +00:00
Allan Jardine
c22dfe00d3
Strip HTML from the aria-label tag for the sorting headers
2012-03-14 07:04:33 +00:00
Allan Jardine
918a065f21
Add documentation note on the fact that mDataProp as a function can get a 'type' of undefined when raw data is expected to be returned
2012-03-10 11:34:38 +00:00
Allan Jardine
cc42c49ec3
New - initisalisation: iDeferLoading can now also be an array allowing the developer to specify the number of records before and after filtering for the information display - 7936
2012-03-03 07:34:11 +00:00
Allan Jardine
fc730e17f3
Fix: The fnServerData error function can use the internal logging function now adays - make it do so - 8763
2012-02-29 10:33:03 +00:00
Allan Jardine
3a40c3a440
Fix: The sStripeOdd / sStripeEven options for the class objects were not being applied to the table. The fix is to set the default for asStripeClasses to be null, and then if null is found there, then the user hasn't applied a default, nor have they overridden the default, therefore we can use the classes from the class objects - 8770.
2012-02-29 09:09:16 +00:00
Allan Jardine
e40d1edebc
Fix - docs: Link to sDom from bFilter was incorrect
2012-02-28 10:35:46 +00:00
Allan Jardine
5479600611
Fix - performance: Don't extend the passed in data a second time - its a waste of time
2012-02-26 19:12:11 +00:00
Allan Jardine
126a4fe44e
Fix: When scrolling is enabled the initial width of the header was being set to 150% which was a bit random and could result in the header flashing its display in the wrong place when loading. The fix is to use 100% unless x-scrolling is being forced, at which point it needs to match the inner table - 8332
2012-02-25 07:56:27 +00:00
Allan Jardine
872dc0db3e
Fix: Feature match the server-side sorting to the client-side sorting for what information is sent to the server for sorting. Previously aDataSort was no honored - https://twitter.com/#!/naomiaro/status/172397914239414272
2012-02-22 19:47:09 +00:00
Allan Jardine
bc756f3a69
Docs fix: fnStateLoad documention refered to fnStateSave instead of itself
2012-02-21 14:14:13 +00:00
Allan Jardine
793020a8d4
Updated: When throwing an error, throw a "new Error()" so we can get a bit more information about the error
...
Updated: When using custom sort data types, if the returned array is not of the required length (aoData.length), then an error is thrown
2012-02-20 08:15:28 +00:00
Allan Jardine
409edd791b
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
2012-02-17 09:29:41 +00:00
Allan Jardine
af2e153bc3
Fix: When updating the filtering input control, we would just match on INPUT elements, so if the developer had appended an input button to the filter wrapper, that value would also be changed - 8537. Now a reference to the input element is stored and used to update the input value (this method means we don't need to add another class option, and developers can change to 'type=search' if they wish).
2012-02-15 09:36:51 +00:00
Allan Jardine
431b5e8a55
Fix: IE8 doesn't like the console check in logging - make it object based on window - 8517
2012-02-14 08:44:34 +00:00
Allan Jardine
ca009fdf88
Fix: When scrolling the column matching would remove any nested THEAD and TFOOT elements in the table - 8423
2012-02-08 08:34:39 +00:00
Allan Jardine
6021360da1
Docs: Fix - Parameter for filtering options in state saving examples should be oSearch, not oFilter - 8408
2012-02-07 14:28:46 +00:00
Allan Jardine
68975aff10
Docs: Fix - fnStateSaveParams refered to fnStateLoadParams in the example code - 8408
2012-02-07 14:23:46 +00:00
Allan Jardine
5907eb4639
Docs: Fix - 8400 - mDataProp when null incorrectly suggested that sDefaultContent was an empty string. It is infact null. Also typo fixes.
2012-02-06 18:26:13 +00:00
Allan Jardine
ab9dfd5052
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
2012-02-06 18:09:16 +00:00
Allan Jardine
0151d43c25
Fix: When fnPreDrawCallback is used to cancel a draw the processing display would remain active - this should not be the case as DataTables is now finished with its processing - 8371
2012-02-03 17:46:05 +00:00
Allan Jardine
de6482a15e
Fix: asStripClasses if given was being overruled by the default given for asStripeClasses - 8332
...
Fix: The extend function was only extending properties that existed on the original source object, not properties that only existed on the extender
2012-02-02 10:04:51 +00:00
Allan Jardine
92ce6487f2
DataTables 1.9.1 development begins
...
Fix: When using full numbers pagination in IE and clicking upon one of the numbers in the paging control, a Javascript error would occur due to trying to blur an element that was no longer in the DOM
2012-02-02 07:06:33 +00:00
Allan Jardine
2b126277fc
DataTables 1.9.0! :-)
2012-02-01 14:03:06 +00:00
Allan Jardine
1af3ebaf48
Fix: Docs: oSearch should be a namespace
2012-02-01 10:25:26 +00:00
Allan Jardine
7e18f3b484
Fix: Docs: fnVersion check should be marked with @type function
2012-02-01 09:53:39 +00:00
Allan Jardine
a3398d9b00
Docs: The options (properties) for the DataTables initialisation object that have a default function need an @member tag otherwise they are documented as methods, which they are not.
2012-02-01 09:07:52 +00:00
Allan Jardine
62e5221184
Fix: Docs: Typo
2012-02-01 08:24:55 +00:00
Allan Jardine
468390c337
Fix: When mDataProp was used to get a nested object, but a parent object 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.
2012-02-01 08:16:49 +00:00
Allan Jardine
d8f9e6289e
Docs: Add a "dtopt" tag to options that should be documented on the DataTables main site. This allows that documentation to be automatically generated from the source as well as the auto gen developer documentation.
...
Docs: Fix a few small issues with some of the documentation comments
2012-01-31 12:36:44 +00:00
Allan Jardine
a5d34f2230
Dev: Code size - also in fnSetColumnVis reduce code size with aoData references in the same way as we do for aoColumns. Smaller size and more consistency. All good.
2012-01-31 08:45:45 +00:00
Allan Jardine
4a4b6f6d58
Dev: Get the library size back under the target 70000 bytes. Its a bit of a cheap shoot this one, but every little helps!
2012-01-31 08:42:40 +00:00
Allan Jardine
a0ebd9ffec
Dev: Remove the oSettings 'get' in _ - don't need it anymore with the call to fnGetData
2012-01-31 08:33:42 +00:00
Allan Jardine
f436179284
Docs: API: Underscore function documentation updated to take account of allowing TH/TD cells in the selector
2012-01-31 08:32:11 +00:00
Allan Jardine
3e366a5fe9
New: API: fnGetData now also allows TD/TH nodes to be passed in and DataTables will figure out the data for the cell, returning that - easier than calculating the column index yourself. So you can now get the whole table's data, a row's data or an individual cell's data from the fnGetData function (you could get the cell data before, but you would need to use fnGetPosition).
...
New: API: Underscore function updated to use fnGetData rather than its internal function calls. Although slightly more expensive in computation terms, it extends the capacibabites of the underscore function greatly, allowing TD nodes to be the result of the selector as well as TR nodes. So now you can get a column of data with something like: $('#example').dataTable()._('td:nth-child(4)') . Cool :-)
Dev: New internal function called _fnNodeToColumnIndex, adapted from fnGetPosition for reuse.
2012-01-31 08:09:51 +00:00
Allan Jardine
acfee98b7c
Fix: Remove characters 0x80-0xFF. I had a new non-ASCII characters in by mistake and the PHP JSON processor objects to these characters when parsing the output from the JSDoc debug output.
2012-01-30 16:46:05 +00:00
Allan Jardine
876a75f6ad
Fix: With scrolling enabled, adding the scrollbar width to the header / footer inner container elements could cause the table to resize incorrectly on the following draw (and this error was cumulative). Fix is not to adjust the inner element for the scrollbar width - makes no difference to the table draw. It is possible that if you've styled this element you might need to take this change into account, but by default DataTables will style the parent (scrollHead) so no change is required (regardless of jQuery UI theming enablement) - 6776.
...
Fix: The calculation to detect if the scroll bar would be shown in IE6/7 was incorrect - it was calculating the height of the entire table, rather than just the body of the table (i.e. body + header + footer) which caused the "correct" for the scrollbar to be incorrectly applied to small tables.
2012-01-30 09:52:35 +00:00
Allan Jardine
a057b9d8cf
Dev: Trivial modification to bring 1.9.0 back under the target size of 70000 btyes (was only 4 out). Simply reference the previous search object to a local variable so the compressor can compress more
2012-01-28 09:22:34 +00:00
Allan Jardine
8c8ddc0485
DataTables 1.9.0.dev.4
...
Fix: Multiple tables were going haywire on initialisation due to the self reference - 8233
2012-01-25 19:44:05 +00:00
Allan Jardine
937811f09c
DataTables 1.9 beta 3
2012-01-25 16:16:36 +00:00
Allan Jardine
9fb4492053
Fix: aoPreSearchCols can be given as null if you want to deinfe multiple columns - doing so would have resulted in an error. Fixed (unit test)
2012-01-25 16:09:41 +00:00
Allan Jardine
5c9ec489c6
Dev fix: Documentation - noted that there were three parameters passed to mDataProp as a function, but only documented two. Add documentation for the third...
2012-01-23 09:55:45 +00:00
Allan Jardine
fc81ce726b
Update: mDataProp update to make it more versitile as a function and fix the settings of data with mDataProp. When mDataProp is given as a function, the function is now called with a 'type' of 'set', which the developer using mDataProp must used to store the value that if given (otherwise DOM read values would not be stored!).
...
Update: mDataProp documentation - example of using mDataProp as a function and clearer information about the options for mDataProp
2012-01-22 10:56:24 +00:00
Allan Jardine
2aea4da8bc
New: API method: _ - the underscore function is the compliment to the $ function introduced early in the 1.9 development cycle. While working with DataTables and the $ I've often wanted the data for the nodes that I'm working with, which means a call to fnGetData and an inner look - not itself bad, but it means an area loop in the external code - so this underscore function is basically the same as $, but rathe rhtan returning an jQuery object of nodes it will return an array of the data source objects for the matched TR elements (important to note that - the selector should resolve TR elements only, other elements don't have DataTables controlled data, and thus will be null in the returned array)
2012-01-21 11:08:22 +00:00
Allan Jardine
ea9ebaa593
Dev: Update: _fnNodeToDataIndex can be made _so_ much faster with the new _DT_RowIndex prviate parameter - so this commit does so :-)
2012-01-20 21:58:17 +00:00
Allan Jardine
4812d1d35b
Dev: New: _DT_RowIndex is a private parameter that is attached to all TR elements in the table now. This allows fast reverse mapping from the row index to the aoData entry (typically this will be used for getting _aData). Before we would have to loop over all rows which could be very slow, but this reverse mapping allows several new options for optimisations and future enhancements.
...
Dev: Updated: All fnRender calls have been put into a single point - code reuse...
2012-01-20 21:48:45 +00:00
Allan Jardine
e7bba4bcbe
Dev fix: The last change for fnAddData was incorrect - it would mean that objects couldn't be added...
2012-01-20 17:39:37 +00:00
Allan Jardine
139f33603a
DataTables 1.9.0.dev.3
...
Fix: fnAddData - check for 2D array could fail on null, since null is an object type - 8134
2012-01-19 09:36:55 +00:00
Allan Jardine
1421a08b90
Reissuing 1.9.0.beta.2 - the one I tagged before was never released outside me tagging it, since there was no time to write up the release notes, and now with a few more bug fixes, I think they should be rolled into to what will be released as 1.9.0.beta.2
2012-01-15 15:59:38 +00:00
Allan Jardine
80472cdd13
Dev fix: Oops - inverted logic for column filter definitions
2012-01-15 10:45:28 +00:00
Allan Jardine
1e7f3066f9
Fix: A stored display start (iInitDisplayStart) of 0 would cause an undesired effect
2012-01-15 10:43:01 +00:00
Allan Jardine
91c63b8ad5
Fix: When a previous search column details is defined for column 0, it would fail incorrectly. Now fixed
2012-01-15 10:37:43 +00:00
Allan Jardine
acec127c9a
Fix: Backwards compatibly for fnGetData and fnGetNodes when the row (as an integer) is not available
2012-01-15 10:30:48 +00:00
Allan Jardine
0c3dadbed9
Fix: fnOpen - when passed a TR element (or indeed any other element) that is not part of the master table (i.e. under control of DataTables), DatTables would try to "open" the row anyway - which was wrong. So now check that the node given is a TR element under control of DataTables, otherwise silently return. This is useful for using fnOpen when bound to all TR elements in the TBODY with a live event handler (i.e the click would also occur on the opened row).
2012-01-15 10:09:06 +00:00
Allan Jardine
dbf87ff5cd
Performance: MUCH faster removing of DOM elements in the header and body of the table - 8060 - performance testing: http://jsperf.com/remove-detach/11
2012-01-14 09:48:52 +00:00
Allan Jardine
1077ebcf08
Performance: there can only be 1 open row per parent TR, so quit out the loop when found - 8060
2012-01-14 09:38:19 +00:00
Allan Jardine
7f90aff469
DataTables 1.9.0.dev.3
2012-01-14 09:37:26 +00:00
Allan Jardine
517a3a3663
Updated: Minor change to fnOpen to be more flexible for jQuery input - 2488
2012-01-12 07:02:22 +00:00
Allan Jardine
b67c0969de
DataTables 1.9 beta 2 :-)
2012-01-10 15:34:55 +00:00
Allan Jardine
91c8547f48
Fix: Couple of trivial optimisations for speed and size
2012-01-10 14:35:18 +00:00
Allan Jardine
cfb77fd569
Fix: Documentation for fnStateLoad
2012-01-10 14:30:00 +00:00
Allan Jardine
25d5ab4bed
Fix: fnGetData returning all rows when trying to get row 0
2012-01-08 09:52:41 +00:00
Allan Jardine
7ae342dc7d
Fix: Unable to set an sDom default if bJQueryUI:true is used
2012-01-07 16:58:58 +00:00
Allan Jardine
b689320911
Fix: In browsers that don't define JSON then there woudl be an error thrown
2012-01-07 13:31:57 +00:00
Allan Jardine
2f729af697
Fix: Made a mistake when updating the conditionals for fnFilter and fnGetData when considering rows. if ( 0 ) is of course false - so passing in an integer isn't valid - need to check for undefined - 7997
2012-01-07 12:55:28 +00:00
Allan Jardine
9809d71161
Dev update: Use $.extend to copy arrays and objects for the state savings, as we don't want plug-ins to be able to muck around with the DataTables internals by mistake (even with the slice, the objects in the arrays maintain their references)
2012-01-02 19:59:52 +00:00
Allan Jardine
a4c7ac222a
Its 2012 now :-)
2012-01-02 10:42:43 +00:00
Allan Jardine
f702ac5648
New: Allow state loading to be cancelled from the aoStateLoadParams callbacks by returning false (matches the capabilities of the old state loading methods)
2012-01-02 10:19:19 +00:00
Allan Jardine
1bdbe86da2
New: Init option - fnStateLoad.
...
New: Init option - fnStateLoadParams
New: Init option - fnStateLoaded
New: Init option - fnStateSave
New: Init option - fnStateSaveParams
New: Event - stateSaveParams
New: Event - stateLoadParams
New: Event - stateLoaded
Removed: Init option - fnStateLoadCallback
Removed: Init option - fnStateSaveCallback
Updated: Documentation and code tidy up of the updated state saving methods.
2012-01-02 10:12:39 +00:00
Allan Jardine
cf12ba5ab3
Update: Initial work on updating state saving code to use objects rather than constructing a JSON string. Note that this has involved removing fnStateLoadCallback and fnStateSaveCallback which are now replaced with a much more effective setup using fnStateSaveParams, fnStateLoadParams and fnStateLoaded (blog post to come about this). Code documentation and tidy up yet required
2012-01-02 09:21:19 +00:00
Allan Jardine
6a59b64a60
Fix: The settings finder from node should really use === rather than ==...
2011-12-28 11:16:34 +00:00
Allan Jardine
aeed78a08c
Updated: Remove the sanity check for cols x rows === cells - we can't get to this code anymore due to the fnSetCellData check (that throws an error first), so this is dead code.
2011-12-28 11:14:53 +00:00
Allan Jardine
cb014e81d7
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
2011-12-28 11:12:30 +00:00
Allan Jardine
4808f0edd7
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.
2011-12-27 19:46:43 +00:00
Allan Jardine
5a2d4f8782
New: Add "processing" event
2011-12-27 18:37:28 +00:00
Allan Jardine
8c9f0b61e8
Updated: Nearly all callbacks now use an array and fire an event using the use DataTables standard method for dealing with callbacks. row, header, footer, init and pre-draw callback have been added to this new method. Only aoStateSave does not use method yet. fnCookieCallback and fnInfoCallback will not use the new methods.
...
Update: fnRowCallback - no need to return the TR element - it was a fairly pointless thing to do - if you want to replace the element then you need to do it with fnDrawCallback
2011-12-27 13:02:18 +00:00
Allan Jardine
ab9138b773
Updated: Initial pass at tidying up callbacks and events in DataTables - adding _fnCallbackReg and _fnCallbackFire to provide a single point for registering and firing callbacks in a unified way. Not all callbacks yet use these methods and some callbacks need to be converted to the array method (useful for plug-in developers)
2011-12-25 07:52:51 +00:00
Allan Jardine
94542c810a
New: fnRender update - data object now also contains mDataProp along with the other information from before. There is also a second parameter passed to the function - the current value of the cell (was possible to get it from the data array, but this makes life a little easier if you want to get just that, which is the most common usage here).
2011-12-23 18:31:25 +00:00
Allan Jardine
529aba4c5c
Fix: Remove sorting classes from TD elements as well as TH - 7836
2011-12-23 13:26:59 +00:00
Allan Jardine
0a1a2a17dc
Updated: The call to _fnFilterCustom doesn't need to check if there are filters since the loop will effectively do that anyway.
2011-12-21 09:11:12 +00:00
Allan Jardine
74f3426284
Fix: Modify the filtering such that client-side filtering is not done when server-side processing is enabled - its just a waste of time since hte server will do it all - 7825
2011-12-21 09:07:44 +00:00
Allan Jardine
3f9b7430f1
Version up to 1.9.0.dev.2
...
Remove the title attribute from the 2 button pagination - its totally redundant now
2011-12-20 14:48:27 +00:00
Allan Jardine
089797b3c3
DataTables 1.9 beta 1 :-)
2011-12-15 16:52:01 +00:00
Allan Jardine
35bbab90e2
Docs: oLanguage is a namespace, not a member
2011-12-15 16:37:42 +00:00
Allan Jardine
b447a0d4a9
Rolling back the change to starting that used localeCompare - it was causing incorrect sorting in IE9 (unit test failures)
2011-12-15 15:23:52 +00:00
Allan Jardine
8e224fec14
Small documentation update for fnGetNodes to suggest that $ should be used
2011-12-15 14:44:50 +00:00
Allan Jardine
fbc0877c94
@file attribute for JSDoc to version the documentation
2011-12-15 14:26:23 +00:00
Allan Jardine
82e52fdce1
JSDoc comment updates
2011-12-15 14:05:52 +00:00
Allan Jardine
771df2ac2d
Updates for documentation - document oApi as required
2011-12-15 13:54:23 +00:00
Allan Jardine
e8fb40640e
Make warning message smaller - too much payload for something that is virtual never seen
2011-12-15 12:55:06 +00:00
Allan Jardine
478d7f4de6
Column model should just use nulls where the defaults will override it
2011-12-15 12:45:42 +00:00
Allan Jardine
6d0d1100f2
Update documentation for column defaults name change
2011-12-15 12:43:26 +00:00
Allan Jardine
65f34e23f3
Apply default column options - the column defaults weren't actually being included, nevermind applied. Now put them in DataTable.defaults.columns and have them work!
2011-12-15 12:38:08 +00:00
Allan Jardine
91858f9e86
Updated: Modification to the way table width is handled - if the 'width' attribute is on the table tag, then we use that to size the table. This makes having a table width of 100% much easier than before. The reason we need to do this is that there just doesn't appear to be a good way to get the relative width from stylesheets across browsers.
2011-12-15 09:43:31 +00:00
Allan Jardine
8714f7cc0e
Fix: fnInfoCallback was not being executed in the DataTables' instance scope
2011-12-15 08:08:41 +00:00
Allan Jardine
5a506746bb
Fix: Alter how the selector for the $ API method works so that it works on the TR elements and their decendants
...
Update: modify the api_in_init.html example to use the $ API method
2011-12-14 17:42:25 +00:00
Allan Jardine
e1d860205b
Change the defaults object from attaching to DataTable.models to just the top level DataTable as DataTable.defaults - makes it much easier to access it when trying to set a default.
2011-12-14 16:22:58 +00:00
Allan Jardine
c44e10cf98
Tidy up the settings object - a lot of the settings should have null as the default since they are set by the initialisation.
...
Dev fix: Filtering usig anything other thant he API would always do case-sensitive matching
Doc fix: bAutoWidth wasn't documented
2011-12-14 16:02:03 +00:00
Allan Jardine
6db08eb107
New: Filtering now has a case insenstive option - this is bCaseInsensitive in oSearch, or the 6th parameter for fnFilter
2011-12-14 15:26:37 +00:00
Allan Jardine
356579f311
Documentation - note that DataTable is not a global object, but give variables for how it can be accessed
2011-12-14 15:08:42 +00:00
Allan Jardine
bebc9e516d
Documentation update for fnDrawCallback - it does actually get a parameter - the settings object
2011-12-14 14:12:48 +00:00
Allan Jardine
b235c64c2a
Language options always get extended with the initalisation object now - this allows you to use both a file source and the local script if you wanted. It also allows backwards compatiablity with language files that don't have the oAria namespace.
2011-12-14 13:39:06 +00:00
Allan Jardine
27488c4093
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.
2011-12-14 13:35:49 +00:00
Allan Jardine
1c60542040
Can't extend null on the classes - make the default an object for the settings classes holder
2011-12-14 11:59:26 +00:00
Allan Jardine
64a1b6b032
Copy the column options on top of the column settings object
2011-12-14 11:33:29 +00:00
Allan Jardine
b3e57df2ef
Reduce code size slightly (not much in fairness - but every little helps...)
2011-12-14 11:27:45 +00:00
Allan Jardine
013eac9d0b
Only the constructor should be referring to oJUIClasses - also in the constructor copy the class object rather than referencing
2011-12-14 11:15:17 +00:00
Allan Jardine
2bc7cd34c9
Remove redundant information in the message
2011-12-14 10:57:34 +00:00
Allan Jardine
57cc9f1b2c
Small tidy up of how the column filter state is saved
2011-12-14 10:50:34 +00:00
Allan Jardine
c8c40189a2
Remove pointless duplication of code - it was doing the same thing, just with different pointers
2011-12-14 10:48:15 +00:00
Allan Jardine
169eb721d2
New: oLanguage.oAira.sSortAscending and oLanguage.oAria.sSortDescending language strings which are attached to the label for a column header when it can be sorted. Basically the same as before, but now customisable.
...
New: iTabIndex initialisaiton option - allow the developer to decide what tab index could be given to the table.
Reverted: Two button navigation using A tags again - important for if there is no CSS
New: ARIA supoprt for the full numebrs pagination style
Changed: Tidy up the way events are added to the pagination and headers to reduce code.
Changes: Complete ARIA support for column headers so we now consider bSortable
2011-12-14 10:38:20 +00:00
Allan Jardine
bec6085880
Update ARIA attributes based on feedback from Vinnie Young ( http://groups.google.com/group/free-aria/browse_thread/thread/96156d857f35e10d#msg_e451dd817dfe01b1 ). Label for column header now states the column title and the next sort. TBODY has a role of alert and TR elements in THEAD have a role of 'row'
2011-12-13 08:55:46 +00:00
Allan Jardine
4e8f0fadd9
_fnArrayCmp is not used anywhere these days - ditch it
2011-12-12 09:38:34 +00:00