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

1268 Commits

Author SHA1 Message Date
Allan Jardine
f63d04583c Fix thread 20096 - Visible column index selector
- The column index selector was broken by a previous commit (d9f416232).
- Fix also an error in the column selector whereby a result was being
  tested against itself
2014-04-28 09:36:11 +01:00
Allan Jardine
597b0c0b74 Moving on to rc.2 dev.
Not yet clear if there will be an RC2 or just move on to the release.
2014-04-28 09:11:08 +01:00
Allan Jardine
014a9c11dd Fix DataTables/DataTables #306 - jQuery UI class applied to all spans
- The class for sorting should only be applied to the sorting indicator
2014-04-28 09:10:47 +01:00
Allan Jardine
f5af4e28e0 Update: SQL exported compatible for MySQL, Postgres, SQLite and
SQLServer
2014-04-25 16:47:55 +01:00
Allan Jardine
82264d6325 DataTables 1.10.0-rc.1! 2014-04-25 16:43:53 +01:00
Allan Jardine
56481941b1 New: Add preAjax event so plug-in authors can add Ajax params 2014-04-25 16:43:31 +01:00
Allan Jardine
78b043d234 Fix: Custom length menu was broken
- If you provided your own <select> list for the lenght language option,
  DataTables would still append its own and ignore your custom one

- See thread 20548
2014-04-25 16:43:02 +01:00
Allan Jardine
505a2b37a3 Dev: Minor changes to reduce code size.
- This commit trims about 400 bytes off the min library size
2014-04-25 16:42:36 +01:00
Allan Jardine
54e93323b4 Fix: Responsive CSS - two collapsing stages for the control elements
- The filter and page length controls take up a lot less room, so they
  can collapse later
2014-04-25 13:27:47 +01:00
Allan Jardine
eb74bc591a Dev: Markdown update - add a class to lists and tables so we know when
they have been generated by markdown. Must easier for styling
2014-04-25 13:27:28 +01:00
Allan Jardine
80e748cc11 Fix: Accessiblity - Add role=row attribute to table rows
- Feedback from James Craig on improving the accessiblity of DataTables.
  Since the `role=grid` option is added to the DataTables table, we
  should also add `role=row` to the rows in the table so the browsers
  can see them correctly. As James notes, it is debatable if this is
  needed or not but it is required in current Chrome and Webkit.

- Webkit do now allow roles to be optional in the nighties - see:
  https://bugs.webkit.org/show_bug.cgi?id=131819 . Once Apple deploy
  this in a Safari update, and Chrome also deploy support, I think this
  should be removed from DataTables core, since it will no longer be
  needed in the latest browsers, and manipulating the DOM can hit
  performance a bit.
2014-04-22 09:58:32 +01:00
Allan Jardine
7ab49af0b6 Fix: Selector couldn't be given as an API instance with indexes
- It is useful to be able to filter row indexes by a condition and then
  operate on the resulting array of indexes, but before the selector
  would only itterate over real arrays. So if you passed is an API
  instance with the result set being the indexes to delete, it wouldn't
  work!

- Fix is to loop over anything which has a `length` property

- Thread 20572
2014-04-22 09:58:13 +01:00
Allan Jardine
d6a5b7c729 Fix: Accessibility improvements
- Remove the aria-relevant from the info text to use the default,
  otherwise it was reading information that isn't very useful
- Change info text role to `status`
- Remove `role=row` from header - this is experimental and might change.
  Might need it on this row and all rows in the table
- Based on feedback from James Craig (thanks!)
2014-04-18 09:39:18 +01:00
Allan Jardine
22161b3224 Fix: Legacy API fnGetData with no parameters was flattening the return
array
2014-04-18 08:45:29 +01:00
Allan Jardine
950110e1fd Fix: Don't redraw the table for page change when no change needed
- If you were to click the 'previous' button when on the first page, the
  table would redraw - that's the easiest manifestation of this bug to
  see. There is no need to redraw the table when the paging hasn't
  changed, so don't.

- This fixes DataTables/DataTables #304
2014-04-18 08:27:51 +01:00
Allan Jardine
22023595e8 Fix: Keyboard navigation of the paging control
- Because DataTables is destroying and creating elements for the paging
  control, focus is lost when navigating via keyboard. This is a real
  pain when trying to operate DataTables that way! Fix is to refocus on
  the new element.
2014-04-17 09:26:28 +01:00
Allan Jardine
3fb997f0b8 Fix: grid ARIA role should be on the table, not the container
- Feedback from James Craig - author of WAI-ARIA specification.
2014-04-17 09:26:11 +01:00
Allan Jardine
b53ac91310 Fix: Ajax data wasn't being sent for non-server-side processing
- If you used client-side processing ajax, the parameter passed into
  _fnBuildAjax is an array, needed for the old 1.9 compatiblity, but the
  ajax wasn't transforming this into a data object and then sending it
  to the server. The fix is to check if the data passed in is an array
  or not - if so, transform it to an object
2014-04-16 16:27:56 +01:00
Allan Jardine
311cc96572 Dev: Renaming demo database table for naming consistency 2014-04-16 16:27:38 +01:00
Allan Jardine
f6a05f5a46 Updated: SQL exported compatible for MySQL, Postgres, SQLite and
SQLServer
2014-04-16 16:27:22 +01:00
Allan Jardine
f51f88429d Fix: Column sorting classes might not be applied correctly
- If you use multiple column definations such that a columns' sorting
  options are initially disabled and then enabled, the sorting classes
  for the header were not being applied correctly.

- The fix is to always assign classes based on the most up-to-date
  information for the column.

