Allan Jardine
7851a6a204
Fix: If async:false
is used in the Ajax configuration, callbacks assigned with dt-api ajax.reload()
would not trigger until another draw has been executed.
...
This was due simply to the code ordering for how the callback is
triggered. See https://www.datatables.net/forums/discussion/26474 for
more information.
2015-03-19 16:20:34 +00:00
Allan Jardine
4ec31cea77
Fix: Update bower.json to not use a glob as it is unclear from the bower spec if this is supported or not and other extensions such as BowerWebpackPlugin do not support it.
...
Fixes DataTables/DataTables #513
2015-03-19 11:59:50 +00:00
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
ba62dcba43
Fix - CSS: Improved interoperability for setting background colour on header cells
...
Previously the CSS shorthand `background` was used for the background of
the header cells, but this makes it a good deal more difficult to set
the background colour if you want to since `transparent` is implicit in
the shorthand used. This method, although a bit longer in CSS is still
fairly simple and a lot more flexible
2015-02-27 16:29:44 +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
5ec5862938
Dev: Fix CSS as a dependency
2015-02-16 16:01:14 +00:00
Allan Jardine
6217b1aaae
Merge branch 'master' of github.com:DataTables/DataTablesSrc
2015-02-16 16:00:55 +00:00
Allan Jardine
455121839a
Fix docs: dt-init stateSaveCallback
syntax error
2015-02-16 16:00:20 +00:00
Allan Jardine
a9b35a4927
Dev: Add ability to set a body class for an example for extra styling information. This will help to combat conflicts with the datatables.net site css when deployed on the site.
2015-02-16 12:01:07 +00:00
Allan Jardine
1ee4427ab0
Dev: JSPM support in package.json
2015-02-16 12:00:46 +00:00
Allan Jardine
3824202e0e
Dev: Update CDN libraries for the examples
2015-02-12 14:11:54 +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
71535def21
Fix examples: Server-side processing examples didn't correctly show the Ajax data after the first draw
2015-02-06 16:35:12 +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
8f3ad35944
Merge branch 'master' of github.com:DataTables/DataTablesSrc
2015-02-04 10:56:07 +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
1b8319e9e3
Added images to bower 'main'section
2015-02-04 10:54:57 +00:00
Allan Jardine
71195d29c3
Fix: jQuery UI stylingsheet didn't have all the same options as the main DataTables stylesheet
2015-02-04 10:54:37 +00:00
Allan Jardine
71863bc49f
Site: Syntax highlight could line break incorrectly
2015-01-22 10:22:28 +00:00
Allan Jardine
f4f8ca5632
Fix example: Index column API example had a typo
...
* This fixes DataTables/DataTables #482
2015-01-22 10:22:13 +00:00
Allan Jardine
c7e18c4236
move eq
jQuery selector outside of selector
2015-01-22 10:21:30 +00:00
Allan Jardine
d1ea76a958
Fix example: dt-init rowCallback
example was highlighting all rows, rather than just a select few due to the logic condition being a bit loose!
2015-01-11 16:27:29 +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
ff13ccc3ca
Update example: Update Ajax language example to read file form the CDN
2014-12-16 15:24:39 +00:00
Allan Jardine
a5e8ca8a2e
Dev: Remove unused files from the example resources. Examples use the CDN files now
2014-12-16 15:24:21 +00:00
Allan Jardine
6c7ada53eb
Fix: Image file size optimisation.
...
See DataTables/DataTables #470 for details
2014-12-16 15:24:05 +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
1ac1ea6752
Dev: Support for a "private" examples directory where the examples are
...
compiled but not included in the ToC
Dev: longer line wrapping!
2014-12-11 15:27:11 +00:00
Allan Jardine
24b2d11460
Dev: Show language name in code highlighting
2014-12-04 12:23:12 +00:00
Allan Jardine
4112da87a2
Dev: Add C# syntax highlighting
2014-12-02 10:38:13 +00:00
Allan Jardine
a5ff36fdb9
Fix example: Row details discription refered to an incorrect function name
2014-12-02 10:37:56 +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
a0d6150c76
Dev: use Google hosts Raleway font for standalone Editor
2014-12-02 10:37:23 +00:00
Allan Jardine
bc256721ce
Fix docs: Invalid line to function that doesn't exist
2014-11-28 10:02:22 +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
e820e57fec
Dev: Daft JSON error in package.json file
2014-11-13 14:14:48 +00:00
Allan Jardine
42f6be43d2
Dev: Update package.json file
2014-11-13 14:11:00 +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
f8770a6b2a
Update example: Use an initial value for the dt-api reduce()
call to simplify the logic
2014-11-03 15:17:30 +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
997f3fa87c
Update: bower.json updated with ignore, keywords and license
2014-10-07 16:08:19 +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
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