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

1100 Commits

Author SHA1 Message Date
Allan Jardine
79f969ef58 Fix: dt-api $.fn.dataTable.isDataTable() could give incorrect results if a table did not have scrolling enabled 2015-03-18 16:53:25 +00:00
Allan Jardine
2ee5b3e7f6 New: dt-api init() method for plug-in developers to get the initialisation options configured for the DataTable 2015-03-18 16:53:07 +00:00
Allan Jardine
9896d0295d Fix: If the thead contained a table the selector that was looking to find the first row in the table was selected the row from the header table rather than the tbody. This could cause errors such as HTML5 data-* attributes not being detected.
This fixes DataTables/DataTables #508
2015-03-12 10:29:16 +00:00
Allan Jardine
825877f157 New: dt-api rows().every(), dt-api columns().every() and dt-api cells().every() iterator methods to make it easier to perform operations on the table elements. This is done by setting the context of the callback provided to be the singular expression for the table elemtn in question. This basically means you can access the singular methods from this - e.g. this.data() will get the data for the element, this.node() will get the cell when using dt-api cells().every() etc. The exisiting interator methods of dt-api each() and dt-api iterator() remain, and each has its own place for optimial usage of the API, but it is likely that the majority of use will switch to focus on these new methods. The examples in the rest of hte documentation has been updated to reflect this fact. 2015-03-03 15:42:36 +00:00
Allan Jardine
0942fa38a6 Fix: dt-api cells() when given a selector options object in the first parameter was incorrectly applying the selector for the cells. 2015-03-03 15:42:22 +00:00
Allan Jardine
7ef92e4f56 Fix: The initalisation object was being cloned on init which could cause a major performance hit if you pass in a large data set into dt-init data. The table node and internal API reference also should not be cloned.
* Thank you to B Lyon for spotting this issue and writing it up:
  http://www.nowherenearithaca.com/2015/03/avoiding-performance-gotcha-with-jquery.html
2015-03-02 13:25:51 +00:00
Allan Jardine
16c48ad4bf Fix: dt-event xhr was not being emitted when dt-init ajax was being given as a function 2015-02-27 15:12:46 +00:00
Allan Jardine
ee9ca0336e Fix: Scrollbar left detection wasn't allowing for sub-pixel rendering which occurs when browsers are zoomed
* This refers to DataTables/DataTables #479 and DataTables/Scroller #44
2015-02-27 12:00:43 +00:00
Allan Jardine
b1ff92a274 Fix: Error in the detection of style="width:..." attributes. DataTables was reading the pixel value that it had written if the columns were recalculated. Now only percentage values are used from the style width.
* This fixes DataTables/DataTables #501
2015-02-25 10:48:22 +00:00
Allan Jardine
c6be28ef8f Call _fnAjaxDataSrc before setting recordsTotal
_fnAjaxDataSrc will in turn call _fnGetObjectDataFn, which
can be specified by the dataSrc method.

