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

1607 Commits

Author SHA1 Message Date
Allan Jardine
b1bca78111 DataTables 1.10.9 release 2015-09-01 09:51:29 +01:00
Allan Jardine
648726b19e Fix: When using a cell selector, if the element doesn't have a parent node (caused by it being hidden and a jQuery selector being used) an error would be thrown.
- The fix is to loop over the data array to find the cell. Slower, but
  for an edge case I think this is an approriate fix.
- This fixes DataTables/DataTables #653
2015-09-01 08:38:38 +01:00
Allan Jardine
119a355970 Fix: It was possible to select an item multiple times using redundant selectors.
- Example: table.rows( ['', '', '', ''] ) would have selected all rows 4
  times!
2015-09-01 08:38:09 +01:00
Allan Jardine
8a4dc8a9d7 Fix: Using Array.prototype.push.apply can fail on larger tables / queries due to limits on the number of arguments that can be passed to a function, imposed by the various Javascript engines.
- The fix is to replace with more approriate options. The jquery
 `$.merge` function in particular is useful and array concat when we
 don't need to maintain a refernce.
- This fixes DataTables/DataTables #651
2015-08-31 14:26:04 +01:00
Allan Jardine
e48efdf316 Fix: Setting non-array data when DataTables has been told to expect an array results in a Javascript error. Although this is somewhat unexpected input, it is reasonable to expect DataTables to handle null values here, even although an empty array is much prefered.
- THis fixes DataTables/DataTablesSrc #55
2015-08-31 14:25:09 +01:00
Allan Jardine
4f27154fe4 Fix: Clear cache of row ids when the table is cleared. This is particularly important when server-side processing since the rows should no longer exist on the client-side when paging between records. 2015-08-28 12:20:41 +01:00
Allan Jardine
726bfe5ebb Fix: Rows could still be selected by id after they had been removed from the table. This could result in a memory leak as well as rows being selectable when they shouldn't be. 2015-08-28 12:20:11 +01:00
Allan Jardine
3a43de4224 Fix: Column data setter function would be called twice for the first row in the table
- This was caused by using `_fnGetRowElements` to get the cells. While
  it was good for performance with large number or rows to do so, it
  isn't needed for a single row and a single line of jQuery is simpliler
  and doesn't trigger the set function
- Fixes DataTables/DataTables #638
2015-08-27 10:54:28 +01:00
Allan Jardine
4e611f31ff Fix - styling: Bootstrap and Foundation would apply padding to a header cell, making space for a sort icon, even when the column is not sortable.
- This fixes DataTables/DataTables #639
2015-08-26 14:35:18 +01:00
Allan Jardine
03dc5a31ac Fix: When using a DOM data source, the cell's data function, as a setter, would be called twice
- The issue was effectively duplicate code - for 1.9- compatiblity when
  I introduced 1.10 I had the set function run specifically if a DOM
  node was given. But later in the 1.10 series when it became possible
  to have the data written to an object rather than an array, that code
  would itself call the setter, thus leading to two calls when there is
  a DOM node present for the row.
- The first is simply to remove the code that was running the setter for
  the DOM specific case.
- This fixes DataTables/DataTables #638 and thread 25846. Thanks to
  @Jamaur and @strang91 for following up on this.
2015-08-25 15:10:06 +01:00
Allan Jardine
17d0ce4cce Fix: Columns could be set to 0 width in IE6/7 when there are hidden columns in the table
- This fix also comes out of DataTables/DataTables #633. Thanks again to
  @nddery and @epitaphmike.
2015-08-25 14:18:58 +01:00
Allan Jardine
7d3c5cc276 Fix: Browsers on Macs with zero width scrollbars would be incorrected treated the same way as IE6/7 causing column width calculations to be incorrect.
- The issue was caused by the check for the `bScrollOversize` option
  which looks for the container being the same width as its inner
  content area. Obviously that happens to be true if there is no
  scrollbar. Adding a check for the clientWidth not being 100 as well
  resolves this.
- I've also combined the scrollbar width detection with the other
  browser detect functions. The two functions were performing very
  similar operations and so easily combined
- The browser detect DOM creation will only run once, rather than for
  every table initialisation, optimising multi-table loading
- Fixes DataTables/DataTables #633 - Thanks to @nddery and @epitaphmike
  for the input
2015-08-25 14:18:30 +01:00
Allan Jardine
6352732eac Fix - example: Column filtering would reset the paging on change event, which could give the impression that pading didn't happen since it is immediately over written.
Thread 29670
2015-08-25 14:17:32 +01:00
Allan Jardine
e7e439dd0a Fix: Cell invalidation would fail due to incorrect logic
- If d or objectRead were truthful then the row's data object would be
  replaced with an empty object. This was one shortcut in code too many!

