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

1729 Commits

Author SHA1 Message Date
Allan Jardine
c4986625c8 Fix: Improved DOM ordering for scrolling tables - colgroup, thead, tfoot
- Fixes DataTables/FixedColumns #8
2016-02-03 11:43:48 +00:00
Allan Jardine
4367cfb6bf Dev: Marking Semantic UI, Bootstrap 4 and Material Design integrations as tech previews 2016-02-03 11:43:17 +00:00
Allan Jardine
bda57baa83 New: Google Material Design implementation tech preview
- Trying to gauge the level of interest
2016-02-03 11:42:46 +00:00
Allan Jardine
386150893a Fix: Javascript error would occur if trying to use dt-api cells().nodes() on a cell that doesn't exisit in the DataTable
- Fixes DataTables/KeyTable #23.
2016-02-03 11:41:22 +00:00
Allan Jardine
f963bba252 New - dev: Semantic UI integration with DataTables
- Still lots to do such as the sorting icons and extensions
2016-02-03 11:40:54 +00:00
Allan Jardine
60745afb14 New: Bootstrap 4 integration with DataTables
- Bootstrap 4 is currently in beta so things can, and probably will
  still change. Bootstrap 4 packages for DataTables won't be made
  available until at least a beta release of Bootstrap 4.
- A few things have changed in Bootstrap 4 and rather than trying to
  make the exisiting Bootstrap files work for both BS3 and BS4 it makes
  sense to offer both. We'd need to detect which version of BS is loaded
  and that can be quite unreliable (and delayed since the body would
  need to be available).
- Pagingation requires a couple of classes, but no change in structure
- BS4 don't include icons any more, so need to use UTF8 arrows to show
  sorting (don't particularly want other dependencies, although it is
  easy to add with CSS if you want more icon control)
- Outstanding issue: The select element for paging control is not of a
  consistent height with the search input. This appears to be a
  Bootstrap issue: https://github.com/twbs/bootstrap/issues/17194
2016-02-03 11:40:26 +00:00
Allan Jardine
f8e2c9928d Fix: Remove legacy TableTools integration from Bootstrap file 2016-02-03 11:39:57 +00:00
Allan Jardine
fea6c50408 Fix - example: Add a link to feature plug-in documentation for the dom example 2016-02-03 11:39:05 +00:00
Allan Jardine
b7868ad218 Update: Update jQuery to 1.12.0 2016-01-22 11:26:18 +00:00
Allan Jardine
ef7b2e13ec Dev: Disable syntax highlighting for IE8 2016-01-22 11:25:51 +00:00
Allan Jardine
aec81fd557 Fix - styling: Integration with Foundation 6
- F6 changes the paging control (for the better) to require that there
  be no `a` tag for the elements which can't be clicked on in the pager.
  Unforuntately F5 requires them, so we need to detect which one is to
  be used. This is done using a meta tag based on this discussion:
    - http://foundation.zurb.com/forum/posts/36681

- F5 remains the main version for the moment, but will be bumped to F6
  when the next version of DataTables is released
2016-01-22 11:24:53 +00:00
Allan Jardine
8fbefe961f Dev: Tidy up Bootstrap example description 2016-01-22 11:24:27 +00:00
Allan Jardine
af95119318 Dev: Version bump to dev 2016-01-07 15:33:02 +00:00
Allan Jardine
9563278a4a Fix: Potential column misalignment when scrolling with footer content that defines the width
- The scrolling body used to have the header content retained but
  hidden, while the footer was just emptied. But if the footer content
  is long enough to define the width of the column this results in
  column misalignment.