This way the dataSrc can set the recordsTotal parameter on
the json data and the changes will be read into the
recordsTotal/recordsFiltered variables.
2015-02-19 13:38:14 +00:00
Allan Jardine
62da8efbca New: The dt-init ajax.data option, when used as a function, now has the DataTables' settings object passed in as the second parameter, which can be useful to access the API if needed 2015-02-19 13:37:57 +00:00
Allan Jardine
a1458bf80c Fix: Legacy API fnDraw was incorrectly handling the case when false was passed in.
* See DataTables/DataTables #499
2015-02-17 15:00:24 +00:00
Allan Jardine
b433f105a3 Fix: Due to use of an HTML entity, DataTables could fail on XHTML pages 2015-02-17 10:29:09 +00:00
Allan Jardine
f1b561ec53 Fix: dt-init columns.orderData wasn't working if given as an integer 2015-02-12 14:11:37 +00:00
Allan Jardine
15991a26eb Dev: 1.10.5 version 2015-02-12 14:11:18 +00:00
Allan Jardine
6fbd6a9c46 Dev: Firebase database in example documentation rather than AIR (outdated) 2015-02-12 14:10:38 +00:00
Allan Jardine
2c67caad44 Fix: Exit out of the extend API method if possible, for performance 2015-02-10 14:26:37 +00:00
Allan Jardine
34fb1cb18a Dev: Add buttons object to .ext for future buttons extension 2015-02-10 14:25:57 +00:00
Allan Jardine
c98854def4 Fix - example: Dro the http protocol from the i18n CDN file loder example so it works over https 2015-02-10 14:25:16 +00:00
Allan Jardine
d6f46dffbb New: DataTables intialisation options can now be specified using HTML data-* attributes on the HTML <table> tag and on the cells of the column headers in the table.
* A new example of this is included
* Fixes DataTables/DataTablesSrc #9
2015-02-06 16:35:34 +00:00
Allan Jardine
4039e77a6f Fix: In IE9 where the table is in an iframe paging elements were not added until after the first draw
* See thread 23915 for details and kudos to helenm for the research into the issue
2015-02-04 16:11:59 +00:00
Allan Jardine
7a26c5d4c8 Fix: When detecting is the table has a width attribute we can also use style.width to check if a width as been assigned using the style attribute. This doesn't work for reading CSS assigned information, that would require parsing the stylesheet` but it does mean there is a way of doing this with using deprecated attributes. 2015-02-04 10:55:43 +00:00
Allan Jardine
c7e18c4236 move eq jQuery selector outside of selector 2015-01-22 10:21:30 +00:00
Allan Jardine
744155653e New: dt-init ajax.data can return a string to be used as the request body. This is useful for submitting a JSON string to the server.
* This is actually compatible with 1.10.0+ but was never documented (it
  wasn't an intended feature, but rather an implementation detail. It
  is rather useful though, so is now documented.
2015-01-11 16:27:15 +00:00
Allan Jardine
d65dd47fe6 New: where condition controls for the example PHP server-side processing class (SSP). This takes the form of a new complex method (to compliment the exisiting simple method) which accepts where parameters that can be used for either user based filtering, or server based filtering. 2015-01-11 16:26:59 +00:00
Allan Jardine
be061edb7b Dev: Remove accidentally committed debug 2014-12-22 17:14:02 +00:00
Allan Jardine
7c07b80222 New: Improved error handling - $.fn.dataTable.ext.errMode can now be:
* `alert` - Alert the error
 * `throw` - Throw an error
 * `none` - Do nothing
 * A function that is called

New: `dt-event error` event that is triggered when an error occurs (regardless of the value of `$.fn.dataTable.ext.errMode`
2014-12-22 16:15:10 +00:00
Allan Jardine
1c95f9fe06 Dev: Remove debug 2014-12-15 15:46:24 +00:00
Allan Jardine
25ceef46ab Fix: When initialising a table and checking it it already exists, we should check against header and footer elements as well, so they can be used as the selectors
This fixes DataTables/DataTables #467
2014-12-15 15:13:08 +00:00
Allan Jardine
90ce3773f5 Fix: When detecting HTML5 attributes need to check for null from getAttribute, since otherwise empty strings would fail.
See thread 24802
2014-12-02 10:37:40 +00:00
Allan Jardine
31670cc1c5 Fix: dt-api $.fn.dataTable.isDataTable() wasn't working correctly on scrolling tables when the header or footer table was passed in 2014-11-24 10:51:01 +00:00
Allan Jardine
cb957c019e Merge pull request #22 from bjmiller/master
Fix for CommonJS/Browserify
2014-11-18 17:10:50 +00:00
Allan Jardine
cd2423d21a Fix #23: Attach the scroll event for the header alignment using the DT namespace to ensure that it is removed on destroy 2014-11-18 17:10:34 +00:00
Allan Jardine
dd7fbeb0a7 Fix for CommonJS/Browserify
I'm not sure whether this breaks any other CJS implementation, but the only one you're likely to have to worry about is Browserify.

This relates to https://github.com/DataTables/DataTables/issues/434
2014-11-18 17:10:18 +00:00
Allan Jardine
3a22a082c3 New: DT_RowAttr special parameter for row data to be able to set abstract parameters for the row. This compliments the exisiting DT_RowId, DT_RowClass and DT_RowData parameters.
Thanks to Jifer in thread 24534 for this suggestion
2014-11-12 10:09:17 +00:00
Allan Jardine
d83f47cfb5 Fix: dt-api $.fn.dataTable.util.throttle() was missing the first call.
Dev: Moving on to 1.10.5-dev
2014-11-11 14:14:11 +00:00
Allan Jardine
06c1cbebde DataTables 1.10.4 release 2014-11-07 15:17:44 +00:00
Allan Jardine
9841c3f038 Dev: Fix return case for column visiblity: 2014-11-07 15:17:29 +00:00
Allan Jardine
f4d1495a2c Dev: Tests for the cell invalidation update 2014-11-07 15:17:14 +00:00
Allan Jardine
24761003f3 Fix: dt-api cell().invalidate() and dt-api cells().invalidate() now invalidate only the cell(s) in question and not the whole row.
Previously the whole row was invalidated as a quick workaround for what
I would would be a complex task, but the solution is actually relatively
simple and small in code size, reusing much of the current invalidation
code. The cache data for the whole row is still removed, but the
important part of minimising the DOM interaction is in place.
2014-11-07 12:28:44 +00:00
Allan Jardine
0e0acbd521 Dev: Code type
* Fixes DataTables/DataTables #448
2014-11-05 11:44:05 +00:00
Allan Jardine
fb6a7be880 Fix: Selector errors when using jQuery selectors with dt-init deferRender enabled
Fix: Incorrect returns from sub-methods if a selector does not contain any results (DataTables/DataTables #431)
Update: `dt-api iterator()` has a fourth parameter to indicate that a return value is expected

The basic issue here was the `iterator()`'s automatic check to see if a
new API instance should be returned or not. If there are no results from
a selector the iterator will just use the original API instance to
return, but this isn't correct as we expect an empty result set in this
case. This is partly due to the fact that the top level methods (`row()`
for example) will return 2D arrays, while the child methods will flatten
the results, this is parhaps an error in the API, but too late to fix
now.

To address this, `iterator()` now has a parameter to tell it if a new
instance should be used or not. I debated about a new method
`iteratorNew()`, but I think this is just as clear (which isn't very
clear unfortunatly, but just needs to be made clear in the
documentation, which I've updated for this change).

I've added tests for the selectors with `deferRender` enabled. The test
suite is still in desperate need of update...
2014-11-03 15:18:18 +00:00
Allan Jardine
e92582b45a Fix: Page length change will now attempt to keep the start point on the current page, but will shift that row's position away from the start point, so that the paging is always consistent in its display. Without this changing the page length could result in landing on page "1.4" (or some other partial page) that you could never get to with just paging alone. That is no longer possible in DataTables.
This is something that has been in DataTables since the version first
vresion and was contentious at that point so while this is a minor code
change, for me it is quite a big change! I feel that this is the correct
operation now, although it does result in rows being moved around where
they might not be needed to if partial pages could be used.
2014-10-30 15:15:20 +00:00
Allan Jardine
e62a747c2e New: dt-api $.fn.dataTable.util.escapeRegex() utility method for escaping regular expressions
Update example: Use the new `dt-api $.fn.dataTable.util.escapeRegex()` method to escape regex characters in the search input filter example
2014-10-30 11:26:34 +00:00
Allan Jardine
5c77a02f29 Fix: -tag caption was being inserted into the wrong elements when scrolling is enabled 2014-10-21 16:35:48 +01:00
Allan Jardine
eed543f566 Fix: jQuery references should be made to the aliased $.
Originally from DataTables/DataTables/pull/437
2014-10-21 09:31:24 +01:00
Allan Jardine
50d1466cfe Fix: If the language file fails to load, continue on as best we can. See thread 24046
Dev: Update the language init code to be a little more compact
2014-10-16 10:50:33 +01:00
Allan Jardine
744b6a901b Fix: When filtering HTML tags should be striped and were for a simple html type, but the html numeric types were not also receiving this treatment and thus the tags were included in the filter. This resolves that issue by adding search formatters along with sort formatters when the decimal place is known 2014-10-10 11:20:05 +01:00
Allan Jardine
1c3f7edfc2 Fix: Columns with mixed string and HTML types were not being detected as HTML type due to an early break 2014-10-10 10:54:25 +01:00
Allan Jardine
e06931ee0b Fix example: Improve code for multi-column select example 2014-10-10 10:54:11 +01:00
Allan Jardine
fa89685d8b DataTables 1.10.3 2014-10-09 16:21:39 +01:00
Allan Jardine
0d92daf10f Dev: Remove debug line 2014-10-09 16:21:24 +01:00
Allan Jardine
9fa68d564f New: The row, column and cell selectors now all accept a function as a selector. The function will return true or false based on the defined logic to indiciate if the item should be included in the result set. This is particularly useful for searching the table for items of data. 2014-10-09 14:55:19 +01:00
Allan Jardine
d7a9aefb6f New: dt-api cells().render() and dt-api cell().render() methods to trigger the rendering methods for the orthogonal data types. Similar to the cache() methods but this will specifically trigger a render and also provides access to the type and display options which cache() does not. Generally it is expected that this will replace the cache() methods 2014-10-08 16:04:44 +01:00
Allan Jardine
b2ac7fa0f2 Dev: Fix previous commit for HTML5 attributes. The object constructed wasn't being correctly written 2014-10-08 16:04:27 +01:00
Allan Jardine
00c69698e3 Fix: Javascript error when using smart filtering with quotes for exact matching 2014-10-08 14:19:29 +01:00
Allan Jardine
a6b871d660 New: Ability to use dt-init columns.data with a DOM sourced data to read the row information into an object rather than an array (the default) 2014-10-08 14:19:14 +01:00
Allan Jardine
4f189464e4 New: dt-init searchDelay parameter that controls the throttle frequency for search requests using the global input text box 2014-10-08 11:28:51 +01:00
Allan Jardine
9a49208617 New: dt-api $.fn.dataTable.util.throttle() static utility method. This provides extension authors with an easy way to throttle function calls 2014-10-08 11:28:33 +01:00
Allan Jardine
5c8b72b8e8 Fix: Native Date instances weren't being detected as a date type
* This fixes DataTables/DataTables #385
2014-10-07 16:47:20 +01:00
Allan Jardine
0e94078ad9 New: dt-api column().dataSrc() and dt-api columns().dataSrc() methods which provide the ability to obtain the data source parameter for one or more columns 2014-10-07 15:39:51 +01:00
Allan Jardine
6adf853864 Fix: jQuery UI integration when used with ColReorder could cause the wrong header to be shown as sorting
* This fixes DataTables/ColReorder #22
2014-10-07 15:39:36 +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
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
3f219a38e2 Fix: Numeric sorting for 0 was incorrect
* This fixes DataTables/DataTables #414
2014-09-08 15:14:49 +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
3978684f44 Update to 1.10.3-dev 2014-08-06 11:21:07 +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
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
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
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
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
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
20c764df90 Add minified files to built repo 2014-06-23 15:40:22 +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
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
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
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
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
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
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
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
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
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
Allan Jardine
0406a47e6a Fix: Use synchronous processing for sorting when processing label is not
shown
2014-05-01 11:43:57 +01:00
Allan Jardine
7f7861b2e2 Fix: Scroller needs to know what the container node is during init 2014-05-01 11:43:39 +01:00
Allan Jardine
f98586dd30 Dev fix: Change preventDefault location to be general
- See thread 16841
2014-04-29 15:58:17 +01:00
Allan Jardine
e82334589d New: sessionStorage and infinite state save option
- The stateDuration option has been updated to provide the ability to
  indicate if sessionStorage should be used rather than localStorage
  (set value to -1).

- Settings stateDuration to 0 also indicates that the duration is
  infinity.

- Parts of the state saving have been optimised for code size, so this
  commit actually reduces the min size by 32 bytes despite the new
  abilities.

- See thread 19572 for discussion on this
2014-04-29 10:32:55 +01:00
Allan Jardine
a23f09ae2d Fix: IE submits a form on keypress for sort
- See thread 16841
2014-04-28 16:56:39 +01:00
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
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
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
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
6cac556b6a Dev fix: Converting camelCase to hungarian was broken 2014-04-01 13:43:00 +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
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
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
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
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
Allan Jardine
095d83e8c3 Dev fix: When x-scrolling, column widths were being overridden by the
fact that the table width attribute has been removed, but was being
applied to the table anyway, as 0px - causing the table to be as narrow
as possible. On the plus size, the columns kept their alignment with
such a misconfiguration! However, now the `width` option for columns is
correctly applied in x-scrolling tables.
2014-01-31 13:26:34 +00:00
Allan Jardine
61e23fb2fb Blog: 2014-01-24 - JS Bin updates 2014-01-31 13:25:55 +00:00
Allan Jardine
cea15987d3 Dev fix: Set the legacy.ajax option to null by default so you can tell
DataTables to specifially send the SSP params in the old or new format
2014-01-31 13:25:30 +00:00
Allan Jardine
3eeb09a06d Dev fix: Add ai to the list of Hungarian comapt options 2014-01-31 13:24:50 +00:00
Allan Jardine
ee4ee545d1 Dev fix: The table() method was truncating the exisiting object, it
should have been operating on a new object
2014-01-31 13:24:27 +00:00
Allan Jardine
e57b905431 Dev fix: Don't throw an error if passing in falsy information for the
settings object getter
2014-01-31 13:24:07 +00:00
Allan Jardine
47c82c52a7 New: Expose $.fn.dataTable.camelToHungarian as a static function which
can be used by plug-ins
2014-01-31 13:23:52 +00:00
Allan Jardine
e83eacff6d Dev: Update the column objects to store an index of the column so we
don't need to look it up with inArray. Also the header renderer does not
pass in the column index now (the column.idx property can be used). This
is to allow operations such as ColReorder to reorder teh columns and
still have the renderers update correctly
2014-01-31 13:23:35 +00:00
Allan Jardine
0e974f27e6 Dev: Add the ability to get a settings object from an API instance 2014-01-31 13:22:42 +00:00
Allan Jardine
d4bbef72ba New: AMD support - return the $.fn.dataTable object from the factory
function
2014-01-22 10:14:07 +00:00
Allan Jardine
9a462a5fe4 Dev fix: Child row appending was broken due to need to use .dt namespace 2014-01-21 08:19:39 +00:00
Allan Jardine
5267910596 Update: Modify the jQuery requires header to be 1.7 since we use
$().on()
2014-01-17 16:44:53 +00:00
Allan Jardine
df95820f84 Dev fix: Remove jQuery alias that was added in e6c076f.
- The correct way to use a different alias is changing the jQuery
  instance used in the factory builder
2014-01-17 08:51:06 +00:00
Allan Jardine
30f3abee21 Dev: Use jQuery to set the colspan / rowspan attributes
- This makes DT compatible with jscript
2014-01-17 08:50:53 +00:00
Allan Jardine
a854421f27 Dev fix: Correct error in aliasing the new ext.search to the old
afnFiltering interface
2014-01-16 11:30:51 +00:00
Allan Jardine
6fbd3ba8e6 New: Add the ability to read size information from HTML elements for columns
- Column width is always a particularly difficult one to get quite
  right. In this case, the fix is to have DataTables read column width
  information from the `width` or `style` attributes of a column header
  cell, if that information is present. If it is, it is treated as
  sWidth is (although user supplied sWidth can override). That is it say
  that it will be applied to the column width calculation table.

- The remaining gap is if a developer assigns a width using css classes.
  We can't get that information, so we fall into the old problem.

- This change comes about from the discussion in
  http://datatables.net/forums/discussion/19089 and the fiddle here:
  http://jsfiddle.net/EysLd/1/

- What is happening in the test case is that the calculation table is
  being created, but it is then stripped of widths due to this commit:
  https://github.com/DataTables/DataTables/commit/6a9e324 . That was to
  allow DataTables column headers to have their applied size removed, so
  a new size could be calculated. Only sWidth would override that - now
  the width and style attributes will as well
2014-01-15 16:19:03 +00:00
Allan Jardine
fe7d64e0ef Dev: API fixes for IE8-
- IE8- requires that Function.prototype.apply be used with an array or
  arguments object as the second parameter - it being "array-like" isn't
  good enough.

- This fixes DataTables/DataTables #262
2014-01-15 09:36:02 +00:00
Allan Jardine
96af1f5cf3 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-01-14 15:51:06 +00:00
Allan Jardine
4c68d5881e Site: Disable comments on manual index page 2014-01-14 15:50:55 +00:00
Allan Jardine
ef974cb255 Dev: Trivial fix to use local variable for aoColumns 2014-01-14 15:49:41 +00:00
Allan Jardine
d60ddf211c Dev fix: Adding _fnCalculateEnd as a stub to the oApi object for
plug-ins

- A lot of plug-ins use _fnCalculateEnd and although all that is needed
  in the upgrade is to remove it, since the value is calculated
  automatically now, it will likely cause confusion and hassle. So I've
  added this stub to prevent those errors.
2014-01-14 15:49:03 +00:00
Allan Jardine
734607635a Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-01-14 15:47:45 +00:00
Allan Jardine
3bd9858e59 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-01-14 15:47:33 +00:00
Allan Jardine
323e40e729 Site: Add documentation for tech notes 1-5. 2014-01-14 15:47:22 +00:00
Allan Jardine
2891978fd1 Fix: Numbers incorrectly detected as dates in Chrome
- Chrome (V8) will incorrectly detect '$245.12' and similar as dates,
  since V8 will strip unknown characters from a string given to
  Date.parse and then attempt to parse the rest of the string - in the
  example above: Dec, 245:
    https://code.google.com/p/v8/source/browse/trunk/src/dateparser-inl.h#72

- The fix implemented to to check for a leading a-zA-Z, number or +-.
  Although this isn't a perfect match for what Chrome does, it, I think,
  a good enough effort to chatch nearly all particular use cases.

- Additionaly, V8 will try to parse a single number passed into
  Date.parse - 1-12 are months, 32+ are years. As such, the numeric type
  detection much be a highter priority than the date detection, since
  Chrome might incorrectly use a column as a date. It would sort
  correctly, but it isn't "correct".

- The take away from this is that Date.parse cannot be used for date
  format validation on its own...
2014-01-05 11:18:42 +00:00
Allan Jardine
cd0139927e Dev fix: sInputFilter class wan't being applied when using the _INPUT_
macro

Fixes DataTables/DataTables issue #260
2014-01-05 11:18:31 +00:00
Allan Jardine
0b2c32c98f Merge branch 'master' of github.com:DataTables/DataTablesSrc 2014-01-05 11:18:18 +00:00
Allan Jardine
b3bd3cbda7 Site: Add documentation for tech notes 1-5. 2014-01-05 11:18:05 +00:00
Allan Jardine
4a65fb054a Update: isDataTable() static method will now accept jQuery objects and
selectors as a parameter to check if it is a dataTable.

`tables()` static method rewritten for size
2014-01-05 11:17:53 +00:00
Allan Jardine
1ab67a880f Fix: When in server-side processing mode, the processing display was
being removed too early on click to sort column.

- Fixed DataTables/DataTables 259
2014-01-03 09:56:57 +00:00
Allan Jardine
292d021217 Dev update: Better fix for flatten()
- Smaller code and works with a mix of scalars and arrays
2013-12-28 17:05:36 +00:00