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

469 Commits

Author SHA1 Message Date
Allan Jardine
4e30d0ccf7 Fix example: Hidden columns description text had inversed logic for the column state 2014-10-07 15:39:22 +01:00
Allan Jardine
27901e11a4 Fix: If dt-init language.decimal was given as a decimal point, rather than the default decimal sort being performed, decimals were just being stripped 2014-10-07 15:39:06 +01:00
Allan Jardine
6f2092783b Dev: npm now requires the repository parameter
* This fixes DataTables/DataTables #427
2014-10-07 15:38:36 +01:00
Allan Jardine
c46168a91d Fix docs: Reference to dt-init paging was wrong 2014-10-07 15:36:30 +01:00
Allan Jardine
bc06f16e43 Update: dt-api iterator() updated to execute the callback in the scope of an API instance refering to the table in question 2014-09-22 16:41:41 +01:00
Allan Jardine
e0f02604cf Fix: dt-api destroy() when a child row was shown resulted in a JS error
See thread 23516 for more information
2014-09-22 10:50:40 +01:00
Allan Jardine
e0a08d511b Fix examples: SQLServer demo SQL gave a warning about inserting ids on an identify column 2014-09-22 10:50:24 +01:00
Allan Jardine
a8ce572cb3 Fix examples: Deferred rendering SSP example's initial HTML was out of date 2014-09-22 10:50:08 +01:00
Allan Jardine
491945bace Fix - examples: Incorrect column title for some server-side processing examples 2014-09-22 10:49:52 +01:00
Allan Jardine
3f219a38e2 Fix: Numeric sorting for 0 was incorrect
* This fixes DataTables/DataTables #414
2014-09-08 15:14:49 +01:00
Allan Jardine
cda203dbdc Fix: Example SQL database had extension field as an integer. However, that meant that numbers such as 0001 were not correctly saved 2014-09-08 15:14:33 +01:00
Allan Jardine
b1f1b2d961 Dev: Update bootstrap libraries to 3.2 2014-09-08 15:14:16 +01:00
Allan Jardine
4453229416 Fix exampple: Remove rowIndex from select_rows example - not used
Dev: Add comment to rowCallback trigger about undocumented parameters
2014-09-08 15:13:59 +01:00
Allan Jardine
14f5f630c9 Fix: Could not remove a multi-column sort using shift click like you could in 1.9-
This fixes DataTables/DataTables #391
2014-08-28 14:24:16 +01:00
Allan Jardine
3019ab9ec7 Fix: ARIA label for the sorting that will occur next wasn't working correctly 2014-08-28 14:23:59 +01:00
Allan Jardine
32a5bc6aee Fix docs: Typo in processing event example 2014-08-28 14:23:15 +01:00
Allan Jardine
267ab376b8 Update example: Update the select column filtering example to use dt-init initComplete
* There are often questions about why it isn't working with Ajax. it
  will now
2014-08-15 16:29:16 +01:00
Allan Jardine
e3a1d7b9a5 Workaround for dom text sorting 2014-08-06 11:21:27 +01:00
Allan Jardine
3978684f44 Update to 1.10.3-dev 2014-08-06 11:21:07 +01:00
Allan Jardine
f8a66288db Fix: Postgres generated SQL wouldn't allow a row to be inserted by Editor due to an incorrect sequence count 2014-08-06 11:18:44 +01:00
Allan Jardine
7df451fe4c Improved last page calculation.
Improved last page calculation when page size is changed on last page.
e.g. Suppose there are total 12 records and page size is set to 5 records/page. Go to last page, which should be 3, change page size to 10. Page#2 should be selected and it should show 2 records on it.
2014-08-06 11:17:57 +01:00
Allan Jardine
64f979a72b Release 1.10.2 2014-07-31 14:59:26 +01:00
Allan Jardine
3743d6bc28 Dev: Add common shell method to get version string from a JSDoc
commented file
2014-07-31 14:58:33 +01:00
Allan Jardine
a644aa7e21 Fix: Add redrawCalculations option to dt-api columns().visible() and dt-api column().visible() to improve performance in a loop. 2014-07-25 16:26:30 +01:00
Allan Jardine
43118eed49 Fix: dt-api column().search() wasn't returning the search term when not given any parameter (well, it was, but in an API instance which was wrong) 2014-07-25 10:09:44 +01:00
Allan Jardine
fc9d6fac64 Fix - examples: Update the tag CSS to be more readable 2014-07-25 10:09:09 +01:00
Allan Jardine
a19e700582 Fix: When using :visible for the column selector to get visible columns, no columns were returned due to an incorrect regex. Now :visible can be used to get only the visible columns 2014-07-25 10:08:26 +01:00
Allan Jardine
7668646e1e Fix: Regression from 1.10 whereby empty data for a column could cause an offset in the filtering column 2014-07-18 12:11:05 +01:00
Allan Jardine
9f5eb39a2f Dev: Moving on to 1.10.2 development 2014-07-18 12:10:43 +01:00
Allan Jardine
89c4e24698 Fix examples: Search API examples should use consistent terminology 2014-07-18 12:09:54 +01:00
Allan Jardine
c4cdba49e4 Fix example: Use search terminology
* See thread 22268
2014-07-18 12:09:03 +01:00
Allan Jardine
3cd15f1c16 DataTables 1.10.1 release 2014-07-15 11:33:57 +01:00
Allan Jardine
641924cbee Fix: If filtering data is null, undefined or NaN it is not included in the filter 2014-07-15 11:33:39 +01:00
Allan Jardine
39df74eb2c Fix: dt-init createdCell cellData prarameter now passes in the original data for the cell
* This reverts the last commit which documented the old behaviour.
  Thinking again about it, if you want to modify the rendered data use
  `$(cell).html()`.
