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

987 Commits

Author SHA1 Message Date
Allan Jardine
75d28cad1c Fix: fnOpen should return a node, not undefined 2014-03-20 15:28:44 +00:00
Allan Jardine
67a2b18ca3 Fix: Memory leaks from not removing listeners on destroy
- DataTables uses the `DT` namespace for events internally and will
  remove them automatically on destroy, but `dt` is used for public
  events. As such, the public events used internally should use `.dt.DT`
  to ensure that the listener works as expected, but also so that the
  destroy call will remove these listeners
2014-03-20 15:19:42 +00:00
Allan Jardine
c625f2f525 Fix: Destroy should use detatch() not remove()
- This is to preserve user added listeners on destroy. If they want to
  remove their listeners to prevent memory leaks, then they should do
  so. But DataTables won't do it for them, as actually, you might want
  to keep your event listeners!
2014-03-20 15:19:26 +00:00
Allan Jardine
90870af5ac Fix: fnServerData compatiblity for 1.9-
- fnServerData's second parameter should be an array of objects with
  name/value pairs. It was being passed through as the more modern
  object, but fnServerData is only present for compatiblity with 1.9 and
  should the original format should be retained. This is done with a
  simple map function
2014-03-19 19:33:49 +00:00
Allan Jardine
b5228162a7 Fix DataTables/TableTools #46 - fnGetData should return null if row not
found

- The old fnGetData method would return null, rather than undefined for
  some reason if a given row was not found in the DataTable. The new
  wrapper api for the legacy interface should do the same.
2014-03-19 10:53:56 +00:00
Allan Jardine
d271fac5b6 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-03-19 10:53:44 +00:00
Allan Jardine
ecceb7a2ca Fix DataTables/DataTables #288 - Column search wasn't being used 2014-03-19 10:53:33 +00:00
Allan Jardine
0dab1e20de Fix: Only report a general Ajax error when request is complete
- Previously if you cancelled an Ajax request, or the browser did (for
  example following a link) the error handler would be entered and show
  an alert. This just ensures that the request is complete before
  showing an error
2014-03-19 10:53:21 +00:00
Allan Jardine
c0c1db422f Fix: Legacy API error when using fnGetNodes on an empty table 2014-03-14 14:06:30 +00:00
Allan Jardine
3e33795877 New: Responsive CSS for core styles
- On smaller screens the table controls (length, search, info and
  paging) will show as stacked now.
2014-03-14 12:32:27 +00:00
Allan Jardine
fd857d4864 Fix: On Ajax error hide the processing display 2014-03-14 12:32:06 +00:00
Allan Jardine
ce54ab1ea5 Fix: ajax.reload() wasn't showing the processing display 2014-03-14 12:31:43 +00:00
Allan Jardine
1d0a155226 Fix: Selector was too selective for filtering in old browsers 2014-03-14 12:31:19 +00:00
Allan Jardine
302f0be0ac Fix: Ordering informationw as being sent in SSP Ajax when ordering disabled
- See thread 19860 for details.
2014-03-07 11:48:23 +00:00
Allan Jardine
9dc81c8dd3 Dev fix: Sort classes for cells were broken in beta.3-dev
- Commit 515761905c had removed the `_fnSortingClasses` call for a
  client-side processing table without defered rendering.
2014-03-07 11:48:08 +00:00
Allan Jardine
34c18509d8 Update: The _ option for columns.render as an object is optional now
- Previously when using columns.render as an object, you had to supply
  an `_` option which was the fallback. However, I've now made it so
  that if there is no `_` option it will just use the raw data from
  `columns.data`
2014-03-07 11:46:08 +00:00
Allan Jardine
e45f19eb60 New: Number formating helper
- I've come accross a lot of cases recently where numbers need to be
  formatted for display, so I wanted to introduce rendering helpers for
  DataTables to make this easier. Only one helper introduced here -
  `$.fn.dataTable.render.number()` which will return an object that can
  be used by `columns.render` to format "raw" numbers.
2014-03-07 11:45:53 +00:00
Allan Jardine
92e380c778 New: ajax.params() method to get the data for the last Ajax submit 2014-03-06 10:05:46 +00:00
Allan Jardine
c32f4c032a Fix: Child rows which were given as TR elements were not being added
- The child row feature of DataTables should be able to take a `tr`
  element and add that directly as a child. That wasn't working due to a
  logic error before.
