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

677 Commits

Author SHA1 Message Date
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
Tim Tucker
6a5c4cf261 Update media/src/core/core.sort.js
Use simpler dom-based method for deferred render
2012-09-03 16:53:00 -03:00
Tim Tucker
24fc23f63d Update media/src/core/core.sort.js
Simplify and improve performance
- Only check once for the presence of any sorting class instead of checking for the 3 individual classes
- Use lastIndexOf(str, 0) instead of indexOf

http://jsperf.com/rep-reg-string/4
2012-09-03 16:29:28 -03:00
Tim Tucker
af5c3d8178 Update media/src/core/core.info.js
Simplify check for filtering / empty record set
2012-09-03 14:02:38 -03:00
Tim Tucker
3485f6530a Update media/src/core/core.info.js
Use greedy match regex for replacements

Otherwise, you could have:
"_START_ of _TOTAL_, showing _START_ to _END_"
replaced as:
"1 of 5, showing _START_ to 3"
2012-09-03 13:52:30 -03:00
Tim Tucker
ef1c0890df Update media/src/core/core.sizing.js
Use document.body rather than document.getElementsByTagName
(Makes things consistent with the rest of the codebase and should be faster)

http://jsperf.com/document-body-vs-document-getelementsbytagname-body-0
2012-09-03 13:34:10 -03:00
Tim Tucker
4cbb9f3196 Update media/src/core/core.sizing.js
Define nWrapper earlier to avoid calling dom to get the parentNode multiple times in the initial loop
2012-09-03 13:11:11 -03:00
Tim Tucker
f5a772c594 Update media/src/core/core.scrolling.js
Use o.nScrollHead / o.nScrollFoot rather than traversing through the dom again to get the parentNodes for nScrollHeadInner / nScroolFootInner
2012-09-03 13:02:05 -03:00
Tim Tucker
70cea14422 Update media/src/core/core.scrolling.js
Only pass in what's needed to _fnApplyToChildren (don't need to be passing in both the sizer and node to size in most cases).
2012-09-03 12:38:09 -03:00
Allan Jardine
59dc2aed9c Dev: Fix a couple of issues that were introduced in pull request #85 - 1. Mix of spaces and tabs :-). 2. documentation generation was broken due to the use of another closure, 3. minification was broken as window, document, undefined were been aliased and 4. jshint was throwing errors. This addresses those issues, primarily by shifting the closures around. 2012-09-02 10:33:49 +01:00
Allan Jardine
e69e3c6c1c Dev update: Commit built changes from Tim Tucker from last few merges 2012-09-02 09:49:17 +01:00
Allan Jardine
93b0c9ede7 Examples: update - bind the 'xhr' event to the table without calling DataTables - no need for that call to be made. 2012-09-02 09:48:45 +01:00
Allan Jardine
9c82abe79d Merge pull request #89 from timtucker/patch-6
Use hasChildNodes() rather than childNodes.length
2012-09-02 01:40:10 -07:00
Allan Jardine
a950fb0642 Merge pull request #88 from timtucker/patch-5
Update media/src/core/core.data.js
2012-09-02 01:38:58 -07:00
Allan Jardine
1fdfb65457 Merge pull request #87 from timtucker/patch-4
Allow adding / removing an arbitrary number of stripes
2012-09-02 01:37:58 -07:00
Allan Jardine
dd2f084794 Merge pull request #86 from timtucker/patch-3
Improve dom iteration performance in _fnApplyToChildren
2012-09-02 01:34:13 -07:00
Tim Tucker
30eb6f0426 Update media/src/ext/ext.paging.js
Cache node
2012-08-31 18:48:15 -03:00
Tim Tucker
55b8e6fd04 Update media/src/ext/ext.paging.js
Use a different approach that caches nodes
(may actually minify better as well)
2012-08-31 18:43:38 -03:00
Tim Tucker
0c0fef65c1 Update media/src/ext/ext.paging.js
Replace childNodes.length check with hasChildNodes() in one more place
2012-08-31 18:35:00 -03:00
Tim Tucker
d8d7759613 Update media/src/ext/ext.paging.js
Use hasChildNodes() rather than childNodes.length

See the following jsperf test for the difference in performance:
http://jsperf.com/haschildnodes-vs-childnodes-length
2012-08-31 18:32:01 -03:00
Tim Tucker
dd616424b9 Update media/src/core/core.support.js
Use firstChild / nextSibling rather than childNodes
2012-08-31 18:25:23 -03:00
Tim Tucker
1001a332fb Update media/src/core/core.data.js
_fnGatherData: Use firstChild / nextSibling to iterate rather than childNodes
2012-08-31 18:12:39 -03:00
Tim Tucker
845eaaab67 Update media/src/api/api.methods.js
Properly select every nth row for adding classes
2012-08-31 17:45:15 -03:00
Tim Tucker
82fad5ca50 Update media/src/api/api.methods.js
Allow for adding / removing an arbitrary number of stripe rows
2012-08-31 17:37:11 -03:00
Tim Tucker
75ce320838 Update media/src/core/core.constructor.js
Allow for adding / removing an arbitrary number of stripe rows
2012-08-31 17:31:00 -03:00
Tim Tucker
ce59c7403f Update media/src/core/core.scrolling.js
Tweaks to improve performance
Cache nodes
Restructure to use nextSibling rather than childNodes
(small increase in file size, but may be a slight decrease in minified size)
2012-08-31 16:25:35 -03:00
Allan Jardine
0d47107906 Merge pull request #84 from timtucker/master
Update to docs
2012-08-31 09:46:34 -07:00
Tim Tucker
3cc96cf58f Update media/src/core/core.draw.js
Cache row
Avoid array access to childNodes
Move unique calculation outside of loop
Declare all vars at head of function
Cache a[i] in fnShiftCol
2012-08-31 13:38:51 -03:00
Allan Jardine
25f4602b3c Merge pull request #85 from timtucker/patch-2
Update media/src/DataTables.js
2012-08-31 09:30:07 -07:00
Tim Tucker
37485da480 Update media/src/DataTables.js
Combine closures
2012-08-31 13:08:09 -03:00
Tim Tucker
66de941632 Update media/src/DataTables.js
Wrap with globals to ease minification
Fix check for preventing multiple instantiation
Change formatting
2012-08-31 12:39:28 -03:00
Tim Tucker
87b4055b7a Update media/src/DataTables.js
Add support for AMD-based module loaders (such as requirejs).
Should have no effect when loading normally.
2012-08-31 11:15:19 -03:00
Tim Tucker
6fa5559dc3 Update media/src/core/core.sizing.js
Doc update -- getWidestNode returns node, not string
2012-08-31 11:00:48 -03:00
Tim Tucker
08619a3a21 Update media/js/jquery.dataTables.js
Update doc to reflect that _fnGetWidestNode returns a node, not a string.
2012-08-31 10:48:55 -03:00
Allan Jardine
6855be79f5 Examples: Add <code> CSS markup for examples. 2012-08-30 19:32:31 +01:00