- Relates to thread 29530 with thanks to idleog.
2015-08-19 14:40:22 +01:00
Allan Jardine
9ef7f1ad20 Fix: Compatibility with jQuery 2's isPlainObject. API instances were returning as plain objects
- This appears to be caused by setting the prototype chain as an object
  directly. For example:

  var test = function () {};
  test.prototype = {};
  $.isPlainObject( new test() );

  will return `true` with jQuery 2.1.4 (and `false` for 1.11.3).

  If an item is added to the prototype object then it will return
  `false`, although for some reason that wasn't the case with
  DataTables' API prototype.

  More investigation required, but for full compatiblity with exisiting
  jQuery releases, the correct thing to do here is to build on the
  exisiting prototype, which we can do with `$.extend`.
2015-08-19 12:25:28 +01:00
Allan Jardine
a7a9ac1910 Dev: Fix case issue with file names for the example builder
- This is the problem with developing on a case insensitive file system
  which the Mac default is!
2015-08-19 12:24:58 +01:00
Allan Jardine
50cac9640a Dev: Nowrap in syntax highlighter 2015-08-19 09:56:33 +01:00
Allan Jardine
0482633dff Fix - CSS: Bootstrap and Foundation were missing the empty row class to align text to the center 2015-08-19 09:55:39 +01:00
Allan Jardine
3950e119e2 Fix - docs: Add note to dt-api draw() that the string options require 1.10.8 or newer 2015-08-19 09:54:48 +01:00
Allan Jardine
a6e75123eb Update rows().ids().xml
Spell mistake
2015-08-19 09:54:19 +01:00
Allan Jardine
7898f4e585 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2015-08-19 09:53:47 +01:00
Allan Jardine
52531db870 Update selector-modifier.xml
Just a small spell mistake
2015-08-19 09:52:44 +01:00
Allan Jardine
085d7f3137 Fix: Row invalidation would throw an error when reading from a DOM row
- Fixes DataTables/DataTables #623
2015-08-17 09:34:39 +01:00
Allan Jardine
44b1402fa6 DataTables 1.10.9 development starts 2015-08-17 09:34:10 +01:00
Allan Jardine
1c22b79471 Dev: Update make file to minified the integration files 2015-08-17 09:32:50 +01:00
Allan Jardine
953d1fc6ca Add minified integration files 2015-08-12 20:17:46 +01:00
Allan Jardine
3977c5de72 Sync with latest DataTablesSrc 2015-08-12 19:50:30 +01:00
Allan Jardine
f91373337b DataTables 1.10.8 release 2015-08-12 19:49:47 +01:00
Allan Jardine
60273a0a75 Dev: Update the new rowId option to be able to read the id from the DOM 2015-08-12 19:49:29 +01:00
Allan Jardine
13c3a5400e Dev: Don't just jQuery code if jQuery hasn't been loaded (example index pages) 2015-08-12 19:48:50 +01:00
Allan Jardine
7811a69f30 Update - examples: Improve descriptions of examples and refer to the new extensions where appropriate 2015-08-12 19:48:33 +01:00
Allan Jardine
588e78f92b Update - example: Use Bootstrap rather than jQuery UI for the scrolling and tabs example.
Bootstrap tabs seem to be more popular these days
2015-08-12 19:48:15 +01:00
Allan Jardine
9cc3be030f Fix: Calculation for horizontal scroll bar adjustment when the dt-init scrollCollapse parameter is set could be incorrect when the standard height exceeds the window height.
- This is an interesting one, and I suspect a bit of an edge case in the
  browsers - what is happening is that the window is going from having a
  scrollbar to not having a scrollbar when the scrolling viewport is
  collapsed. This causes the browser to show the scrollbars in the
  viewport for an instant, even although they aren't actually required.
  If the height of the viewport is 53px and you up it to 80 so there are
  no scrollbars and reduce it back to 53 the scrollbars are gone! The
  browser must be stopping a race condition once the scrollbars are
  shown.

- The fix is to use `max-height` for the scrolling container if the
  scroll collapse is set and `height` otherwise. The browser native
  methods makes the code _much_ easier to work with, more performant and
  easier to understand.
2015-08-10 17:47:34 +01:00
Allan Jardine
07c04c69f8 Dev fix: Commit f2df0716 removed a check for IE6/7 to disable the smart
column width for these tables. However, that was in error - it is in
fact required still as the smart width calculations cause the browser to
crash (APPCRASH). There is no indication as to why this is, not is it as
simple as just disabling one or two pieces of code to stop the crash.
This leads me to suspect that it is the number of operations being
performed - particularly to do with the cloning of the elements. If this
is the case, then its just never going to work. Also IE6/7 are such a
small market now (thank goodness) this is just a feature that won't be
available in those browsers.