2014-03-06 08:47:42 +00:00
Allan Jardine
6a568a7542 Fix: When invalidating data source, check the cells exist first
- Fixes the issue highlighted in thread 19822
2014-03-05 16:54:56 +00:00
Allan Jardine
ccc4f99c54 Dev: Remove debug 2014-03-05 16:54:21 +00:00
Allan Jardine
9a3bdacce6 Fix: IE8 - Settings as an API selector needs to return as an array 2014-03-04 08:53:08 +00:00
Allan Jardine
39828e8bab Fix: Incorrect use of offsetHeight for scroll collapse 2014-03-04 08:52:53 +00:00
Allan Jardine
a9687655ea Fix: Cell selector, when operating as a jQuery selector needs to return
an array, not a jQuery object - otherwise IE8- throws an error

- This fixes DataTables/DataTables #262
2014-03-03 10:19:21 +00:00
Allan Jardine
dcbea43baf New: column().visible() and columns().visible() now act as getters or
setters.

- See discussion thread 19653
2014-02-25 09:23:08 +00:00
Allan Jardine
4834aa26be Fix: If you had a column which has columns.visible:false set on it, it
would be removed from the array of data passed through to the custom
filtering functions. This would cause indexes to misalign.

- The fix is to simply pass in the data filter array that has already
  been computed, as that is 1:1 for the display. Also added the raw data
  source object for the row for completeness and a bit of a code tidy
  up.

- This will cause a bit of an indexing issue, if you have bVisible:false
  set, but this is certainly a bug that had to be fixed - it just didn't
  make sense as it was, and went against the documentation!

- See thread 19593 for more information
2014-02-21 17:20:32 +00:00
Allan Jardine
a14bfa29fb New: cell-selector type can now 'self-select' by supporting the index
objects that it uses internally for cells.
2014-02-21 17:20:20 +00:00
Allan Jardine
23c9580d01 Updating version to 1.10.0-beta.3.dev 2014-02-19 10:08:06 +00:00
Allan Jardine
7227353a8f Fix DataTables/DataTables #275 - Sort classes weren't being applied to
newly created elements

- The fix i've put in is basically the same as what DataTables 1.9-
  used. I had tried to opitmise it a little, but it wasn't working for
  newly created cells. I still think this can be optimised, but for the
  moment, this is at least allows it to work.
2014-02-19 10:07:21 +00:00
Allan Jardine
028a56051d DataTables 1.10.0-beta.2 2014-02-17 10:19:24 +00:00
Allan Jardine
6968422b42 Fix: Ajax callback function wasn't being called when server-side
processing was enabled (ajax.reload() and ajax.url().load())
2014-02-17 10:18:54 +00:00
Allan Jardine
c12b50daef Fix: A single space was being added to all cell classes on
initialisation
2014-02-17 10:18:42 +00:00
Allan Jardine
b36439b6b7 Fix: The externally exposed internal API methods were only exposed once
a DataTable had been intiailised.
2014-02-14 16:03:21 +00:00
Allan Jardine
9434d93956 Fix: Default cursor on paging disabled buttons
- This fixes DataTables/DataTables #272
2014-02-14 16:03:08 +00:00
Allan Jardine
7f9f954d99 New: eq() API method to reduce an API instance to just a single context
and result set for the plural methods.

Fix: Row details events were itterating over non-DataTables rows
creating a Javascript error

Fix: Example - Server-side processing row details example updated to be
able to restore the details row on a redraw.

Update: Documentation - Most examples which used `flatten()` are more
correct to use the new `eq()` method, so they have been updated.

- This set of changes is based on the discussion in thread 19377. While
  working on the fix, I realised that the use of flatten() is too broad,
  so the new `eq()` function is introduced. It is similar to the jQuery
  eq() method in that it reduces the instance to just the selected
  index, although in DataTables this is both the context and the result
  set. Its a small addition, but I think it will provide to be very
  useful
2014-02-11 11:04:50 +00:00
Allan Jardine
afdf67075d New: language.decimal option. This option can be used to tell
DataTables which character is used as a decimal place in the table's
data, so that number which are formatted using characters other than a
dot as the decimal place can be correctly detected and sorted.

