DataTables 1.9 beta 1
DataTables 1.9 beta 1
allan
Posts: 63,679Questions: 1Answers: 10,498 Site admin
Dear all,
It is with great pleasure that I announce the release of DataTables 1.9 beta 1. After two weeks of intensive work on DataTables 1.9 (and a good deal of planning beforehand), I'm really pleased with the results, and I hope you will be as well! There is no magical leaps forward here, it is all evolutionary, but there is a lot that will make DataTables a lot easier to work with.
Demos: http://datatables.net/beta/1.9/examples/
What's new: http://datatables.net/new/1.9
Upgrade notes: http://datatables.net/upgrade/1.9
Package download: http://datatables.net/releases/DataTables-1.9.0.beta.1.zip
IMPORTANT: Note that there is, out of necessity, one change that will likely require you to update your pagination CSS for DataTables if you are upgrading from a previous version. Please refer to the upgrade notes for further information.
There are three major new features that have me really excited about this release.
1. A new API method called "$". As you might guess this acts just like the jQuery function, with the selector that you provide acting on the elements that are in the table body. This is a lot like fnGetNodes but a lot more flexible and much easier to use. Have a look at the selectable rows demo ( http://datatables.net/beta/1.9/examples/api/select_row.html ) to see how easy this makes working with elements in the table. With $ you can now access and manipulate table elements in a DataTable as you would with other elements on the page.
2. Accessibility: A lot of work has been put into DataTables to ensure that it is accessible to users who might use alternative access methods such as screen readers. A combination between good mark-up, tab accessible elements and WAI-ARIA attributes means that all controls in a DataTable can now be used with a only keyboard. Try tabbing around a table and using the return key!
3. Documentation: As part of the work I've done to completely reorganise the internals of DataTables, I've updated all function comments to work with the wonderful JSDoc and made the documentation complete internally. As such, DataTables can now be automatically documented. This documentation is available offline if you need it (as part of the download package) and here on this site: http://datatables.net/docs/DataTables/ . This will prove particularly useful for plug-in developers now that the settings object and all other DataTables internals are fully documented!
Other new features include the ability to set defaults, optimisations in the sorting algorithm and the ability to define multiple column sorting for columns by default. Check out the "what's new" page for full details: http://datatables.net/new/1.9 .
Along with backwards compatibility, one of the things I wasn't going to sacrifice with this release was file size. Although the unminified file is significantly larger than before, due to the extensive documentation comments, the minified file is actually smaller than v1.8.2, coming in at just under 70KB. This is thanks to the new internal structure, sensible code updates and improvements in Closure Compiler.
This release also sets the groundwork for the next major release, which will be a lot more modular, so you could potentially select what features you want, and not have the others, reducing file size significantly.
If you have any issues with the new release or upgrading from a previous version, please post your message in a new thread so we can keep track of individual issues.
Finally, please consider supporting continued DataTables development and support by making a donation to the project :-)
http://datatables.net/donate
Enjoy!
Allan
It is with great pleasure that I announce the release of DataTables 1.9 beta 1. After two weeks of intensive work on DataTables 1.9 (and a good deal of planning beforehand), I'm really pleased with the results, and I hope you will be as well! There is no magical leaps forward here, it is all evolutionary, but there is a lot that will make DataTables a lot easier to work with.
Demos: http://datatables.net/beta/1.9/examples/
What's new: http://datatables.net/new/1.9
Upgrade notes: http://datatables.net/upgrade/1.9
Package download: http://datatables.net/releases/DataTables-1.9.0.beta.1.zip
IMPORTANT: Note that there is, out of necessity, one change that will likely require you to update your pagination CSS for DataTables if you are upgrading from a previous version. Please refer to the upgrade notes for further information.
There are three major new features that have me really excited about this release.
1. A new API method called "$". As you might guess this acts just like the jQuery function, with the selector that you provide acting on the elements that are in the table body. This is a lot like fnGetNodes but a lot more flexible and much easier to use. Have a look at the selectable rows demo ( http://datatables.net/beta/1.9/examples/api/select_row.html ) to see how easy this makes working with elements in the table. With $ you can now access and manipulate table elements in a DataTable as you would with other elements on the page.
2. Accessibility: A lot of work has been put into DataTables to ensure that it is accessible to users who might use alternative access methods such as screen readers. A combination between good mark-up, tab accessible elements and WAI-ARIA attributes means that all controls in a DataTable can now be used with a only keyboard. Try tabbing around a table and using the return key!
3. Documentation: As part of the work I've done to completely reorganise the internals of DataTables, I've updated all function comments to work with the wonderful JSDoc and made the documentation complete internally. As such, DataTables can now be automatically documented. This documentation is available offline if you need it (as part of the download package) and here on this site: http://datatables.net/docs/DataTables/ . This will prove particularly useful for plug-in developers now that the settings object and all other DataTables internals are fully documented!
Other new features include the ability to set defaults, optimisations in the sorting algorithm and the ability to define multiple column sorting for columns by default. Check out the "what's new" page for full details: http://datatables.net/new/1.9 .
Along with backwards compatibility, one of the things I wasn't going to sacrifice with this release was file size. Although the unminified file is significantly larger than before, due to the extensive documentation comments, the minified file is actually smaller than v1.8.2, coming in at just under 70KB. This is thanks to the new internal structure, sensible code updates and improvements in Closure Compiler.
This release also sets the groundwork for the next major release, which will be a lot more modular, so you could potentially select what features you want, and not have the others, reducing file size significantly.
If you have any issues with the new release or upgrading from a previous version, please post your message in a new thread so we can keep track of individual issues.
Finally, please consider supporting continued DataTables development and support by making a donation to the project :-)
http://datatables.net/donate
Enjoy!
Allan
This discussion has been closed.
Replies
Awesome work as usual!!
Quick question about the new fnIsOpen api. All the examples still show the old way (unless I am blind and missing it :) )
Will this handle the icon for the open/closed as well? Or does this just replacing the src.match function?
Looking forward to putting it through its paces
Scott
Good to hear from you again. Good point about using fnIsOpen in the examples - I didn't update them before, but I just have: http://datatables.net/beta/1.9/examples/api/row_details.html .
It doesn't do the icon for you as that is an external UI control - for example you might not want the icon on the row - but rather apply a different class or have the icon in a different location. Its up to you to pick how you represent that the row is "open" :-)
Regards,
Allan
I am new to JQuery, and of course to DataTables
I have just started working with the previous version - it's great. Thanks.
And now you are telling me it's even better...
looks superb! I'll give the beta a try tomorrow or at the beginning of the new year.
Thanks a lot for your hard work! I hope to get some donations to you soon ...
Regards!
I try new 1.9 beta version with my web aplication but I got 1 error from ColumnFilterWidgets.js, line 255:
var asValues = widget.sSeparator ? sValue.split( new RegExp( widget.sSeparator ) ) : [ sValue ];
My web aplication:
http://datatables.net/forums/discussion/230/how-are-you-using-datatables#Item_99
@John Archer: Hope you enjoy using 1.9 :-)
I've got one or two little things to do to the current development version then I'll tag beta 2, with a view to getting 1.9.0 final released for mid January.
Thanks,
Allan
... and Marry chrismas..
and got: Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 28 Dec 2011 13:15:40 UTC
Message: 'null' är null eller inte ett objekt
Line: 17
Char: 3914
Code: 0
URI: http://datatables.net/beta/1.9/examples/examples_support/syntax/js/shCore.js
Message: 'undefined' är null eller inte ett objekt
Line: 17
Char: 3914
Code: 0
URI: http://datatables.net/beta/1.9/examples/examples_support/syntax/js/shCore.js
1. It's impossible to set a default value for sDom if you have bJQueryUI set to true.
No matter what you set as a default, the following code overrides the default:
[code]
if ( oInit.bJQueryUI )
{
...
if ( oInit.sDom == DataTable.defaults.sDom )
{
/* Set the DOM to use a layout suitable for jQuery UI's theming */
oSettings.sDom = '<"H"lfr>t<"F"ip>';
}
}
[/code]
Potential solution -- change the comparison to:
[code]
if ( oInit.sDom == DataTable.defaults.sDom && !DataTable.default.bJQueryUI)
[/code]
2. Defaults for oLanguage are problematic if you only want to set one or two strings.
As an example, the following overrides all strings and results in an exception when any string other than sSearch is accessed:
[code]
$.extend($.fn.dataTable.defaults, {
"bPaginate" : false
"oLanguage" : {
"sSearch" : "Filter: "
}
});
[/code]
But the following works as intended and only replaces the default value for sSearch:
[code]
$.extend($.fn.dataTable.defaults, {
"bPaginate" : false
});
$.extend($.fn.dataTable.defaults.oLanguage, {
"sSearch" : "Filter: "
});
[/code]
This might be a case where you'd want to make sure to make a note in the examples / documentation
1. Good point! I'll put in a fix for this into the next beta (hopefully in a day or two).
2. What you would need to do is use the deep copy option of 'extend':
[code]
$.extend(true, $.fn.dataTable.defaults, {
"bPaginate" : false
"oLanguage" : {
"sSearch" : "Filter: "
}
});
[/code]
But yes - this should certainly be mentioned in the documentation for the defaults!
@patriklindstrom: I'll fire up my IE7/8 instances shortly and investigate!
Allan
@patriklindstrom: Bit of a nightmare tracking that one down, but ultimately it was in the regexp library for the syntax highlighter on the demo pages rather than an issue with DataTables itself. I've just committed in a fix to my demo environment and that will be in the next beta.
Regards,
Allan