2014-07-15 11:33:25 +01:00
Allan Jardine
13e33e2177 Fix docs: Add clarification for cellData in dt-init columns.createdCell
* Based on discussion in thre 22009
2014-07-15 11:33:10 +01:00
Allan Jardine
786d79d1a9 Fix: dt-api cell() was not selecting cells for row index 0
* Problem was the check for the index was falsy rather than checking for
  undefined
* See thread 22219 for more information
2014-07-11 10:11:17 +01:00
Allan Jardine
cd920b0605 New: Instance methods for a data source are now executed in the scope of that instance
* When `dt-init columns.data` / `dt-init columns.render` resolve to a
  function, that function is executed. Previously this execution was in
  the global scope, but in order to be able to use an instance as a data
  source for the row (something I wanted as part of 1.10) we need to
  execute the function with the instance's scope. A simple `call()` does
  this.
* I could add a check to see if the `rowData` is a plain object or not,
  but that would add significant overhead to the processing, and this
  particular part of the code needs to be very fast. Additionally, I
  think it is unlikely that any one was dependant on this being executed
  in global scope, so the change is made.
* This fixes DataTables/DataTables #368.
2014-07-10 16:11:29 +01:00
Allan Jardine
264e1f0a60 New: Cell styling classes for alignment of text
* This fixes DataTables/DataTables #371
2014-07-10 14:24:04 +01:00
Allan Jardine
78724dd11d Fix: With deferred rendering enabled a DOM sourced table would create new nodes rather than using the exisiting one. It should be noted that deffered rendering with a DOM sourced table is completely redundant, but it should still use the same nodes.
* This fixes DataTables/DataTables #365
2014-07-10 12:28:49 +01:00
Allan Jardine
c50629a4b5 Fix: Boolean type searching
* 1.10.0 had issues when searching for boolean data as the search
  extension methods were checking for empty data, but if found they were
  using `''` as the term to filter. It should more accurately just use
  the given data.
* Relates, the `_empty()` method was considering `false` to be empty,
  but not `true`. Both are now considered to be empty.
2014-07-10 11:57:26 +01:00
Allan Jardine
ad7963b3dd New: state API methods
* `dt-api state()` - get the last saved state
* `dt-api state.loaded()` - get the state that was loaded when the table
  was created
* `dt-api state.save()` - trigger a state save
* `dt-api state.clear()` - clear the saved state
2014-07-09 16:42:29 +01:00
Allan Jardine
9b8153f1d6 Dev: Fix recent childNode removal when checking for nodes 2014-07-09 09:12:29 +01:00
Allan Jardine
02b6a5c39c Fix: camelCase notation for column search options (dt-init searchCols) wasn't working
* Fix is to convert from hungarian notation to camelCase in a loop for
  the array

New: State staving object structure is now full documentated

* The structure has been altered to be camelCase notation like the rest
  of the 1.10 API. State loaded from older versions of DataTables will
  be silently ignored
2014-07-02 17:01:20 +01:00
Allan Jardine
f907627fe4 Update - performance: API each() itterator uses for loop now
* The native `forEach` is suprisingly slow. I had assumed that it would
  be faster that a for loop, but it appears that due to the function
  execution it is actually much slower. A simple for loop is much better
  for performance and we loose nothing since hte API instance is array
  like.
