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

769 Commits

Author SHA1 Message Date
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
Allan Jardine
e5d8a40fc1 Dev fix: The flatten() method should only flatten 2D arrays, and not
1D arrays.

- The method implemented isn't actually 100% perfect - if you mix arrays
  and scalars, then the behaviour is undefined. But that shouldn't
  happen in DataTables. Will look into it further, though
2013-12-28 17:05:11 +00:00
Allan Jardine
e699f8b510 Dev fix: ext.order is an object not an array
Dev fix: `ext.order` wasn't being aliased back to afnSortData correctly
2013-12-28 11:22:49 +00:00
Allan Jardine
dc0fffa316 Dev: Remove debug 2013-12-28 11:22:37 +00:00
Allan Jardine
4cb532ad95 Fix: DT_RowClass wasn't being updated when modified in the data source.
- This is actually a little more complex than it might first appear
  since any classes which have been added by DT_RowClass need to be
  removed. We can't just bindly remove all classes, so we need to track
  that classes have been added in a private variable.
2013-12-28 11:12:05 +00:00
Allan Jardine
ab13fcfcfd Dev fix: Add renderer as an initialisation parameter
- The core logic was already present, it just wasn't in the defaults or
  available to be set in the init object
2013-12-27 22:43:44 +00:00
Allan Jardine
af287d50a2 Dev fix: The columning classes should be applied to the columns the user
has selected for sorting, not the data sorted columns (although they are
usually the same)

- https://datatables.net/forums/discussion/18714
2013-12-19 14:24:37 +00:00
Allan Jardine
cece4c7c18 Fix: Add jQuery to the anon wrapper function, so a different version can
be passed in if needed

- Based on the discussion in
  http://datatables.net/forums/discussion/18792
2013-12-19 14:04:25 +00:00
Allan Jardine
d7f487ad10 Update copyright license for SpryMedia Ltd 2013-12-19 14:01:19 +00:00
Allan Jardine
282f56e9bb License: Update to be MIT license 2013-12-11 17:20:42 +00:00
Allan Jardine
c95dd530b7 Dev: Add new _fnDataSource function to get the data source and simplify
some logic conditions
2013-12-11 17:20:31 +00:00
Allan Jardine
c6d8545319 Api: ajax.url().load() should also have a resetPaging option
- ajax.reload() and ajax.url().load() now have the same options
2013-12-11 10:57:25 +00:00
Allan Jardine
1daaf4e473 Dev fix: Show "Loading..." message when using ajax option not just
sAjaxSource
2013-12-11 09:32:28 +00:00
Allan Jardine
c20681668a New: no-footer class automatically added to the table when no tfoot
- It appears that ti is impossible to know in CSS if a table doesn't
  have a tfoot element reliably and cross browser, so I've added a class
  which is added to the table automatically if the table has no footer
  or the fotoer is empty to complete the styling of the table.

- Fixed error when there are no cells in an empty TR row in the footer.
2013-12-10 17:54:53 +00:00
Allan Jardine
7a171b14c2 Dev fix: row().child() checks for undefined now since an empty string
would be a valid input for a details row. Not a useful one, but
none-the-less a valid on.
2013-12-10 17:31:46 +00:00
Allan Jardine
c85bcab903 New: Add postfix fixed ordering option
- With the change to camelCase, it is easier to extend the usageof
  optiosn now, and in this case I've allowed the `orderFixed` (formally
  `aaSortingFixed` parameter to be passed in as an object as well as an
  array. As an object the `pre` and `post` parameters are used to
  specify prefix and / or postfix ordering. Useful for gouping.
2013-12-10 17:31:35 +00:00
Allan Jardine
dd1e7600ac Dev fix: Destroy wasn't working when using deferred rendering
- The _pluck() function that was being used to get the tr elements
  didn't remove nulls, while jQuery doesn't like removing a class from!

- Thanks to `RagingTroll` in the forums for spotting this:
  http://datatables.net/forums/discussion/18651