- Fix is to treat the footer in the same way as the header is.
2016-01-07 15:32:39 +00:00
Allan Jardine
f3fc3cd64e Fix: Remove redundant code in column visibility. Could cause slower performance
- Thanks sameeralikhan - thread 32212
2016-01-07 15:28:39 +00:00
Allan Jardine
344565a03d Fix: Column widths are not only applied to the DataTables detected headers when scrolling is activated. This will have no change on most tables, but for those with complex headers it prevents potentially contradictory sizes being applied which can result in column misalignment. 2016-01-07 15:28:13 +00:00
Allan Jardine
6c9c5433eb Fix: dt-api cell().data() would not return null values for cells if defaultContent was set. It should return the original data point for that cell, even if it is null. This also effects dt-api column().data() and their plural counterparts. 2016-01-07 15:26:52 +00:00
Allan Jardine
906cfe3b93 Dev: Update example SQL so that the start_date default is null. This
doesn't effect the DataTables demos since the inserts all have values
for this field. It is done for Editor which can use this table for
editing and it simplifies the MySQL aspect.
2016-01-07 15:26:27 +00:00
Allan Jardine
b7c671444d Fix: The number rendering helper will now automatically escape HTML entities to help prevent possible XSS attacks if using a number renderer.
Rational for this is that the number renderer expects a number
input, not HTML, but if non-numeric input is given the value is just
returned (now escaped) - for example an empty string.
2016-01-07 15:24:53 +00:00
Allan Jardine
56686c8c96 Dev: Add clear to syntax highlighter for site styles 2015-11-17 11:17:38 +00:00
Allan Jardine
1de8c33e25 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2015-11-17 11:16:46 +00:00
Allan Jardine
3b83535986 Fix - example: Column / row hover highlight example had redundant code 2015-11-17 11:15:25 +00:00
Allan Jardine
2ce2276f5c Fix - example: Typo in Ajax with deep objects description
Thread 31330
2015-11-17 11:14:51 +00:00
Allan Jardine
4d25479434 Shorter way to get the column title
I'd be happy for the change to be released under the MIT license ;)
2015-11-17 11:13:58 +00:00
Allan Jardine
021f0d0c7d Merge pull request #729 from lloy0076/patch-1
Fix - readme: Typo in "readme"
2015-11-15 20:23:22 +00:00
David Lloyd
409c905449 Use the "plug-in" interface rather than the "pug-in [sic] interface".
No pugs were harmed in this change!
2015-11-15 22:13:41 +10:30
Allan Jardine
e245645544 Version - 1.10.10 ready 2015-11-06 15:34:24 +00:00
Allan Jardine
817ba877ed Fix - styling: jQuery UI - don't override text colour
- Thread 31246
2015-11-06 14:53:29 +00:00
Allan Jardine
c4f9792c07 Dev: Remove debug line 2015-11-06 14:39:04 +00:00
Allan Jardine
fdaa840642 Dev: Ordering of example sections for Editor and Buttons
- This really needs to be pulled out into the XML
2015-11-06 14:38:34 +00:00
Allan Jardine
6f67df2d21 New: $.fn.dataTable.render.text renderer method that can be used to help prevent against possible XSS attacks. It will basically encode HTML entities so they are shown in the rendered view rather than being written directly as HTML.
Update: `$.fn.dataTable.render.number` will now return the original value rather than NaN if the value cannot be parsed as a number.
2015-11-06 10:40:50 +00:00
Allan Jardine
369214c777 Fix - examples: Write the code to be displayed in the server load code tab as text so any HTML entities will be escaped 2015-11-06 10:40:22 +00:00
Allan Jardine
06a6a0c429 Dev: Add a plugin-init event which is triggered immediately prior to init
- This is so that Buttons (and others) can listen for this event and
  create the buttons before the user init functions. Otherwise they
  would need a setTimeoutout to be able to access the Buttons methods
  immediately.
2015-11-04 16:33:00 +00:00
Allan Jardine
b36cbc745b Update: Allow a window to be passed in for CommonJS factory which gives DataTables the ability to be used in a headless environment (server-side rendering for example)
- Factory builder redesigned to pass in window and document to the
  factory method, mandating a small update to the AMD and Browser
  loaders
- Main change in is the CommonJS loader which can now optionally have a
  window object passed in - if it is not passed in `window` will be used
  (if this is the case in a CommonJS environment without a root object
  being passed in an error will occur).
- DataTables caches a reference to the jQuery instance so the plug-ins
  can easily reference jQuery while retaining their current return of
  the module they define. This basically means that DataTables core will
  include jQuery for the plug-ins.
- This does increase the core library size by ~160 bytes which is rather
  frustrating, but I think this is the correct way to go about it
- With thanks to Evan Carroll for input on this:
  https://github.com/DataTables/Plugins/issues/199
2015-11-03 16:32:39 +00:00
Allan Jardine
8fe17acf82 Update: A dt-init scrollX table is now allowed to collapse horizontally - simply don't specify style="width: 100%" or width="100%" for your table in the HTML and it will be allowed to collapse if the columns are smaller than the space required.
Fix: Force a column width if `dt-init scrollX` is specified and a column width is given. This can be overruled if the width given is too small for the content

- We already use the width attribute to determine if the table should
  resize dynamically to 100% width, so it makes sense to use that when
  scroll-x is enabled as well.