* This fixes DataTables/DataTables #364
2014-06-27 15:34:54 +01:00
Allan Jardine
4706058c95 Dev: CDN option for when building the examples 2014-06-27 15:24:58 +01:00
Allan Jardine
278147a7ce Fix: IE destroying nodes which have a Javascritp reference on using innerHTML
* It appears that if you have a reference to a DOM node, but that DOM
  node is overwritten by use of innerHTML, the reference is destroyed
  and you cannot use the referenced DOM node any more.
* This became apparent from using Editor's inline editing mode, where in
  IE the inline edit would work only once. No other browser has this
  issue but it is in IE7-DC1.
* The workaround is to remove the child nodes first. not ideal at all,
  but it does work.
* Searching the internet I didn't find much about this so I've opened an
  issue on the IE connect site:
  https://connect.microsoft.com/IE/content/content.aspx?ContentID=29582
2014-06-27 15:24:41 +01:00
Allan Jardine
6f6d113134 Fix example: Range filter didn't correctly handle 0 2014-06-27 15:24:24 +01:00
Allan Jardine
485b44965e Fix example: multi filter needs a way to be cleared 2014-06-27 15:24:07 +01:00
Allan Jardine
777907d7f3 Fix: Nested DataTables could have their events interfear with the parent tables
* DataTables uses custom jQuery events which propagate up through the
  DOM, with the custom event being triggered on the table node. Ideally
  I'd like to change the event handling to use $().triggerHandler() to
  avoid this issue, but as discussed in issue #245 that would mean that
  delegated events wouldn't work. Perhaps there should be two forms of
  events triggered by DataTables, those which do bubble and those which
  do not. `init` is the only one which would _have_ to bubble.
* The workaround for the moment is to check that the settings object in
  context of the executed settings handler is the same as the one that
  was used in the addition of the event handler.
* This fixes DataTables/DataTables #361
2014-06-24 16:31:19 +01:00
Allan Jardine
f0094e9aa1 Fix: When storing a column's width, DataTables was truncating the CSS unit identifer to a single character (e.g. 12px was held as 12p). This caused issues with column size adjustment
* In particular this fixes the FixedColumns + ColReorder example which
  was showing the problem by expanding the columns to the full container
  width for each column. See thread 20848 for information.
2014-06-24 15:03:57 +01:00
Allan Jardine
eaef26a11f Fix: Use self:: for static method references in SSP class
* This fixes DataTables/DataTables #359
2014-06-23 15:35:54 +01:00
Allan Jardine
c06dd8eaba Dev: Fix build errors found while working with the Responsive extension 2014-06-23 15:35:12 +01:00
Allan Jardine
5d4d4f39d7 New: compact and no-wrap styling classes for the DataTables stylesheet
* `compact` reduces the padding on the cells in the table to increase
  the information density.
* `no-wrap` disabled white space text wrapping
2014-06-23 15:34:52 +01:00
Allan Jardine
b2509005ab Fix: Percentage columns detected as date columns in Chrome
* V8 strips unknown characters not only at the start of a string given
  to Date.parse() but also at the end. So `10%` (for example) was being
  detected as a date type.
* This fixes DataTables/DataTables #354
2014-06-20 08:49:58 +01:00
Allan Jardine
84686a5b30 New: row().class() when given with a class, the class is added to the -tag tr element as well as the -tag td element 2014-06-19 13:38:38 +01:00
Allan Jardine
5c08c74d24 Fix: Event methods automatic addition of .dt namespace was greedy
* Need to ensure that the `.dt` namespace is still added to external
  namespaces such as `.dtr`.
2014-06-19 10:18:47 +01:00
Allan Jardine
8e71c39929 Fix example: DOM sorting plug-in wasn't sorting correctly for numeric values
* This fixes DataTables/DataTables #352
2014-06-19 10:18:27 +01:00
Allan Jardine
73ed6c4725 New: Add dt-api table().container() and dt-api tables().containers() methods to get the container -tag div elements for table(s)
* This is likely to be of more interest to plug-in authors rather than
  for general DataTables usage, but I've found myself wanting it a
  couple of times recently for plug-ins.
2014-06-18 14:50:56 +01:00
Allan Jardine
c38e140a52 Fix: number renderer displayed numbers incorrectly for negative numbers 2014-06-18 14:24:30 +01:00
Allan Jardine
4447b84c34 Dev: Restore row details example to use 1.10.0 api 2014-06-18 13:45:27 +01:00
Allan Jardine
2a97165e37 Dev: Remove code that isn't required from _fnAjaxUpdate 2014-06-18 13:45:10 +01:00
Allan Jardine
7bca91d1b5 Fix: Memory leak with child rows in a table that is destroyed
New: `dt-api row().child.remove()` and `dt-api row().child().remove()` methods to provide the ability to remove and destroy child rows
Fix docs: Note that the row().child() method's return value can have an effect on the chaining