2013-12-09 13:05:30 +00:00
Allan Jardine
18c53eaed5 Dev fix: When using _fnExtend to extend with an object, need to check if
the property being expanded is an object or not. If not, then set it to
be an empty object which will be extended. Only really effected the
`ajax` property
2013-12-09 12:52:06 +00:00
Allan Jardine
7e67778c51 Dev: Change to how the init object is copied for multiple tables
Based on the discussion in the forms (
http://datatables.net/forums/discussion/18456 ) the fix from 8935b8a
wasn't good enough. What was happening was that the _save_data function
was doing a deep copy of all arrays (minus the data array) so the
default sort was stil applied.

The fix is to reinstate the _fnExtend function which does a jQuery like
deep extend on objects and a shallow extend on arrays. That is extended
slightly to allow array references to be broken on initialisation, to
resolve the issue 8935b8a attempted to (sorting array would be used for
two tables for example), by an optional parameter. This should resolve
the issue correctly this time!
2013-12-05 12:01:44 +00:00
Allan Jardine
8f356ab917 Dev fix: When no ordering was aplied to the table, the next order would
throw an error
2013-12-05 12:01:33 +00:00
Allan Jardine
703ee53c47 Dev fix: API - destroy() was giving a JS error on scrolling tables
- http://datatables.net/forums/discussion/18584
2013-12-04 17:10:59 +00:00
Allan Jardine
d0a0ef8ad1 Dev fix: $.fn.dataTable and $.fn.DataTable should both have the same properties available
- This fixes DataTables/DataTables issue #241.

- Most of the properties attached are objects, so we want the references
  to them, rather than a copy, so a simple assignment is all that is
  needed. Strings etc will continue to work as well.
2013-11-29 11:59:43 +00:00
Allan Jardine
d4a1028a1d Dev fix - Full backwards compatiblity with fnServerParams with array
syntax paraneter names

- Data added using fnServerParams with array syntax had different
  behaviour in 1.10 from 1.9. In 1.9 jQuery would create an array for
  us, but in 1.10 before we create an object first, we need to create
  that array ourselves. So the following code had different behaviour:

		"sAjaxSource": "data/arrays.txt",
		"fnServerParams": function ( d ) {
			d.push(
				{name: 'somekey[]', value: 'somevalue1'},
				{name: 'somekey[]', value: 'somevalue2'}
			);
		}

In 1.10 it would have sent `somekey[] = somevalue2` but 1.9 would have
sent both as part of an array.

To maintain full compatiblity with 1.9 we need to convert this syntax to
an array - this commit does that.

I was concerned about using parameters in the brackets, but jQuery only
searches for `[]` when performing this conversion. We could use $.param
and then decode the created query string, which would be absolutely 100%
comaptible, but would involve additional code and I think this method
provides that 100% compatiblity from reading the jQuery code), and its
shorter.
2013-11-29 11:36:03 +00:00
Allan Jardine
4549646891 Dev fix: Sort indicator items weren't being redrawn
- Confusion aorund the `order` and `sort` events which resulted in the
  sort icons not being updated
2013-11-21 13:46:17 +00:00
Allan Jardine
7a32f2db93 API: Column selector - add support for visible indexes counting from the right
- The ability to use negative numbers as a column selector for the
  column data index was added recently, but that didn't include the
  ability to work with negative numbers with the :visible pesudo
  selector. This commit adds that ability so you can do:
  `table.column("-1:visible")` to always get the right most visible
  column
2013-11-19 13:55:08 +00:00
Allan Jardine
32e27fcc2f Api: Column selector - jQuery selector as a string, an name selector
with :name postfix.

- Previously you could use a jQuery selector for columns by using the
  :jq postfix, and names were matched otherwise. This is reversed now
  for consistency with the rows and cells selectors which treat strings
  as jQuery selectors without the :jq postfix.
2013-11-19 13:54:53 +00:00
Allan Jardine
e82068e7b3 Dev fix - incorrect fix for the API extend method before. Was looking
its own reference
2013-11-19 13:54:41 +00:00
Allan Jardine
6740193eed Dev fix: The API chaining was a little broken if the inner function
returned undefined, null etc.

- The base issue was in the instanceof check which has a priority error,
  it was:
    ! obj instanceof _Api
  which is the same as:
   (! obj) instanceof _Api
  which is rubbish.

  We want:
    ! (obj instanceof _Api)
  but there is of course a wrapper function, so that needs ot be taken
  into account as well. The new logic does just that.
2013-11-19 13:54:14 +00:00
Allan Jardine
8919616833 Docs: row() and rows() API documentation 2013-11-19 13:54:02 +00:00
Allan Jardine
8dcdb94b15 API - invalidate() methods - add an "auto" option that can be passed
rather than jsut an empty string as auto
2013-11-19 13:53:48 +00:00
Allan Jardine
48fd750bd8 Fix: Initialisating multiple DataTables with a single call was broken
- Because of the manipulation of the initalisation object initialisation
  of multiple tables with a single jQuery call (i.e.
  `$('.dataTable').dataTable();`) was broken since the second table
  would see the modified init object. Need to take a coopy of the object
  before entering that state.

- This could probably do with a bit of a clean up sometime...
2013-11-19 13:53:36 +00:00
Allan Jardine
8a5712b7e9 Update - init options: Rename displayLength to pageLength for consistency
- The displayLength option is poorly named, particularly with the new
  API refering to it as the page length (page.len()) so, using the new
  translation option to allow backwards compatiblity while using new
  parameter names, I've updated this parameter's name and its
  documentation.
2013-11-18 13:43:58 +00:00