If anyone is interested in working on fixing it, or paying me to do so,
I'm happy to hear from you :-)
2015-08-10 17:47:12 +01:00
Allan Jardine
e111fae862 Dev: Update example templates to refer to extensions rather than extras 2015-08-10 14:59:41 +01:00
Allan Jardine
d0e9e78db4 Fix: Horizontal scrolling could incorrectly be triggered in Firefox when there is lots of room available and scrolling is not required. This was due to sub-pixel rendering of the columns, but the widths being rounded up to integer values. Using getBoundingClientRect addresses this. IE8- have to continue using the old method.
Fix: The auto width calculation table, when scrolling is enabled, being inserted into the scrolling container could cause the viewport to scroll, even when the main table doesn't actually need scrolling. This causes the column width calculations to be incorrect by the scrollbar's width. The fix is to have the calculation table `position:absolute` in the scrolling container and height:1px so it has no effect on the vewport's scrolling.

- These two fixes address DataTables/DataTables #612. Kudos to @Delgan
  for reporting these issues and supplying test cases - thanks!
2015-08-10 14:59:04 +01:00
Allan Jardine
bb33384e62 Update - styling: Altering the paging buttons to have a styling that is consistent with the Buttons extension. This is just a darkening of the active border and a small border radius. 2015-08-10 14:58:05 +01:00
Allan Jardine
781f7fcaef Update - examples: All examples now use $().DataTable() to construct the table.
- The API examples already used the new form, but many were still
  `$().dataTable()`, which still works, but the new API form method is
  prefered.
2015-08-10 14:57:47 +01:00
Allan Jardine
ecf94192ae Dev: Update Foundation CDN
Dev: Built fixes for Editor
2015-08-06 20:42:36 +01:00
Allan Jardine
201cc7fb69 Fix: If dt-init deferRender was enabled, the dt-event init event wouldn't trigger until after the table's second draw.
- This could be seen specifically when using Responsive with a defer
  rendered table - Responsive wouldn't kick in until after the second
  draw.
2015-08-06 20:42:01 +01:00
Allan Jardine
21705f049a Dev: Example build update to allow the new components frameworks to build from the CDN 2015-08-06 20:41:26 +01:00
Allan Jardine
065e3d2b1d Update - examples: Remove jQuery UI themed scrolling example
- Bootstrap is proving to be a far more popular theme for DataTables -
  this example comes from back in the day when jQuery UI theming was
  first added, so it is no longer required.
2015-08-06 20:41:08 +01:00
Allan Jardine
eff925f168 Fix - examples: Pipelining description had a typo 2015-08-06 20:40:12 +01:00
Allan Jardine
a67cb611de Fix - docs: dt-api columns() incorrect argument type for column selector
Fix - docs: `dt-api column().index()` incorrect return type was documented
2015-08-06 20:39:33 +01:00
Allan Jardine
c6cea56621 New - example: Scrolling example with dynamic height using the vh CSS unit 2015-07-24 15:39:18 +01:00
Allan Jardine
a2948e4c1e Fix: Simplification and improvement of table widths when scrolling
Fix: Table could overscroll if `dt-init data` is used to populate the table

This is a fairly significant change to how DataTables operates for the
scrolling width calculations and primarily is due to a simplification
with the use of `clientWidth` to get the scrolling container width.
Rather than getting the offsetWidth and then removing the scrollbar
width if required the `clientWidth` will give us the value directly.

With the scrollbar width already accounted for the scrolling draw code
can be updated to not need to account for it itself.

Finally, when using the `data` property to add data to the table we need
to recalculate the column widths after the first draw, just like with
Ajax loaded data, otherwise the data added won't be taken into account
and we can get an error in the scrolling.
2015-07-24 15:38:59 +01:00
Allan Jardine
fa9fa2e296 Dev: Syntax highlighter - link urls with a comma in them
Dev: Syntax highlighter - show the type label above the code so it doesn't over lap the code
Dev: Syntax highlighter - don't show the `:after` option in highlighted code
2015-07-24 11:45:26 +01:00
Allan Jardine
11dbd3ca52 Fix: Mixed tabs and spaces 2015-07-24 11:45:08 +01:00
Allan Jardine
534e281b39 New: dt-api draw() now accepts a string parameter which can be used to perform a simple redraw without the need to reorder / research the table. This is useful for paging where, otherwise, it would be a performance hit. 2015-07-24 11:44:34 +01:00
Allan Jardine
d1352ac898 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2015-07-24 11:43:09 +01:00