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

761 Commits

Author SHA1 Message Date
Allan Jardine
65cde4c612 Merge pull request #120 from timtucker/patch-31
Dev: Simplify Ajax condition
2012-10-05 22:43:15 -07:00
Tim Tucker
223fed5e94 Update media/src/core/core.ajax.js
simplify conditions:
!A || (A && (B || C)
really is the same as:
!A || (true && (B || C))
which simplifies to:
!A || (B || C)
which simplifies to:
!A || B || C
2012-10-05 23:50:33 -03:00
Allan Jardine
60484bc93a Dev - Remove reporting code from the Ajax draw update - don't need it after the change for 36076fc5c8 2012-10-04 14:50:47 +01:00
Allan Jardine
73c834ea82 Merge branch 'master' of github.com:DataTables/DataTables 2012-10-04 09:00:09 +01:00
Allan Jardine
57022e2f11 Fix: Current release is 1.9.4
package.json needs to reflect the current release, not the development version.
2012-10-04 09:58:35 +02:00
Allan Jardine
b566cc1ca4 Fix: Release is currently 1.9.4
component.json needs to reflect the current release, not the development version.
2012-10-04 09:57:55 +02:00
Tim Tucker
15a3e7b97d Update media/src/core/core.filter.js
Reorder things a little to simplify
2012-10-02 09:18:45 -03:00
Tim Tucker
bd7d70c6b3 Update media/src/core/core.draw.js
Remove unused variable
2012-10-02 08:57:42 -03:00
Tim Tucker
fc445cd374 Update media/src/core/core.draw.js
Remove check for iOpenRows !== 0, since it isn't really needed.
(the contents of the loop just won't execute)
2012-10-02 08:55:18 -03:00
Tim Tucker
a3b5706105 Update media/src/core/core.ajax.js
Remove unnecessary else(s)
2012-09-30 20:11:36 -03:00
Tim Tucker
23fc3858d9 Update media/src/ext/ext.sorting.js
handle undefined values, skip toLowerCase call for empty strings
2012-09-30 20:05:09 -03:00
Tim Tucker
7f35d4fb4d Update media/src/api/api.static.js
Slightly shorter method for checking the version (stops as soon as it reaches a version part that has a difference)
2012-09-30 11:07:24 -03:00
Tim Tucker
473e9b0088 Update media/src/core/core.info.js
Only set iStart once and only call fnFormatNumber once on iStart.
2012-09-30 10:21:09 -03:00
Allan Jardine
c14b49fca3 Remove - asStripClasses backwards compatiblity. There was a typo for asStripeClasses back when it was first introduced, now here in 1.10 the patch that was used to allow both forms is removed. 2012-09-30 09:22:06 +01:00
Allan Jardine
6b605936f7 Update: Significant update to how sorting is applied internally in DataTables - there is no difference to how the sort is actually done, with the single exception that the -asc and -desc are not depricated in favour of the -pre method only.
- With the introduction of the -pre method in DataTables 1.9, the -asc and -desc sorting functions became more or less redundant since they are simple comparisons (all of the complexity is now in the -pre formatting function). As such the call to the -asc / -desc method is overhead that really isn't needed, and this commit introduces a sort function that doesn't call the -asc / -desc methods, instead just doing the comparison itself. In tests, this relatively simple change leads to a performance improvement of around 15% in all browsers (it also has the side benefit of less operations, so IE8- will be able to sort larger tables before flagging up a slow script warning).

- We can't just remove the sorting method which will call -asc / -desc though since not all sorting plug-ins will have a -pre method. Therefore, for backwards compatiblity the old sort function (albeit updated for the changed variables) is retained. The backwards compatibality code adds around 300 bytes to the library, but this is an unaccounced change, so backwards compatiblity must be retained.

- The old sort method will be removed in v1.11. The -asc and -desc methods are now fully depricated.

- Altered the sorting method to flatten the aaSorting array since the introduction of aDataSort in v1.9 required an extra loop in several locations. The functionality is very useful, but the extra loop can be a bit messy and slightly hit performance, so it is now flattened to be a single array (with object information so it makes sense, rather htan array indexes!).

- Altered the order of sorting when building _aSortData since it was looking up the same variable smultiple times which really wasn't needed.

This is part of a small incremental changes plan for DataTables! There are still a huge number of things to improve in this area, but this is a nice clean up and a nice 15% sorting performance improvement to get us started :-).
2012-09-29 21:25:41 +01:00
Allan Jardine
6900a59e74 Fix - docs: Need to escape the underscores for markup output when we now use. 2012-09-29 21:24:56 +01:00
Allan Jardine
36076fc5c8 Removed: sName reordering on return from the server when server-side processing. This was depricated in DataTables 1.9 and is now removed. This was an inefficient way to supply data to the DataTable in an array that was out of order and the client-side would reorder the arrays into what was needed. The way to do this now is to use mData and JSON objects rather than arrays, as it provides much greater flexibility without a performance hit on the client-side.
Note: _fnColumnOrdering is left in place at the moment, although it may be updated as work progresses on 1.10 with regard to the increased use of column names.
2012-09-23 18:49:11 +01:00
Allan Jardine
8d56d0204e Starting DataTables 1.10 development :-)
Removed: fnRender - fnRender was depricated in 1.9 and is now being completely removed here. Its always been a bit messy and is now superseded by mRender. The main reason for this is that DataTables use to take an independent copy of the input data source object / array. This is a performance hit and it means we can't do any binding to external objects (for example it makes Knockout integration almost impossible).
Removed: bUseRendered - with fnRender being removed, bUseRendered is irrelevent
Updated: With fnRender being removed we no longer need to take an independent copy of the data source object / array (since DataTables itself isn't ever going to write to it now - fnRender did and the copy was included so we didn't inadvertantly change a developers data source object without them knowing about it. This is no longer a problem, and in fact having it use the same data source object is extremely useful in many cases.
2012-09-23 18:38:25 +01:00
Allan Jardine
6c41618c71 Update: jQuery 1.8.2 2012-09-23 14:18:58 +01:00
Allan Jardine
822c62d05d DataTables 1.9.4 2012-09-23 14:16:14 +01:00
Allan Jardine
26d2926390 Fix: Ie9 throws an error when document.activeElement is used inside a frame or iframe... So need to wrap the test up in a try/catch. Nasty. 2012-09-23 13:12:39 +01:00
Allan Jardine
bd6bb74967 Fix: Header TD elements need an outline of none to stop of focus flicker (matching TH elements which already have this) 2012-09-19 07:27:52 +01:00
Allan Jardine
b4cd9f11c6 Fix: A header made of only TD elements wasn't being correctly detected - 11705 2012-09-19 07:27:11 +01:00
Allan Jardine
77a8cb5946 Update: jQuery to 1.8.1 2012-09-19 07:26:21 +01:00
Allan Jardine
d1142e1450 Fix: If the user is currently focused on the filtering input element, don't overwrite the value that is already shown as this will effect the cursor position. 2012-09-16 12:00:36 +01:00
Allan Jardine
a19e1dee12 Dev: Use className for the newly created TR - slightly faster than addClass which isn't needed here 2012-09-16 11:19:53 +01:00
Allan Jardine
55adb2f3d5 New: component.json file for Bower ( http://twitter.github.com/bower/ ) support. Both component.json and package.json are generated with the correct version number in them. 2012-09-15 10:52:19 +01:00
Allan Jardine
e25b377ee8 Fix: State saving deletion of cookies was somewhat broken. It would delete cookies out of order, which is not what we want. Rewrite how the 'overage' of cookies (4K limit) is handled 2012-09-13 18:13:32 +01:00
Allan Jardine
a43714bfba Fix - docs: sNext and sPrevious referened to full_numbers pagination type, but they can be used for any pagination control: 9192 2012-09-12 07:47:29 +01:00
Allan Jardine
66e92ab655 Fix - docs: Documentation error for fnGetPosition - missing one of the return indexes - 11708 2012-09-11 10:09:03 +01:00
Allan Jardine
ca96ed55d5 Fix: Remove irrelevent and broken bSortable check for the column options - fix issue #101 2012-09-11 07:04:41 +01:00
Allan Jardine
0a3793b4bb Dev: Tidy up the way that the header and footer elements are 'got'. Based on pull request #92. 2012-09-09 18:43:57 +01:00
Allan Jardine
df614240cf Update: Fully deprecate fnRender - it will be removed from the next major version of DataTables and it is strongly adviced that you do not use it! 2012-09-09 12:26:57 +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
880de42c6e Dev: Remove debug from last commit... 2012-09-09 12:05:20 +01:00
Allan Jardine
555aacfc6d Fix: mRender and mData now work in the same way for DOM sourced tables as they do for JS sourced table data. Generally we wouldn't really expect them to be used as much for DOM sourced tables (if you want your table formatted differently, you'd just create the HTML differently!), but it can sometimes be useful to use these options. This also brings mRender to full 'pace' ready to be used in complete preference to fnRender (alongside the other methods for cell rendeirng such an fnCellCreated etc). 2012-09-09 11:57:02 +01:00
Allan Jardine
898357fc84 Merge pull request #98 from timtucker/patch-14
Update media/src/core/core.sort.js
2012-09-04 09:38:03 -07:00
Allan Jardine
30f936d8ff Merge pull request #97 from timtucker/patch-13
Update media/src/core/core.info.js
2012-09-04 09:30:58 -07:00
Allan Jardine
6d11218a7f Merge pull request #96 from timtucker/patch-12
Update media/src/core/core.info.js
2012-09-04 09:30:06 -07:00
Allan Jardine
bb08308dfe Merge pull request #95 from timtucker/patch-11
Update media/src/core/core.sizing.js
2012-09-04 09:29:15 -07:00
Allan Jardine
3ffa14ea8a Merge pull request #94 from timtucker/patch-10
Update media/src/core/core.sizing.js
2012-09-04 09:28:07 -07:00
Allan Jardine
4603ad13d4 Merge pull request #93 from timtucker/patch-9
Update media/src/core/core.scrolling.js
2012-09-04 09:27:25 -07:00
Allan Jardine
95381359ed Merge pull request #91 from timtucker/patch-7
Update media/src/core/core.scrolling.js
2012-09-04 09:24:50 -07:00
Allan Jardine
fcf49ef66e Merge pull request #99 from timtucker/patch-15
Update media/src/DataTables.js
2012-09-04 09:19:57 -07:00
Tim Tucker
a66bec8368 Update media/src/DataTables.js
Simplify by not passing in undefined to the outer closure
2012-09-04 13:03:20 -03:00
Tim Tucker
89be8f4083 Update media/src/core/core.sort.js
Speed things up by applying classes only when needed
2012-09-04 11:05:53 -03:00
Tim Tucker
cb2495b440 Update media/src/core/core.sort.js
Use var to keep track of # of classes found (length on sparse array doesn't work properly)
2012-09-03 19:36:18 -03:00
Tim Tucker
6bce847a3b Update media/src/core/core.sort.js
Further refinement - stop once all sorting classes have been seen
2012-09-03 19:12:03 -03:00
Tim Tucker
2afa5e4360 Update media/src/core/core.sort.js
Combined method for removing classes
2012-09-03 18:21:01 -03:00
Tim Tucker
e6e4205b02 Update media/src/core/core.sort.js
Forgot parameter to lastIndexOf
2012-09-03 16:54:30 -03:00