…uses - 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 sAjaxSource) - object - maps directly to jQuery.ajax, allowing full control of the Ajax call (provides the abilities of fnServerParams, sServerMethod, sAjaxDataProp) - 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.
…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.
…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.
… when working with nested data and have properties created as needed.
…ote that a number of tests to test the backwards compability of mDataProp!
…(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.
…rings the unit tests need updating to reflect this
…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!)
…) 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
… 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
…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.
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
…ond argument being passed
…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.
…ments now being A tags, rather than SPANs/DIVs. Good that the change broke the unit tests since it is backwards incompatible
…It should be asStripeClasses and I've removed the alias in 1.9, thus the unit tests need to be updated.
…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.
…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.
…mistake in an earlier commit - picked up by unit tests
…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
…ated to include oSettings being passed as fourth argument New: sLoadingRecords tests added for Ajax source loading
…uding null and boolean etc). Add suitable unit tests to sanity check this.
…eated just like TDs in the body. This will work only with DOM sourced data out of the box - any body cell elements that DataTables creates are still TD.
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
…s that in future we could have mSortProp and mFilterProp if we wanted to sort / filter on something other than the main data. Also we are refering to a property of the source object (or an index of the source array - hence keeping the 'm' prefix)