- This fixes DataTables/DataTables #303
2014-04-15 09:02:55 +01:00
Allan Jardine
efa8ff5b71 Fix: jQUery object will fail as a column selector
- This fixes #2
2014-04-14 09:42:34 +01:00
Allan Jardine
f7e9a20324 Dev fix: JSHint error from last commit 2014-04-14 09:42:14 +01:00
Allan Jardine
3ce42db432 Fix: Plug-in ordering didn't work on initial order
- The resolution of unknown sorting types was being done after the
  sorting structure array of objects was being calculated. As such, a
  string sort was always being done in the first instance!

- This fixes thread 20433
2014-04-14 09:28:36 +01:00
Allan Jardine
261f2c9eb0 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-04-11 09:15:20 +01:00
Allan Jardine
464ce6a32a Dev: Markdown updates
- In a fenced code block, need to encode the HTML elements. However, the
  HTML was being detected and saved first. Run the fencer first.

- Type links updated
2014-04-11 09:15:02 +01:00
Allan Jardine
0ea30f9ba7 New: CommonJS support
- This fixes DataTables/DataTables #299
2014-04-11 09:11:13 +01:00
Allan Jardine
56e6f38911 Fix: Destroy error if the table has been destored completely by the user
before calling destory() (i.e. overwriting with HTML)
2014-04-11 09:10:21 +01:00
Allan Jardine
757dbc5524 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-04-11 09:09:47 +01:00
Allan Jardine
bff1276ab6 Dev: PHP output support for markdown, as it is used on the site in a few
places
2014-04-11 09:09:24 +01:00
Allan Jardine
63beec6486 Fix: DataTables/DataTables #281 - Invalidated DOM rows and hidden columns
- When invalidating a DOM row, DataTables wasn't taking into account the
  fact that the columns in the row might be hidden. This means that the
  array of data read is shortened by the number of hidden columns, and
  thus the data is corrupted.

- Fix is to read from the known cells if the row already exists
2014-04-02 14:21:46 +01:00
Allan Jardine
3516626d9a Dev: PHP output support for markdown, as it is used on the site in a few
places
2014-04-02 14:21:28 +01:00
Allan Jardine
683414daba Dev: Add SQL syntax highlighting 2014-04-02 14:21:06 +01:00
Allan Jardine
85111b709c Dev: Plain syntax highlighting 2014-04-02 14:20:46 +01:00
Allan Jardine
6cac556b6a Dev fix: Converting camelCase to hungarian was broken 2014-04-01 13:43:00 +01:00
Allan Jardine
1a0551fd2c Dev: Markdown update for Editor and typo 2014-04-01 11:08:10 +01:00
Allan Jardine
1a5e32295a Fix: When extending the defaults using camelCase, objects didn't work
- Issue here was that when doing the camelCase to hungarian conversion
  on objects, the user object was copying over the hungarian default.
  This meant that parameters were lost and things broke! The fix is to
  decend into the object

- See thread 20233 for the original report
2014-04-01 11:07:47 +01:00
Allan Jardine
09bf9b200c Fix DataTables/DataTables #291 - non-string data support for non-'.' dec
numbers
2014-03-28 08:21:54 +00:00
Allan Jardine
6a033ad09b Fix: HTML sorting formatter should cope with null data 2014-03-26 16:30:51 +00:00
Allan Jardine
af7f2780f4 New: Smart filtering upgraded to support quoted exact match
- DataTables' smart filtering now has the ability to search for an exact
  string, in the given order, over multiple words. This is done by
  providing the exact match search string in quotes - for example:

    Angela "Cheif Exec" London

  Will match three terms - `Angela`, `Cheif Exec` and `London`. Those
  three terms will be matched in any order.

- This matches the search behaviour that we all know and love in Google!

- It can be disabled along with the rest of DataTables' smart filtering
  using the `smart` option.

- This enhancement comes courtesy of Barry Keepence. Original forum
  thread: http://datatables.net/forums/discussion/16250/. Thanks!
2014-03-25 09:49:40 +00:00
Allan Jardine
c5058c36e6 Fix: Extending objects in the API could cause scope errors over multiple tables
- See thread 20075 for the original report

- Basically the issue here was that the object being used for the API
  extension on objects (e.g. `table.ajax` is an object) the object was
  not unique to each API instance, so it was being shared between
  instances and as a result, whatever instance was created last, would
  win!

- Fix is to use a new object each time.
2014-03-24 15:16:32 +00:00
Allan Jardine
fedec2b479 Fix: Inverted logic for column.index() - 20021 2014-03-24 15:16:16 +00:00
Allan Jardine
9fda4f3a3d Fix: Multiple column options for a single column could cause custom type
to be lost

- Without a check on the `sType` option, if there was multiple column
  defintations for a single column, the custom sType could be lost
2014-03-24 15:16:00 +00:00
Allan Jardine
6924ccb237 Update: Update sorting plug-in examples to use enumerated data
- Th old comma as a decimal place plug-in isn't needed anymore since
  DataTables now has that ability built in using the `thousands` and
  `decimal` options
2014-03-24 15:15:44 +00:00
Allan Jardine
e89310fbcf Dev fix: fnOpen should return the child node, not the host row 2014-03-24 15:15:26 +00:00
Allan Jardine
f5103cd6c4 Fix DataTables/DataTables #289 - Filtering can break with \n
- The removal on the \n\r characters should not be dependent upon there
  being HTML enties detected in the string
2014-03-21 08:13:38 +00:00
Allan Jardine
b2a3546402 Fix: Row details show and hide methods should return this 2014-03-20 15:28:58 +00:00
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