Allan Jardine
93afeb100f
Fix: IE7 doesn't like setAttribute('rowspan') (and colspan) so we need to do it the old fashioned way... - 6012
2011-08-03 20:01:08 +01:00
Allan Jardine
0843c71f7d
Fix: typeof null is an object, which causes issues in fnUpdate when checking if a value passed in is an object or not to fail if null is given as the value. Need to check for null values - 5987
2011-08-02 06:52:20 +01:00
Allan Jardine
1bf42d2ca9
Fix: Add a method for plug-ins to have a destructor for when DataTables is destroyed - allowing clean up of events and anything else the plug-in has done. Plug-ins should add an object to aoDestroyCallback with 'sName' (to identify the plug-in) and 'fn' as the plug-ins destroy function.
2011-07-13 21:05:02 +01:00
Allan Jardine
61f05f8da7
Fix: When applying the sanity width for y-scrolling only we need to know if the scrolling element has scroll bars visible or not. Previously we checked if the element was bigger than the visible area, but this isn't good enough of overflow:scroll is set. Need to check that parameter as well - 5658
2011-07-08 17:27:35 +01:00
Sahab Yazdani
2995d43da4
one more
2011-06-30 16:34:18 -04:00
Sahab Yazdani
f9f5743665
more spelling fixes
2011-06-30 16:23:27 -04:00
Allan Jardine
98737aaeb7
Fix: More adjust typos!
2011-06-30 19:35:42 +01:00
Allan Jardine
0e46abde6c
Correct spelling for the internal function _fnAdjustColumnSizing (was _fnAjustColumnSizing) - from pull request 11.
2011-06-30 18:34:26 +01:00
Allan Jardine
2c9ce2aa59
Fix: When filtering is applied to a table which has y-scrolling, and the filter was sufficient to make the scrolling disappear, the table width would increase by the scrollbar width. This was of course incorrect and the result of a change for 1.8.1 - we need to test is the scrollbar is present or not for the fix to be correct, which it now does. Unit test added.
...
Fix: As with the fix in 1.8.1 for the x-scrolling appearing when disabled the footer needs the same consideration as the header, otherwise it can be cut off visually.
2011-06-29 18:08:14 +01:00
Allan Jardine
2db0cb398f
Start 1.8.2 development
...
Updated: Split the Ajax parameter building into it's own function (_fnAjaxParameters) so it can be called through the oApi parameter. The intention is that external programs such as TableTools can build up the same parameter set as TableTools uses.
2011-06-27 17:25:52 +01:00
Allan Jardine
f7c7751b4b
DataTables 1.8.1 development finished
2011-06-25 19:56:53 +01:00
Allan Jardine
56a7564ee8
Dev fix: fnDestry wasn't reapplying original with correctly due to a mistake in an earlier commit - picked up by unit tests
2011-06-25 17:43:47 +01:00
Allan Jardine
3a63638916
Fix: Row alignment with x-scrolling disabled and the table too small to draw fully. Previously DataTables would emit an error about the columns not aligning in this case, and then try its best to draw the table, but this would end up looking quite bad. The fix is to not allow the table to draw smaller than it can possibly be when x-scrolling is disabled. This effects dynamically resizable tables - 5232
2011-06-25 15:29:07 +01:00
Allan Jardine
a3718fa6a9
New: Send mDataProp to the server for server-side processing. This is very simialr to the sNames parameter, but more convient when already using mDataProp
2011-06-25 08:33:06 +01:00
Allan Jardine
41bf4e28bd
Fix: Columns which are sortable but hidden have events attached to them for sorting, but this event handler is not removed when the column is made visible again for fnDestroy. Simply need to change the order of how the destroy is done - i.e. remove events just after the columns are made visible, not before - 5497
2011-06-25 07:40:30 +01:00
Allan Jardine
d21a8529ee
Fix: When complex expressions are built up with aoColumnDefs, resulting in the ability for a column to be turned "on and off" during initialisation, it would result in the column classes possibly not being correct for the sorting - 5472 - kudos to rups for this fix
2011-06-23 18:42:40 +01:00
Allan Jardine
c14169903f
New: Accessability features - the length changing control and filtering control are now wrapped in <label> tags (an explicit relationship to their input elements) to aid accessability. You can see this immediately by simply clicking on the "Search:" text now - it will focus the input of the text box, while for screen readers it will give the label text from the label.
...
New: The filtering input language string (oLanguage.sSearch) now has the "macro" _INPUT_ in it to allow the input element to be positioned anywhere in the string. For example if you gave "sSearch": "Data_INPUT_Tables" the output for the filter would be "Data<input.../>Tables". This is optional - if _INPUT_ is not given, then as before will will tack the input element on to the end of the given (or default) text string.
2011-06-21 21:48:28 +01:00
Allan Jardine
aaf9697bd6
Fix: The ability to use complex data structures in 1.8 means that arrays which are passed into to fnUpdate need not strictly be the same length as the number of columns in the table - therefore the warning that is given if you do this is wrong... no other code changes needed - just no need to generate the warning! Unit test added - 5396
2011-06-21 18:38:00 +01:00
Allan Jardine
6557642f75
Fix: The table width is not set when auto width is disabled so we should not set it when destroying the table - 5220
2011-06-20 18:08:10 +01:00
Allan Jardine
3f04293609
Start DataTables 1.8.1 development
2011-06-20 18:05:29 +01:00
Allan Jardine
5574025364
DataTables 1.8.0 :-)
2011-06-04 07:38:39 +01:00
Allan Jardine
8859dfe380
New: mDataProp can now be a function as well as either a string or an
...
integer. This allows dynamic reading of information from the source
object (for example getting the length of an array in the data source
object) as well as the deep object reading and array index reading
already available. The function is called with a single argument (the
data object) when being read and two arguments (the data object, new
value) when being set. This can be seen as an alternative to fnRender
but it makes sense to include this functionality here as an option.
2011-05-30 14:24:57 +01:00
Allan Jardine
2530ea1fdc
DataTables 1.8 beta 4 development complete
2011-05-29 19:36:42 +01:00
Allan Jardine
e9afa984d4
Fix: When using server-side processing the new sLoadingRecords message is not used since the draw doesn't progress that far. As a result the same issue as was fixed in commit cc1908baaf
could occur and needs to be addressed here by checking for server-side processing. Regression picked up by unit tests
2011-05-28 11:17:31 +01:00
Allan Jardine
e769731746
Fix: Treat null the same as an empty string for type detection - i.e. don't try to detect a type on it. Regression picked up by unit tests
2011-05-28 11:06:38 +01:00
Allan Jardine
53908784fe
Fix: Couple of little jslint found issues
2011-05-28 10:27:39 +01:00
Allan Jardine
cc1908baaf
Fix: The check against sAjaxSource for the 'loading...' message should be null rather than an empty string since null is the default for sAjaxSource. This error would result in the loading message being shown if the table has no results initially
2011-05-27 19:20:01 +01:00
Allan Jardine
e6248382c6
Merge branch 'master' of github.com:DataTables/DataTables
2011-05-27 19:07:34 +01:00
Allan Jardine
2a9068fead
New: The object returned by $.ajax is assigned to jqXHR in the table's settings object now. This means that you can access the XHR in fnDrawCallback (or any of the other callback functions, or anything with access to the settings object!) to do further data manipulation if you wish.
2011-05-27 19:05:35 +01:00
Allan Jardine
42e50f6ba7
Fix: The return false in the click handler for the full numbers pagination numbers was somewhat too harsh and stopped other
...
events from being attached to those elements if the developer wanted. Just use preventDefault instead - 5105
2011-05-26 10:48:13 +01:00
Allan Jardine
2eacc63f87
Fix: If there was a nested table in the thead of our target table, then the getElementsByTagName was getting the wrong element - so use a more specific jQuery selector.
2011-05-19 18:58:32 +01:00
Allan Jardine
55c4e0ac9c
Fix: Oops - Committed debug by mistake. Remove...
2011-05-18 22:16:28 +01:00
Allan Jardine
5ca44c8405
Fix: The automatic type detection algorithim can incorrect give precidence to numeric sorting when an empty cell is found. This means that a column of dates with a single empty cell would be sorted as a string. The fix is to skip type detection on empty cells. This also means that the sorting algorithim needs to be updated since sType might not be defined for a column when it is sorted on now (if the data in the column is empty).
...
Fix: iDataSort, sDataType in the sort function should be declared as local parameters - should give a tiny bit more speed to the sort
2011-05-17 21:20:59 +01:00
Allan Jardine
12bbdad059
DataTables 1.8 beta 4 development starting point
...
Fix: If state saving is enabled, but sorting is not - then any saved filter would not be automatically applied. The fix is to call the filtering function at start up. Thanks to Michael Hamann and Roland Ramthun for finding and fixing this issue.
2011-05-15 18:03:21 +01:00
Allan Jardine
419ad58d0b
DataTables 1.8 beta 3
2011-05-14 10:58:24 +01:00
Allan Jardine
7bef3d19b4
Fix: Tidy up the fnGetPosition API method and allow it to cope with getting a TH cell's position in the table as well as TR and TD elements. The input and output options for the function have not changed - just it's internal operation.
2011-05-14 10:48:14 +01:00
Allan Jardine
c56c84683c
New: fnUpdate has been updated (oh the irony) to accept either an individual value, an array or an object as the first parameter passed to it. The individual and array options behave exactly as they did before this change - the new option is the object being passed in. This allows fnupdate to be given a data object which is identical to data objects used by the table when using complex objects and mDataProp. How fnUpdate itself actually operates has also changed to be self calling, which makes the multipe column updates for arrays and objects much easier.
...
Fix: fnUpdate now works with TH elements in the body as well as TD elements
2011-05-14 10:35:57 +01:00
Allan Jardine
8eafb87f1e
New: New callback function fnPreDrawCallback which is called at the very start of each table draw (so rather like fnDrawCallback, just before the
...
draw!). This function is, like all other DataTables callbacks, execuated with the DataTables instance scope, and also takes a single parameter -
the DataTables settings object. The attached function can cancel the draw by returning false, anyother return (including undefined) results in the
full draw occuring).
2011-05-13 10:27:15 +01:00
Allan Jardine
a84eec581b
New: New language option sLoadingRecords which is used when the table's data is Ajax sourced, and at the first draw only. This provides an
...
indication that the data is currently being sourced from the server (i.e. Loading...) rather than showing 'No data available in table' - which is
not particularly friendly. Note that for server-side processing, DataTables will leave whatever is in TBODY when it makes the first Ajax request,
so with server-side processing you would need to put in a TR/TD into the static HTML table.
2011-05-13 10:19:29 +01:00
Allan Jardine
9cf1ff785e
Dev fix: The insertBefore for column visibility was incorrect if the next column was hidden as well. Need to 'fast-forward' to the next visible column to get the insert point.
2011-05-13 06:38:56 +01:00
Allan Jardine
844bbaf4ee
Fix: fnSetColumnVis didn't cope with TH elements in the body due to the use of a 'td' selector. The fix for this is to use _fnGetTdNodes() (since that can get an array of TD|TH nodes, which in turn allows a nice tidy up of the insert part of the function.
2011-05-12 21:34:48 +01:00
Allan Jardine
f27c487862
Fix: fnSetColumnVis was broken when used with deferred rendering due to the offset calculation done with the huge flat array of TD nodes. The fix is to simplify this somewhat and get an array for each row (when it is available) and process that using the optional parameter for _fnGetTdNodes. This doesn't result any any extra computation time, other than the addional time to call the function (but not to execute it), since it is just moving where the loop is.
2011-05-12 20:46:33 +01:00
Allan Jardine
97386476c8
Fix: A couple of little jslint tidy ups
2011-05-12 20:37:35 +01:00
Allan Jardine
99b674def8
Fix: New algorithim for calculating the column widths for a table when x-scrolling is enabled. Basically browsers need a bit of a hand when a width is assigned to any columns when x-scrolling as they tend to collapse the table to the min-width, even if we sent the column widths. So we need to keep track of what the table width should be by summing the user given values, and the automatic values
2011-05-12 20:32:18 +01:00
Allan Jardine
84a1940cad
Fix: Passing an integer for sWidth would cause the column width calculations to go completely off since they weren't actually used by the browser. Make use of the _fnStringToCss helper function for exactly this kind of thing.
2011-05-12 20:29:24 +01:00
Allan Jardine
0c493b6789
New: New column option - sContentPadding. What this option does is tag on an extra string to the content of the columns in the width calculation table, in order to take account of the fact that 'iii' is actually less wide than 'mm', but DataTables will pick 'iii' as the longer due to the string width. With sContentPadding you can add an extra string to any column to force DataTables to take account of this during the width calculation - the string in sContentPadding is not used anywhere else and is empty by default. This option will remain undocumented for the moment, since I suspect it will confuse more than help, but it is very useful to have around when x-scrolling.
2011-05-12 20:23:40 +01:00
Allan Jardine
fcc41bc535
Fix: When calculating the string width for column sizes, we know that we are going to be using strings for the display - so cast as a string, which means that we can take the length of any primitive (particularly numbers).
...
Fix: The max string width calculation was including HTML, which is just plain wrong since the HTML will be hidden. This is still not perfect since "iiii" takes less space than "mmm" in the browser display, but addressing that would take some serious clocks cycles, and this is good enough for now.
2011-05-12 20:18:48 +01:00
Allan Jardine
dd0e4023f0
Fix: _fnGetTdNodes works on a column data array basis, not visible columns, so _fnGetWidestNode need only deal with column indexes. It was possible before that the width calculation would be done in the wrong column if using hidden columns
2011-05-12 20:14:29 +01:00
Allan Jardine
c8c10d1fba
Fix: fnGetData should give the original data object, rather than the array that DataTables uses for rendering the actual table. This was part of the original commit for the 1.8 object handling, but in retrospect, the original data is much more useful.
2011-05-12 20:11:11 +01:00
Allan Jardine
b3f5ddaf96
Fix: When calculating the column widths, we should get the data to display, otherwise a null element (particularly when using a null mDataProp) can
...
cause issues with columns being skipped (due to the null return)
2011-05-11 08:53:33 +01:00
Allan Jardine
275c7520db
Fix: When using fnRender with a null mDataProp, although the rendering function was called, it wasn't actually saved anywhere. This meant that when the cell was actually created and the data source attempted to be read, the rendered string wasn't available - thus you got an empty cell (4943). This fix is to add a condition to the rendering call to delay until the node is created. Note that there is still a quirk here, in that the rendered data cannot be used for sorting or filtering, since again it isn't stored anywhere when the data source is null.
2011-05-10 06:38:17 +01:00
Allan Jardine
3464502c06
New: sDefaultContent property for aoColumns / aoColumDefs. This new property allows a default value to be given for a column's data, and will be used whenever a null data source is encountered (this can be because mDataProp is set to null, or because the data source itself is null). In addition to this, when set if the mDataProp value is undefined, the default will be used instead (and no error given). If sDefaultContent is not set (default is null), and the mDataProp value is undefined, an error will be given as it currently is.
2011-05-09 19:07:16 +01:00
Allan Jardine
341f6784f6
Fix: null data should be returned as an empty string for HTML display
2011-05-09 18:24:23 +01:00
Allan Jardine
d242d9cad4
Dev fix: The last commit for fnUpdate wasn't quite complete - this commit is the correct one. Updating fnUpdate to be able to cope with bDeferRender
2011-05-09 18:06:52 +01:00
Allan Jardine
d073e36c34
Fix: fnUpdate needs to consider null nTr rows for deferred rendering
2011-05-09 17:53:06 +01:00
Allan Jardine
c125efebc9
Fix: When using bDeferRender HTML in the target cell would be used as text rather than HTML when doing the width calculations - making them completely wrong - 4879
2011-05-09 17:47:18 +01:00
Allan Jardine
c8572df07a
Start 1.8 beta 3 development
...
Backwards compatibility change: Use the get data function to cast data as a string when being used for display
2011-05-09 07:19:54 +01:00
Allan Jardine
c5b085091b
DataTables 1.8 beta 2 release
2011-05-08 18:59:09 +01:00
Allan Jardine
04aa89337b
Dev fix: Tidy up modifications to the _fnGetTdNodes function
2011-05-08 18:40:02 +01:00
Allan Jardine
1d651f68a3
Fix: The change in commit 537e3e9595
( 537e3e9595
) was incorrect - the column widths should be calculated with width() rather than outerWidth(). This can be seen by the misalignment in the tmp table if it is made visible.
2011-05-08 15:40:03 +01:00
Allan Jardine
2c2a4754d9
New: Add paginate_button_disabled to buttons which cannot be clicked on in full_buttons pagination, when not using jQuery UI themeing to make styling easier
2011-05-08 11:25:28 +01:00
Allan Jardine
4eb344cc1a
Fix: When calculating the width for tables, need to consider TH elements as well as TD in the body. Also correctly consider complex headers
2011-05-08 07:51:36 +01:00
Allan Jardine
96d0b163ce
Fix: When a column of only TH elements is used in the table it would cause indexing problems for the width calculation due to a getElementsByTagName('td'). Now use the _fnGetTdNodes (slightly modified) to do this.
2011-05-07 10:37:22 +01:00
Allan Jardine
e4390f8b00
Fix: When defered rendering was on and sort classes off, the header sorting classes weren't being appled - 4927
2011-05-07 09:36:04 +01:00
Allan Jardine
b52665fd6b
Fix: Allow non string and numeric data types in the data source (including null and boolean etc). Add suitable unit tests to sanity check this.
2011-05-04 19:21:41 +01:00
Allan Jardine
06d1802874
New: Support TH elements in the table's TBODY. TH elements are now treated just like TDs in the body. This will work only with DOM sourced data out of the box - any body cell elements that DataTables creates are still TD.
2011-05-04 18:30:44 +01:00
Allan Jardine
d4b8495378
Fix: The construct <tfoot><tr></tr></tfoot> would break the new table header/footer draw. While strictly this isn't valid HTML, 1.7 and before allowed it - so adding a condtion here to allow it in 1.8 as well
2011-05-03 17:40:42 +01:00
Allan Jardine
2c8868dd53
Update version number to 1.8.0.dev.2 for beta 2 development work
...
Fix: Call fnRender only once when using using bUseRendered (don't need to call it twice since our internal data cache already has the rendered value stored) sin
ce this can cause some confusion with re-writing the data source value - 4871
2011-05-02 22:32:54 +01:00
Allan Jardine
fa364b57d5
DataTables 1.8 beta 1
2011-04-27 22:05:57 +01:00
Allan Jardine
ee3a7a6b89
Dev update: Remove dead code
2011-04-27 21:50:45 +01:00
Allan Jardine
f3bd978b8f
Dev fix: Clean up the calls to _fnDrawHead
2011-04-27 19:18:08 +01:00
Allan Jardine
e8e30c35e0
Dev change: Put nTf back into aoColumns - it's actually quite useful! It is not maniditory that there need be a cell for every column however - the footer is a lot more relaxed than the header
2011-04-27 18:06:29 +01:00
Allan Jardine
198222d8d6
Dev fix: Read row ID/class from _aData
2011-04-23 11:44:09 +01:00
Allan Jardine
e2f31c5a13
Dev update: Automatic additio of ID and class should be done in the create TR mthod
2011-04-23 11:39:18 +01:00
Allan Jardine
e9adba0802
Dev change: mDataSource renames to mDataProp. Reason for the change is that in future we could have mSortProp and mFilterProp if we wanted to sort / filter on something other than the main data. Also we are refering to a property of the source object (or an index of the source array - hence keeping the 'm' prefix)
2011-04-23 10:38:00 +01:00
Allan Jardine
707953a285
Fix: fnDestory would put the table back into the DOM in the wrong place if the table wasn't the the only (or last) element in the parent (i.e. it was just doing an append) - 4751
2011-04-23 08:58:58 +01:00
Allan Jardine
8481826407
Fix: Sort wrapper on the header wasn't being removed on fnDestroy - 4617
...
New: Span elements in the header when using JUI themes, now have the class of DataTables_sort_icon applied to them automatically
2011-04-23 08:40:34 +01:00
Allan Jardine
71188b18a0
New: fnOpen will now take either a node, a jQuery object or a string (which was previously the only option) as it's second parameter, for what to enter into the 'details' row that is created - 2488.
2011-04-23 06:44:05 +01:00
Allan Jardine
503c3cfca5
New: Add unit tests for deferred loading with server-side processing
...
Remove: Deferred loading for Ajax sourced data - was incomplete and would be messy to fully implement
2011-04-22 23:14:20 +01:00
Allan Jardine
f39dadda62
Dev fix: JSLint tidy up
2011-04-22 22:39:47 +01:00
Allan Jardine
76390cdad2
Comment updates
2011-04-22 22:12:55 +01:00
Allan Jardine
dbc8046e6b
New: Creation of TR/TD elements when using an Ajax or JS source for the table can be defered until draw time, when the rows are actually needed now - 4739. This is enabled by setting bDeferRender to true at initialisation time. It provides major benefits for speed in IE when dealing with large tables. However do note that if you are using fnGetNodes() with this enabled, then you will only get nodes which have been rendered.
...
New: Unit tests for delayed rendering. Now up to 2500+ unit tests :-)
2011-04-22 19:51:06 +01:00
Allan Jardine
2d0aff2b39
New: The ability to customise the property that is read when obtaining Ajax information from the server, for the data to insert into the table. The new initailisation parameter is sAjaxDataProp. It can be used with Ajax sourced data or server-side processing. When Ajax sourced data is used, it can be an empty string in which case it is assumed that an array has been passed into DataTables directly. Note also that it uses the same object data processor as mDataSource, so you can use dot notation to read from nested information (e.g. 'my.data').
2011-04-21 18:37:36 +01:00
Allan Jardine
1277cfece9
Fix: Column defs with a string would incorrectly match on a substring class - 4793
2011-04-21 16:45:39 +01:00
Allan Jardine
7c4958ee60
New: fnGetData now has a second parameter (optionally) to get the column data used by DataTables based on mDataSource
2011-04-20 18:55:21 +01:00
Allan Jardine
f172ef5383
New: Significant change to how data is handled by DataTables. DataTables now has the ability to deal with complex objects as data sourced, which is particularly useful for dealing with Ajax data, and other data which doesn't belong in the visible table (db IDs for example). See the examples/ajax/ files that are in this commit for examples on how this works. More unit tests and further tidy up to come. Detailed examples will also be added in future - the current examples are mainly for testing
2011-04-19 19:35:33 +01:00
Allan Jardine
2d253df1e5
Dev fix: Commited debug statements by mistake...
2011-04-12 21:08:13 +01:00
Allan Jardine
b2d528d0d8
Dev fix: Hidden columns could break width calculations - unit test found
2011-04-12 21:05:25 +01:00
Allan Jardine
a5bba04353
Updated: Add support for the complex headers with a scrolling table
2011-04-12 20:57:08 +01:00
Allan Jardine
6a9e32486f
New: Complex headers will now work as would be expected when giving a custom width (sWidth) to a specific column.
...
Fix: $().empty() removes events was well as removing the child elements, so it was removing the sorting events when drawing the header. Now just manually remove them using DOM - was introduced in the last commit
2011-04-12 19:36:07 +01:00
Allan Jardine
e290f76496
New: Column visibilty will now work great with rowspan / colspan in the header and footer! The way this is done is by creating a stored grid of the header/footer information - a grid of rows x columns - which contains information about the cell that should be at each point - regardless of rowspan / colspan. From that information it is then possible to draw the header / footer, minus any column (or row, although that is not used here) as needed. The initialisation and column visibility functions have been updated to account for this. This allows ColVis and the other plug-ins to 'just work' with complex headers.
...
New: Initialisation parameter: bSortCellsTop. This parameter allows control over whether DataTables should use the top (true) unique cell that is found for a single column, or the bottom (false - default). This is useful when using complex headers.
Removed: From the column definiations array (aoColumns) there is now no longer any need for anThExtra, anTfExtra or nTf. These have now been removed and will cause compatibilty issues for any plug-ins which use them.
Fix: Tidy up spaces where there should be tabs
2011-04-10 19:15:09 +01:00
Allan Jardine
a0967b7b14
Fix: State saving when using in combination with Ajax sourced data, wasn't restoring the paging state - 4490
2011-03-23 19:50:13 +00:00
Allan Jardine
15c7628d1c
New: Extend the new defered loading option to consider Ajax sourced data without server-side processing.
2011-03-17 19:00:57 +00:00
Allan Jardine
7138587212
Fix: When using infinite scrolling and state saving, the saving of the draw start point is wrong, resulting in missed rows. When inifinite scrolling is enabled the state should be saved as starting at 0 always. Thanks to Jan (di4bl0s) for picking this up - 4388
2011-03-12 07:02:59 +00:00
Allan Jardine
501324a590
Fix: Commit c01dda2a60
introduced a global variable to DataTables in fnGetData and fnGetNodes. This commit fixes that while keeping the introduced feature.
2011-03-08 19:29:38 +00:00
Allan Jardine
789a6876f0
Fix: Small typo in deferred variable comment
2011-03-06 14:58:53 +00:00
Allan Jardine
01ffda313f
New: Defered loading feature for server-side processing. With this feature enabled (controlled by the new initialisation parameter iDeferLoading) DataTables will not make a request to the server for the first page draw - rather it will use the data already on the page (no sorting etc will be applied to it). iDeferLoading is used to indicate that defered loading is required, but it is also used to tell DataTables how many records there are in the full table (allowing the information element and pagination to be displayed correctly). The intention of this feature is to improve the progressive enhancement foundation and accessibility of DataTables.
2011-03-06 14:54:54 +00:00
Allan Jardine
83db797888
Start 1.8.0 development :-)
2011-03-06 14:54:01 +00:00
Allan Jardine
91bac43b15
Fix: When removing stripe classes, look only at the direct tbody tag, not nested which could remove classes you want to keep!
2011-03-02 19:08:20 +00:00
Allan Jardine
25840887e4
Version 1.7.6 development complete
2011-03-01 19:11:32 +00:00
Allan Jardine
8c37c48e00
Fix: Internal footer height for scrolling table should be set to 0, just like the header is
2011-02-27 12:39:11 +00:00
Allan Jardine
ce57597ae6
Fix: When unbinding DT namespaced events in fnDestroy, also unbind anything attached to the wrapper element
2011-02-26 19:34:46 +00:00
Allan Jardine
d5b106a2a2
Fix: Namespace all events added via jQuery (using the 'DT' namespace) to make events easy to remove in fnDestroy.
...
Fix: Remove all added events in fnDestroy, otherwise DataTables will leak memory like crazy when the destroy function is called
2011-02-26 12:32:56 +00:00
Allan Jardine
fdef8e02c3
Fixed: The scrolling header container should really be width:100% rather than a fixed width. The pixel width was trying to do width:100% and succeeding, but needing to be calculated rather than done natively.
2011-02-24 19:07:45 +00:00
Allan Jardine
bd0115d838
Fix: fnUpdate wasn't updating cells which were hidden by fnSetColumnVis or bVisible. It does now.
2011-02-22 21:23:06 +00:00
Brian Abreu
c01dda2a60
Fixed: fnGetData and fnGetNodes to return null when a row number is passed in that is out of the table's range.
...
Signed-off-by: Allan Jardine <allan.jardine@sprymedia.co.uk>
2011-02-17 18:47:25 +00:00
Allan Jardine
6641866868
Fixed: The instance that is stored (oSettings.oInstance) could contain muliple tables in a single instance, when tables are created with a selector that includes multiple tables. This could make API access a bit more tricky (3963) so now store a unique instance of the DataTables object for each individual instance.
2011-01-29 08:53:42 +00:00
Allan Jardine
bad588e6f2
Bump version to 1.7.6.dev
2011-01-17 22:13:06 +00:00
Allan Jardine
c12e8ce3b5
Fix: Trival comment change in function header
2011-01-17 22:11:42 +00:00
Allan Jardine
537e3e9595
Fixed: Table width calculations need to be done on the outerWidth, rather than 'inner', otherwise things simply don't add up (and IE get's a bit confused - fair enough).
2011-01-17 22:10:16 +00:00
Allan Jardine
c0cfe5c9e9
Finish 1.7.5 development
2010-12-15 21:54:11 +00:00
Allan Jardine
525fad090e
Fixed: fnInitComplete was not the last thing to be executed when using DOM source. IT was possible that you could set sAjaxSource in fnInitComplete which would then trigger DataTables to do an Ajax call incorrectly.
2010-12-15 21:23:24 +00:00
Allan Jardine
83c0ab8888
Fixed: fnDrawCallback was actually the first of the draw callback functions that was called (the internal callbacks were called later). This was incorrect and we now loop over the array to get the order we want. At some point in future it might be required to have an ordering if these draw callbacks become interdependant.
2010-12-14 20:42:31 +00:00
Allan Jardine
65b7c9b1e6
Performance: Re-written the sorting implementation so it doesn't use either eval() of $.inArray(). inArray was found to have a serious negative effect on IE which counts operations to give the 'script is running slow' error message - the new implemention uses a value / key reverse mapping to make the look up as fast as a single object parameter retreival. Furthermore, I've done some optimisation and feature completeness work on the non-eval version of the sorting (previously the AIR sorting method) and I've found this to be at least as good (faster in some cases) than the old eval() sort, so this is now the default and only sorting method DataTables provides - 2922
2010-11-28 14:42:38 +00:00
Allan Jardine
fbe83c7b44
Updated: fnAdjustColumnSizing when called with 'false' as the first (and only) parameter will now apply the calculated column sizes to the table when scrolling is being used. This allows a non-Ajax update to occur if using server-side processing. Thanks to Cat Weismann for this patch.
2010-11-18 21:57:23 +00:00
Allan Jardine
837ae99479
Fixed: When using server-side processing and having called fnDestroy, don't make another XHR to the server as the data won't be used - 3375
2010-11-17 08:10:49 +00:00
Allan Jardine
5b677bcdf7
Fix: Correctly add the sClass to the TH elements in the header
2010-11-04 21:26:11 +00:00
Allan Jardine
74654f84f4
New: Add bScrollAutoCss option (default true). This allows you to control the scrolling styles with CSS, where as normally DataTables will set (and override) the styles itself. This is useful for if you want to have a scroll bar showing at all times (normally auto).
2010-11-04 18:17:34 +00:00
Allan Jardine
946eefe054
New: Column visibility options in DataTables (bVisible and fnSetColumnVis) now take into account more than one row in THEAD and TFOOT. Please note that colspan and rowspan are NOT supported when using column visibility options in the header and footer, and will very likely have effects which are not at all desirable. As such there are conditions on this use (note that if you only have one row in the header / footer, then this has no impact), specifically the number of cells in the header / footer much be equal to the columns * rows (in each one). This way DataTables can accurately add and remove the cells as needed. The cells may be either TH or TD elements, but DataTables still requires at least one TH element for each column.
...
Updated: Previously when multiple cells were detected as unique to a column the last one would be given priority (i.e. sorting event handler etc). This is now no longer the case and the first will take priority.
2010-11-02 18:25:00 +00:00
Allan Jardine
eec881b8ac
Fixed: Remove the 'sNames' parameter that was introduced for server-side processing in 1.7.4. The parameter 'sColumns' actually performs exactly this task already. Doh. Also update the example PHP to take this into account - 3218
2010-10-31 17:16:35 +00:00
Allan Jardine
e4e2b0d11b
Start 1.7.5 development
2010-10-31 17:14:10 +00:00
Allan Jardine
9f0e9e0989
Finish 1.7.4 development
2010-10-30 08:02:14 +01:00
Allan Jardine
a274d44f0c
Fixed: Couple of minor jsLint highlighted errors - nothing funcational, just tidy code.
2010-10-30 07:18:25 +01:00
Allan Jardine
2bb96f89b0
Fixed: When state saving, it was possible to have a situation where by a table would contain 'n' columns, the user would sort on the last column and then the html is modifed to only have 'n-1' columns. This resulted in a JS error when DataTables tried to restore sorting on the removed column. Now do a sanity check to ensure the sorting column is present, and if not add sorting on column 0.
2010-10-30 06:54:10 +01:00
Allan Jardine
dbb51ab117
Updated: A warning is now given if you pass in aTargets (for aoColumnDefs) as something other than an array (since this is not valid).
2010-10-30 06:44:34 +01:00
Allan Jardine
4ec3b10e3e
New: fnSetColumnVis now has the option to cancel the redraw by passing the third parameter to the function as false (default is true).
2010-10-30 06:39:48 +01:00
Allan Jardine
47d5a6781a
Fixed: When pressing a meta key (i.e. an arrow key) in the search box and the search value didn't change, this was casuing a redraw to occur where one was not needed - 2933
2010-10-30 06:35:30 +01:00
Allan Jardine
a6365b3f69
Updated: Server-side processing script for column re-ordering has been updated to take account of sNames parameter which is sent in from DataTables, and also brought up to date with the main server-side processing script.
...
Changed: From the previous commit sNames sent from the client to server is now a comma seperated list of sNames and is always sent regardless of if names are given or not. This matches the sName formatting for the server-to-client return.
2010-10-29 08:48:13 +01:00
Allan Jardine
e7ffbb13fd
Fixed: IE6 and IE7 were having issues with scroll X and jQuery UI theming - specifically the elements which should have been hidden by the header scrolling were visible. This is fixed with a position: relative - 3180
2010-10-28 22:08:29 +01:00
Allan Jardine
1e1e8f0104
New: Column names, if defined, are submitted to the server-side for server-side processing. This is useful for the column ordering information, since it is possible for the server to be expecting a different column order from what DataTables is using - specifically with the column indexes such as sSearch_{i}.
2010-10-28 22:07:03 +01:00
Allan Jardine
f57434fc5b
New: Addtinoal ability to control state saving through two new initialisation parameters "fnStateLoadCallback" and "fnStateSaveCallback". Documentation to be updated on datatables.net at 1.7.4 release time. Basically now you can add parameters to be save, and override parameters whic have been saved. Also useful for plug-ins which need to save state.
2010-10-28 22:03:41 +01:00
Allan Jardine
77ce64fae3
Update: Remove unused settings class variable iDefaultSortIndex (the was long ago replaced with aaSorting
2010-10-23 17:38:44 +01:00
Allan Jardine
12c81b8e65
Updated: Store a complete representation of the column visibility state in aoData[]._anHidden (i.e. put in nulls for elements which are visible) to make manipulation much easier.
2010-10-23 17:36:55 +01:00
Allan Jardine
1dd9630d53
Updated: Slightly faster code for _fnStringToCss - thanks to sd_zuo, 3036
2010-10-18 09:26:37 +01:00
Allan Jardine
1e9aaee457
Updated: Upgrade to jQuery 1.4.3
...
Fixed: jQuery 1.4.3 seems a lot more keen to call the $.ajax error handler, which was causing the unit tests to alert errors a lot when dealing with Ajax calls, since it can make multiple calls at the same time. I've altered the check in the default error handler to look for a prase error before alerting now.
2010-10-17 08:14:29 +01:00
Allan Jardine
fe6b045af7
Fixed: Unit test 4_serveri-side "Filter 'nothinghere' - info" was failing as the information element of the table was incorrectly reporting that "1" record was being shown (start) when the filter applies ensured that no records were actually being shown. This was due to a strong type check against a string/number returned from the server-side processing script and a number/0. Fix is to parseInt().
2010-10-17 07:50:51 +01:00
Allan Jardine
6adec72aae
Fixed: Processing indicator wasn't being shown during initialisation for non-Ajax sourced data, if it was enabled
2010-10-16 18:10:25 +01:00
Allan Jardine
139a3f7f13
Fixed: Check also for pt units as well as the other CSS options
2010-10-16 12:57:08 +01:00
Allan Jardine
a2d7a32b2f
Fixed: Sorting disabled classes were not being correctly applied if sorting was disabled. This was particularly obvious with jQuery UI theming - 3064
2010-10-16 10:59:21 +01:00
Allan Jardine
d41c572798
Updated: Optimisation on fnDeleteRow to simply remove the search array entry, rather than rebuilding the whole array, also on fnUpdate to only rebuild the single row, rather than the entire thing, and finally fnAddData - allow the redraw to update the search array.
2010-10-16 10:06:49 +01:00
Allan Jardine
1c407778bb
Fixed: Previous fix for setting the inner header width was incorrect, and would break x-scrolling. It should be taking the width of the containing element of the main table (nScrollBody), rather than the width of the table (which when x-scrolling could be much wider than the container).
2010-10-08 08:49:03 +01:00
Allan Jardine
1b2a6ff5b1
Fixed: Table could expand on each draw, incorrectly, due to a rather convoluted mixture of the table width being 100% and the outer header not having a width set (so when the table was cloned into the header, it would expand to take up the width of the inner header element, which was the outer + the scrollbar width).
...
Change: Move version to 1.7.4.dev
2010-10-07 17:44:49 +01:00
Allan Jardine
e494695c03
Release: 1.7.3
2010-09-30 22:16:45 +01:00
Allan Jardine
44bf320ac8
Fixed: Now restore the width of the original table on fnDestory. This is needed for when using sScrollXInner, and on other occasions where using DataTables will force the table to be wider than it otherwise would be - 2840
2010-09-30 22:06:41 +01:00
Allan Jardine
596ea4b9e9
Fixed: If a TR height was specified via css globally (for example tr{height:20px}) this would cause the hidden header and footer in scrolling tables to be shown. Added override by CSS style for this - 2765
2010-09-30 21:47:46 +01:00
Allan Jardine
81107d0b7d
Fixed: State saving when there were no column being sorted was broken - 2914
2010-09-30 20:18:33 +01:00
Allan Jardine
2315bf3635
Fixed: Add a sanity check to ensure that the node given to DataTables is in fact a table - 2343
2010-09-30 08:58:12 +01:00
Allan Jardine
e4bed66535
Fixed: Stable sorting algorithm was slightly wrong when dealing with values which match each other. The idea for the stable sort is that the position shouldn't change so it should do a numeric sort of the row's current positions (the comment reflected this...) but it was in fact doing the sort on the value (aoData index), thus the "stable sort" position would reflect the original starting positions of the data, rather than the current position. The fix is to correctly look up the position of the index in the array and sort on that position (note the array is cloned, so it doesn't try to sort the dynamically sorted positions, which would make the sort unstable) - 2746
2010-09-30 08:17:38 +01:00
Allan Jardine
34aa952ec1
Fixed: When initialising multiple tables it was possible (no aoColumns given, and different number of columns) for DataTables to get confused and think one table's columns belong to another (due to a non-unique array in the initialisation object which was being wrongly used).
2010-09-20 13:15:06 +01:00
Allan Jardine
7f04b7ffb5
Fixed: When infinite scrolling, DataTables would clear it's internal cache of rows on every draw, when server-side processing was being used. This could result in fnGetNodes giving only a subset of the nodes which are visible, rather than the full set (which it now does).
2010-09-15 10:29:03 +01:00
Allan Jardine
0b8b2f7eea
Starting 1.7.3 development
2010-09-15 10:06:18 +01:00
Allan Jardine
eacaca1083
Fixed: The 'rewind' of the display start point wasn't being calculated in the same way for server-side processing and client-side. This was due to a bug in the calculation of fnDisplayEnd for server-side - 2600.
2010-09-14 20:19:21 +01:00
Allan Jardine
6031c3d0bb
Fixed: Data casting is now done after fnRender is called. This means that if you pass fnAddData a number, you'll get a number, and not the number cast as a string - 2611.
2010-09-14 19:59:23 +01:00
Allan Jardine
713008b997
Fixed: jsLint makes the fair point that escape() and unescape() are not standard functions. switched to using en/decodeURIComponent.
2010-09-14 19:49:19 +01:00
Allan Jardine
23fe13c68b
Fixed: Column visibility was not being saved when calling fnSetColumnVis. It would require another draw to save the state before - 2635.
...
Fixed: Column visibility was not be restored from the state saving cookie. A small tidy up of the column creation code as well - 2635.
2010-09-14 19:43:04 +01:00
Allan Jardine
fb20b17856
Fixed: When destroying a table which had been filtered to no results, the 'No results' row was not automatically removed, returning in the table being unable to be re-initialised (since it has a colspan).
...
Fixed: Now use escape() and unescape() for state saving cookie with the filtering strings - 2608
2010-09-14 18:51:41 +01:00
Allan Jardine
8b4769f809
Fixed: When infinte scrolling, the display start count should always be at 1, rather
...
than reflecting the paging that DataTables is using internally.
2010-09-14 16:07:43 +01:00
Allan Jardine
af9293cbfc
Fixed: A number of errors jsLint had picked up. Most trivial but worth of note are:
...
- Fixed incorrect reference for state saving cookie data string which would cause an error in jQuery 1.3 and before
- Fixed incorrect adding of anti-text selection event listeners being attached to the header elements (to many being added)
2010-09-08 21:16:28 +01:00
Allan Jardine
a8ade0297b
New: It is now possible to have elements created by sDom have an ID assigned to them as well as a class. An extension of the previous class only syntax you can now do something like "#id.class", "#id" or "class" - 2666
2010-09-08 21:08:52 +01:00
Allan Jardine
5ea6a59af6
Changed: Don't need the CVS tags in the header any more.
2010-09-08 20:42:35 +01:00
Allan Jardine
332d511649
Fixed: Destroying a scrolling table was not correctly reassembling the table from it's component parts which are split up for scrolling.
2010-09-08 20:40:18 +01:00
Allan Jardine
2c4def9353
Fixed: fnInitComplete was being called too early for server-side processing. It is now called after the first draw is complete, like the other data sources.
2010-09-07 21:37:56 +01:00
Allan Jardine
4154332be2
Fixed: Column widths we being calculated by not applied. Due to the column width calculation now being done after the header is drawn, the widths need to be likewise done afterwards.
2010-09-07 18:21:05 +01:00
Allan Jardine
fde6ba858a
New: Infinite scrolling! Building on the scrolling feature set that was introduced with 1.7, you can now have DataTables do infinite scrolling (bScrollInfinite: true), where data is loaded dynamically as and when needed by the user's interaction with scrolling. Infinite scrolling can be used by all DataTables' supported data sources without modification.
...
New: The distance from the end of the current scrolling container before new data is added (with infinite scrolling) can be controlled with iScrollLoadGap (which is a numeric value in pixels).
New: Example (basic_init/scrolling_y_infinite.html) to show how infinite scrolling can be used.
Fixed: iDraw was not being incremented for a draw that did not use server-side processing.
2010-09-05 10:21:26 +01:00
Allan Jardine
9b2a236a53
Fixed: Column width calculations are now done after DataTables has done it's required DOM manipulation. This means that column width calculations are more accurate and take account of dynamic data.
2010-09-03 08:54:55 +01:00
Allan Jardine
5f5e6a6f60
Fixed: DataTables would unnecessarily add mousedown and selectstart event handlers to TH elements which aren't used for sorting. This is used on sorting columns to prevent text selection when clicking the element to perform sorting.
2010-09-03 08:39:16 +01:00
Allan Jardine
bd992cb10a
New: When using jQuery UI theme option, DataTables will wrap the contents of sortable TH element in a DIV which can then be used to position the sorting arrow accurately across all columns. The required CSS has been added to the CSS files to show this effect.
2010-09-03 08:33:44 +01:00
Allan Jardine
4fef523262
1.7.1 version string
2010-08-22 15:43:02 +01:00
Allan Jardine
60a2701df0
Updated: Change to fnClearTable to clear the arrays in a cleaner manner
2010-08-22 15:37:36 +01:00
Allan Jardine
ced3b96264
Fixed: Themeroller 1.8 introduced a few changes from 1.7 (main fg-button* > ui-button) which was causing 1.8 themes to not show correctly. This release updates DataTables to use ThemeRoller 1.8 themes by default, but retains 1.7 backwards compatibility for now (to be removed in future) - 1559
2010-08-22 13:48:20 +01:00
Allan Jardine
60a7c58122
Fixed: Sorting classes weren't being removed in Firefox 3.0 (3.1+ were fine) - 2449
2010-08-22 13:02:01 +01:00
Allan Jardine
29d7a0a182
Fixed: fnDestroy didn't restore columns which had been hidden by DataTables, resulting in these columns being completely lost - 2569
2010-08-22 08:47:06 +01:00
Allan Jardine
505bfce7c2
Fixed: The width of the table is now not fixed to the width of the container when scrolling is not applied (this is the same behaviour as 1.6-) - 2530
2010-08-21 10:05:07 +01:00
Allan Jardine
05995bd655
Fixed (from last commit): Incorrect variable when saving state caused state saving to stop working
...
Fixed: Removed unnecessary white space from state saving cookies
2010-08-20 18:58:25 +01:00
Allan Jardine
85b923cff3
New: Cookie callback function (can be passed as an initialisation parameter) called fnCookieCallback, which allows the developer to modify the information stored in the cookie. Takes four arguments (sName, oData, sExpires, sPath) and expects a complete cookie string to be returned (with name, value, expires and path correctly formatted).
...
Updated: Now use jQuery's JSON parse function (in jQuery 1.4) rather than JSON.js
Fixed: State saving cookie used single quote strings in places (in correct JSON). This has now been addressed, and a work around in place (replace) until a sufficient period has passed
2010-08-20 18:52:16 +01:00
Allan Jardine
d5cb811698
Fixed: The second parameter for fnServerData was being passed as null when used without server-side processing. It makes much more sense to pass an empty array - 2553
2010-08-20 18:06:47 +01:00
Allan Jardine
1beb523cc1
Updated: Warning when adding a new row when the length doesn't match the known number of columns has been updated to indicate the known columns and what was added. Thanks to Adam Sah for this.
2010-08-19 09:48:51 +01:00
Allan Jardine
e69815449a
Fixed: Setting a negative width in IE results in an error (fair enough) - so stop this from happening - 2544
2010-08-18 09:17:33 +01:00
Allan Jardine
9e6094e792
New: Language callback function for the information element. This can be used to customise the language shown in the information element beyond what is possible with the built in language string options (for example plurals). The arguments are fnInfoCallback( oSettings, iStart, iEnd, iMax /*no filter*/, iTotal /*after filter*/, sOut /*DT rendered string*/ ) - 2520
2010-08-17 23:29:12 +01:00
Allan Jardine
8e2efc004f
Updated: Complex headers have been relaxed such that TH elements no longer need to be unique. There does need to be the correct TH elements with colspans and rowspans which add up, and each column requires at least one TH element for itself, but it is now possible to have two (or more) TH elements for each column.
2010-08-17 23:03:17 +01:00
Allan Jardine
5881948640
Fixed: Typo for tfoot, should be tbody - "Sanity check that there is a thead and tfoot. If not let's just create them"
2010-08-17 22:20:32 +01:00
Allan Jardine
adbaaf1ee1
Bug fixes for 2440, 2512 and 2530
2010-08-17 19:09:48 +01:00
Allan Jardine
9fcaccb570
Initial commit - DataTables 1.7.0
2010-08-17 08:42:13 +01:00