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

25 Commits

Author SHA1 Message Date
Allan Jardine
2645463304 Example: Removed localStorage example
- DataTables now uses localStorage by default
2013-02-04 19:48:39 +00:00
Allan Jardine
a0455fa858 New: The primary public interface for DataTables' initialisation options is now camel case parameters rather than the Hungarian notation that was used before. There are a number of reasons for doing this, the primary one being that the Hungarian notation used by DataTables is actively stopping people from using the library due to their aversion to using Hungarian notation. Without doubt the Hungarian notation used was a mistake (the reason it was used was that when DataTables was originally written, the company I worked for at the time required the use of Hungarian notation, and thus I was trained in it...).
Backwards compatibility issues: The main goal here (other than to use camel-case notation!) is to preserve backwards compatibility. Unfortunately this isn't 100% possible:
	- DataTable.defaults.columns has been renamed to be DataTable.defaults.column
		- Otherwise it conflicts with aoColumns in the defaults.

Without doubt this is going to be a long process - for example the unit tests and examples need to be completely updated for this change. The JSDoc comments have been updated, so the site should take care of itself for the most part, when released.

In terms of implementation, it is important to note that I have not broken backwards compatibility here - the way it is does is that the current defaults are retained, and a camel-case to Hungarian mapping is automatically generated and then applied to the objects given by the end user. This adds around 0.5K to the size of DataTables, but writing the mapping manually would require at least 3K, and changing DataTables wholesale to camel-case would utterly break backwards compatibility. This is the least 'evil' way to accomplish this. It is important to note that this is a step along the roadmap for DataTables - come v2 Hungarian notation will likely be dropped completely.

One important note to make about this mapping is that if you use camel-case DataTables will copy the value from the camel-case properties to their Hungarian counterparts, so you will end up with additional properties on your source object. As I say, this appears to be to be the least 'evil' option, although still not perfect itself. The challenges of working with legacy software and installs...!
2012-10-07 11:50:29 +01:00
Allan Jardine
f6401f062a Update: Examples - remove all reference of fnRender, instead granting preference to mRender. 2012-09-09 12:05:37 +01:00
Allan Jardine
d3c2fd551b Fix - examples: Remove link to custom column ordering - now recommended mDataProp 2012-02-10 07:38:45 +00:00
Allan Jardine
ccb99b3305 Add the localstorage example to the links list 2012-01-14 12:02:34 +00:00
Allan Jardine
368585da1e Add localstorage example 2012-01-14 10:09:25 +00:00
Allan Jardine
e8c4436132 Update examples list with new custom events demo link 2011-12-28 11:55:39 +00:00
Allan Jardine
e4af1643a0 New: Events demo 2011-12-28 11:49:21 +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
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
9720130cbc Update example links with new flexible width example 2011-12-15 10:19:24 +00:00
Allan Jardine
f1a74f3c25 Merge branch '1_9_DEV' of github.com:DataTables/DataTables into 1_9_DEV 2011-12-14 18:07:08 +00:00
Allan Jardine
cf0bfe0145 Update documentation links to add defaults example and remove fnGetNodes from post-init description 2011-12-14 18:05:57 +00:00
Allan Jardine
22bffbb014 Update post init events example to use $ API method - easlier than fnGetNodes 2011-12-14 16:40:17 +00:00
Allan Jardine
f547513227 New: Example showing how to set defaults 2011-12-14 16:28:37 +00:00
Allan Jardine
1d2db4d5e9 New: All examples which show Ajax requests now show the JSON response from the server (highlighted to be readiable JSON formatting) and the responses shown will update with each additional request. The idea is to make the formatting that DataTables expects / can cope with more obvious 2011-09-10 08:53:02 +01:00
Allan Jardine
f788dd28d3 New: Syntax highlighting for the examples and provide a link for DataTables initialisation options to the reference page 2011-09-05 19:14:02 +01:00
Allan Jardine
ed00eac7f5 Updated: Update the links on all examples to include the new examples for 1.8 and general tidy up of examples 2011-04-26 07:30:31 +01:00
Allan Jardine
a9b9dc4ffe New: New examples for the various features of DataTables 1.8 2011-04-25 19:07:57 +01:00
Allan Jardine
a6c8a13e6a New: Unit tests for column visibility with complex headers and fnSetColumnVis 2011-04-20 20:05:14 +01:00
Allan Jardine
f172ef5383 New: Significant change to how data is handled by DataTables. DataTables now has the ability to deal with complex objects as data sourced, which is particularly useful for dealing with Ajax data, and other data which doesn't belong in the visible table (db IDs for example). See the examples/ajax/ files that are in this commit for examples on how this works. More unit tests and further tidy up to come. Detailed examples will also be added in future - the current examples are mainly for testing 2011-04-19 19:35:33 +01:00
Allan Jardine
17d7d3b270 Fixed: Highlight via CSS example had incorrect documentation - 3155 2010-10-25 18:51:06 +01:00
Allan Jardine
27627b287d Updated: Trivial change to update hte favicon used by the DataTables examples from the SpryMedia icon to DataTables 2010-10-08 21:15:17 +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
9fcaccb570 Initial commit - DataTables 1.7.0 2010-08-17 08:42:13 +01:00