* This fixed DataTables/DataTables issue #326.
* Special thanks to `Scottmitch1` (on github) for help with this one!
2014-06-18 12:23:50 +01:00
Allan Jardine
097f45855f Dev: Modify the API extender to remove a potential closure issue
Dev: Modify the initialisation of _Api - the old method of using `=`
twice on a row caused Chrome's debugger to show it as both names
concatinated which was confusing.

Fix: Remove API "build" code. That was part of the API prototype and the
design moved away from that approach. The code was redundant and unused.
2014-06-18 12:23:31 +01:00
Allan Jardine
6b12300c69 Fix: Row selector for page:all, order:index, search:applied was returning the data in index 1 only
* A simple logic error was causing this
* This fixes DataTables/DataTables #348
2014-06-18 12:22:34 +01:00
Allan Jardine
c5414152ed Fix example: When there is no data, can't use reduce in footer callback 2014-06-18 12:22:16 +01:00
Allan Jardine
1d159700bd Fix: number rendering helper couldn't use anything thing other than a dot (.) as the decimal place
* See thread 21315 for details
2014-06-09 14:38:34 +01:00
Allan Jardine
2300aa8ff5 New: dt-init language.searchPlaceholder option. Adds a placeholder attribute to the search -tag input element when set.
* This fixes DataTables/DataTables #316.
2014-06-06 16:30:52 +01:00
Allan Jardine
e8bd8b21bc Docs: Update description of the data() setters for how they effect the
table
2014-06-06 16:30:37 +01:00
Allan Jardine
6423ab7d67 Fix: IE9 throws an error when using document.activeElement in a frame
* See thread 21536 for more information
2014-06-05 15:29:44 +01:00
Allan Jardine
429feaad86 Docs: Improve the documentation of smart filtering in DataTables
* Explain what smart filtering is
* How it can effect passed in regular expressions
* Improve column().search() examples to show one with smart filtering
  and one with exact matching.
* API examples updated to match the examples given in the documentation
* This fixes DataTables/DataTables #344
2014-06-05 09:37:07 +01:00
Allan Jardine
c6619c64f9 Fix: Remove redundant code from the column visiblity method
* This fixes DataTables/DataTables #340
2014-06-05 09:36:52 +01:00
Allan Jardine
23b3c847ee Dev: Restore jQuery 1.11.1 - was removed by mistake in a previous commit 2014-06-05 09:36:36 +01:00
Allan Jardine
9243418e5f Fix examples: Pipelining - incorrect display if Ajax data retrieved and page not at the start of the retrieved block
* See thread 21402 for more information
2014-05-30 11:10:52 +01:00
Allan Jardine
3fd28eba98 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-05-30 11:10:36 +01:00
Allan Jardine
c1e40d7e10 Fix link to serverSide in selector-modifier.xml 2014-05-30 11:10:06 +01:00
Allan Jardine
56f59a3a33 Fix examples: Uuse a more selective operator for the class control in row details examples
* This fixes  DataTables/DataTables #336
2014-05-30 10:31:17 +01:00
Allan Jardine
3ea905201b Fix: Custom filter was running through the rows in reverse
* Originally this was done because it makes removing items a little bit
  easier with Array.splice(), however, it doesn't make any sense to go
  through the rows in reverse if there might be an interdependency
  between the rows.
* It has never been documented what order the rows are filtered in, so I
  think this is a safe change to make.
* I've also added the row display index to the parameters passed in
2014-05-27 15:42:20 +01:00
Allan Jardine
96b7ef9176 Fix: Hold the scrolling position if holding the draw position
* This fix was partly committed earlier by mistake [b7feaa2]
* The fix is simply to store the draw hold state and make use of it in
  the draw scroll callback.
2014-05-23 16:31:25 +01:00
Allan Jardine
501ed72cee Dev: Remove debug from last commit... 2014-05-23 16:31:09 +01:00
Allan Jardine
00a99a0037 Fix: IE8 events error
* In IE8 if the DataTables width calculation functions were being
  triggered DataTables would clone the table node and then do a jQuery
  $().remove() on the cloned node. This was bad in IE8 as it meant that
  on the remove the events that were attached tot he original table were
  removed as well as the ones on the clone table. IE8 must retain some
  kind of link between the original and clone nodes. Using jQuery's
  clone() method resolves this.
