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
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
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
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
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
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