- This still isn't perfect as Chrome seems to change between a
  box-sizing calculation depending if scrolling is required or not so
  there can be a shift in column widths when changing between a
  scrolling state and not (column visibility) which is ugly, but is
  proving to be difficult to deal with.
2015-11-03 16:32:10 +00:00
Allan Jardine
c2e59f43f6 Fix docs: Update dt-init footerCallback example to include a default value 2015-11-02 11:04:01 +00:00
Allan Jardine
ab982a537e New: dt-init language.aria.paginate options which can be used to specify ARIA label attributes for the pagination buttons. Particularly useful if you wish to use icons in place of the button text. 2015-10-28 11:38:01 +00:00
Allan Jardine
b9bdc5eb11 Fix: dt-api page.info() reported the page length as 10 when paging was disabled - should be -1 2015-10-28 09:03:41 +00:00
Allan Jardine
66893ae170 Update: Add column index information to the Requested unknown parameter error message to provide additional debug info 2015-10-28 09:03:15 +00:00
Allan Jardine
8adcf16743 Fix: Column alignment errors in IE due to sub-pixel rendering issues. Basically this came down to the width of the table not equalling the width of the cells in the table and if the column widths assigned and the table width assigned did not match perfectly, IE would ignore the column widths assigning and layout as it saw best. Now the column width calculation will remove this sub-pixel issue by rounding up and also keep a track of the table width itself rather than reading from the DOM.
Fix: ` ` in cells could cause column alignment errors as it was being counted as 6 characters rather than 1 in the find longest string method.
2015-10-27 12:05:03 +00:00
Allan Jardine
c55f460e6d Dev: Removing the Chrome workaround - this appears to be extremely hard
to reproduce the error and it is only occuring on Chrome Mac with a
combination of the CSS in the DataTables demos specifically. This is an
edge case that I'd rather not add code for at the moment.
2015-10-22 11:39:02 +01:00
Allan Jardine
40dda9c24f Fix: If dt-init scrollX is enabled for a table that doesn't need horizontal scrolling, but does have vertical scrolling, when the table is filtered to have no vertical scrolling the columns would be misaligned due to the column widths not being recalculated for the new table width.
Fix: Chrome has an odd bug whereby the max-height needs a reflow in order to be correctly calculated - otherwise a gap could appear at the bottom of the table

- Haven't been able to reproduce the Chrome issue in a simple test case
  - its something to do with the scrollbars being shown while the scroll
  column calculations / updates are being done and then no longer
  being needed ater that point.
2015-10-22 11:18:39 +01:00
Allan Jardine
b2f1dd5d99 Fix - CSS: jQuery UI styling with cell-border class and scrolling enabled could have the columns looking like they are slightly misaligned (1px) due to an incorrect border assignment
- Need to have the border modification in the header match how the body
  works - i.e. on the left do the collpase
2015-10-21 09:44:22 +01:00
Allan Jardine
727937c836 Dev: Fix whitespace issues from #57 - looks like a merge diff error
Dev: Code style updated to match DataTables (unwritten!) standard
Dev: Removed some of the protection on the cell index update on row
  delete - it is safe to assume that since we have a cell node, we've
  assigned an index to it.
2015-10-13 15:31:07 +01:00
Allan Jardine
00100f5afe Merge pull request #57 from strang91/master
Updated: Performance improvement by caching cell indexes for use with cell selectors
2015-10-13 15:30:38 +01:00
Allan Jardine
3b867f209c New: Pass the recalculation parameter through to the dt-event column-visibility event allowing listeners to optimise for it 2015-10-13 15:30:18 +01:00
Allan Jardine
e8fc79f858 Fix: Bootstrap and Foundation integration XHTML error for ellipsis entity
- From @dstoeckel DataTables/Plugins/pull/225
2015-10-13 15:29:49 +01:00
Allan Jardine
6fc22e712d Fix: Some reset stylesheets will set vertical-align:baseline on all elements, which causes the header cells in a table body to be visible. 2015-10-13 15:29:01 +01:00
Allan Jardine
08d61efa63 Dev: Naming for AMD and CommonJS loaders set to a unique value that will be useable on bower and npm due to no conflicts.
- Using just `datatables` would be difficult since I and others already
  publish packages with that name. Anyone using those packages already
  would run into real issues if I were to change their meaning and
  contents!
2015-10-13 15:28:14 +01:00
Allan Jardine
954a3b080b Update cell node indexes when removing a row 2015-10-13 15:26:36 +01:00