* See thread 21040 for more information
2014-05-23 16:30:53 +01:00
Allan Jardine
de1d6541ef Fix: Remove escaping of quotes for search input
* Previously the filter builder was created as a string, so we had to
  escape quotes, otherwise it could create invalid HTML. That is no
  longer the case as we are using jQuery DOM manipulation, so the escape
  is redundant and potentially harmful
* See thread 21197
2014-05-23 16:30:37 +01:00
Allan Jardine
d6b54b4cde Fix: Length menu language with wrapper element wasn't correctly populated
* Due to the manipulation of DOM elements rather than strings for the
  length list, the browser was cropping elements which were being cut
  short. Fix is to switch back to string manipulation, which can be done
  easily using the outerHTML property of the DOM element. This is
  supported in all browsers since Firefox 11, so happy to use it here.
* See thread 21170 for more information
2014-05-20 08:36:53 +01:00
Allan Jardine
36e1e86297 Fix examples: Typo in complex header example 2014-05-20 08:36:37 +01:00
Allan Jardine
7100d34d9f New: Give cell position information to dt-init columns.data and dt-init columns.render
* The two data handling functions for each column are now given a forth
  parameter if you are using them as a function. This new parameter
  gives index position information about the cell in question, as well
  as access to the settings object.
* This additional information allows abstraction functions to be created
  external to DataTables that can be reused for different columns, with
  those abstraction functions now having access to the information about
  the cell they are operating on. For example, you might have a number
  formatting function which can be reused, and it will determine what
  data to read based on the column index given.
* This additional information is required in order to be able to fully
  replace fnRender which was removed in DataTables 1.10.
* This fixes DataTables/DataTables #321
* Documentation updated, including an error fix for columns.data
2014-05-16 11:50:36 +01:00
Allan Jardine
4d1a25e176 Dev fix: Passing in order as a single array resulted in not being able
to order any other columns

* See thread 21073
2014-05-16 10:44:48 +01:00
Allan Jardine
d1b7c15426 Fix: Invalidation of DOM sourced rows caused a memory leak
* The error was that the registered cells array was growing on every
  call, so the processing took longer and the memory usage went up
* See thread 21063 for details
2014-05-16 10:12:41 +01:00
Allan Jardine
d8860b215e Fix: Support escaping objects with more than one dot 2014-05-15 15:49:07 +01:00
Allan Jardine
391e39266f Dev: Slight change for the styling of the tabs in the demos 2014-05-15 10:11:01 +01:00
Allan Jardine
48ae36e24c Dev: Syntaxlighting without a specific brush should still be enhanced from MD 2014-05-15 10:10:45 +01:00
Allan Jardine
46e2b0a0db Update: jQuery 1.11.1 2014-05-15 10:10:04 +01:00
Allan Jardine
f7a58ca938 Fix: Search via the API wasn't populating the search input
* This fixes DataTables/DataTables #323
2014-05-15 10:09:17 +01:00
Allan Jardine
a68379f7de Fix: Compatiblity with jQuery 1.7.0+
* jQuery before 1.8 didn't like append being given an array of mixed
  nodes and elements
* This fixes DataTables/DataTables #320
2014-05-15 10:08:56 +01:00
Allan Jardine
53090ad85a Update: jQuery to 1.11.1 2014-05-15 10:08:11 +01:00
Allan Jardine
6d10993421 Fix example: JS array data source had invalid HTML 2014-05-15 10:06:43 +01:00
Allan Jardine
d907cc6ceb Fix: dt-init sorting as 1D array didn't get indexing correct
* The sort handler was expecting to deal with a 2D array, so we always
  dropped into the single column first sort condition.
* See thread 20811 for more information.
2014-05-15 10:06:06 +01:00
Allan Jardine
77343b72cb Fix: Column ordering state saving was being flatten
* $.map will flatten the return array, which we do not want
2014-05-06 15:25:26 +01:00
Allan Jardine
3dc23c436d Moving on to 1.10.1 development 2014-05-06 15:25:13 +01:00
Allan Jardine
3cb0e3aa3f DataTables 1.10.0! 2014-05-01 11:45:37 +01:00
Allan Jardine
4550cc88bf Fix: Sorting disabled class wasn't being added to the header cells when
sorting is completely disabled
2014-05-01 11:44:47 +01:00
Allan Jardine
06b1195376 Fix: Backwards compatiblity for the old bEscapeRegex option - which has
now been replaced with the more sensible bRegex option
2014-05-01 11:44:13 +01:00