- A large part of the world uses the comma as a decimal place, so it
  makes sense to have this option built-in directly to DataTables,
  rather than needing to use plu-in sorting types as before:
  http://en.wikipedia.org/wiki/Decimal_mark

- However, the decimal place character cannot be detected automatically
  since there are far to many ambiguities. As such, a new
  `language.decimal` option is defined which is passed through to the
  type detection functions. The type detection functions can then use
  that character to alter their detection functions to transform numbers
  into the dot formatted equivilent for parsing in Javascript.

- The numeric sorting methods have been bundled together in the function
  `_addNumericSort` which is called when a character is given for the
  decimal mark, adding the sorting functions required specifically for
  that mark. This means that any character at all can be added, while
  keeping the table's sort performance as it was.

- Code size in increased a little for this new feature, but a lot of
  work has been done to keep it to a minimum (while still optimising for
  the most common use case of a dot decimal place), and this is a good
  feature to have in DataTables' core code.

- All required documentation added and updated.

- Special thanks to Tobias Bäthge for suggesting and sponsoring this
  feature.
2014-02-10 17:07:22 +00:00
Allan Jardine
b007bbff00 New: Add thin space and narrow no-break space as supported thounsands
separators for formatted numbers
2014-02-10 17:06:41 +00:00
Allan Jardine
2665e8459d Dev: require() bash function now in the include file 2014-02-10 17:05:48 +00:00
Allan Jardine
6c3337e300 Site: DataTables 1.10.0-beta.1 blog post 2014-02-10 17:05:35 +00:00
Allan Jardine
87e0d43844 Fix: Column visiblity was using $().remove() to remove elements from the
DOM which results in any events attached being detached by jQuery. Need
to use `detach()`

- Thanks to sebgoe in thread 19360
2014-02-05 14:02:23 +00:00
Allan Jardine
b29fa07501 Fix: Possible column misalignment when scrolling is enabled
- This is caused due to different content in the displayed header and
  the size forcing header in the body scrolling table. The browsers can
  lay the two tables out differently even although the widths applied
  are identical, due to the different content.

- The fix is to keep the content in the scroll body header, but hide it
  by wrapping in a div which has height 0 and overflow hidden

- See thread 19311 for more information
2014-02-05 10:32:33 +00:00
Allan Jardine
2c4cc4fd1b New: Built in filtering will throttle calls to the server when using
server-side processing

- A popular plug-in for DataTables is the `fnSetFilteringDelay` plug-in,
  which provides a bit of a buffer when typing into the filter input so
  you don't make an Ajax request for every key stroke - i.e. don't DDoS
  your own server!

- Since we have _fnThrottle built in now for the scrolling, we can also
  use it to provide this buffering functionality for server-side
  processing filtering in the core. A couple of small changes for
  _fnThrottle were required to get the callback context correct and ot
  call it not immediately, but only after the delay
2014-02-05 10:32:21 +00:00
Allan Jardine
83f30cec8f Dev: Moving on to 1.10.0-beta.2.dev 2014-02-05 10:32:09 +00:00
Allan Jardine
7cea7a64b4 DataTables 1.10.0-beta.1 2014-02-04 10:44:37 +00:00
Allan Jardine
635f35a63b Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-02-04 10:44:23 +00:00
Allan Jardine
88c7044373 Site: Fix links 2014-02-04 10:44:10 +00:00
Allan Jardine
b670b5956b Update: jQuery 1.11.0
- Include jQuery in the repo build
2014-02-04 10:43:31 +00:00
Allan Jardine
eda09a9087 Dev fix: IE7 is throwing an error when using $().removeAttr() and
$().attr() for the aria sorting information
2014-02-04 10:43:17 +00:00
Allan Jardine
d65130ec4f Dev fix: row().node() should return null or the row element
- It wasn't with the registerPural API method because the function was
  returning undefined, which tells the wrapper to use the Api instance
2014-02-03 14:08:24 +00:00
Allan Jardine
2d3c29a9d5 New: Add no-footer class to the wrapper element when the table has no
footer

Update: Update CSS to display the table border properly when there is no
footer when scrolling

Dev: Update the _fnAddOptionsHtml function to be smaller in code size.
Identical functionality, just smaller code
2014-01-31 14:15:51 +00:00