CommunityID/webdir/javascript/yui/datatable
2019-07-17 22:16:19 +02:00
..
assets import v1.1.0_beta1 | 2009-08-21 2019-07-17 22:16:19 +02:00
datatable-debug.js import v1.1.0_beta1 | 2009-08-21 2019-07-17 22:16:19 +02:00
datatable-min.js import v1.1.0_beta1 | 2009-08-21 2019-07-17 22:16:19 +02:00
datatable.js import v1.1.0_beta1 | 2009-08-21 2019-07-17 22:16:19 +02:00
README import v1.0.0-RC4 | 2009-05-20 2019-07-17 22:08:50 +02:00

DataTable Release Notes

*** version 2.6.0 ***

* GA release.
* Created new subclass ScrollingDataTable. Created new classes CellEditor,
BaseCellEditor, and associated subclasses. As a result, the following API changes
have been made:
   - DataTable.editCheckbox is no longer supported. The CheckboxCellEditor class should be used instead.
   - DataTable.editDate is no longer supported. The DateCellEditor class should be used instead.
   - DataTable.editDropdown is no longer supported. The DropdownCellEditor class should be used instead.
   - DataTable.editRadio is no longer supported. The RadioCellEditor class should be used instead.
   - DataTable.editTextarea is no longer supported. The TextareaCellEditor class should be used instead.
   - DataTable.editTextbox is no longer supported. The TextboxCellEditor class should be used instead.
   - editorUpdateEvent is no longer supported.
   - showCellEditorBtns() is no longer supported. The CellEditor method renderBtns() should be used instead.
   - resetCellEditor() renamed to destroyCellEditor().
   - Values for checkboxOptions, dropdownOptions, and radioOptions must be either a
   simple Array or an array of object literals with properties "value" and "label".
   - A new CellEditor property asyncSubmitter can be used to submit input values
   and will block the DataTable UI (via new DataTable methods disable() and
   undisable()) until the callback function is executed to finish the transaction.
   - The CellEditor's "Save" and "Cancel" buttons now have configurable labels.
   - CellEditor validator functions, including the built-in function YAHOO.widget.DataTable.validateNumber
   must return undefined for invalid values.
   
* Pagination and sorting have been reworked to better support dynamically driven
DataTables. As a result, the following important changes have been made:
    - Removed support for "magic meta" fields
    - The following APIs have been removed:
        * "paginationEventHandler" Attribute
        * handleSimplePagination()
        * handleDataSourcePagination()        
        * updatePaginator()
        * showPage()
        * formatPaginator()
        * formatPaginationDropdown()
        * formatPaginatorLinks()
    - The following APIs have been added:
        * "dynamicData" Attribute
    - The following APIs have been changed:
        * onPaginatorChange() has been renamed to onPaginatorChangeRequest()
    - Removed backward compatibility support for the "paginated" Attribute and
   the object literal "paginator" Attribute value. Implementers must use the Paginator
   class to populate the "paginator" Attribute.

* The following APIs have been changed from static class properties to instance
Attributes, to be set via the initial config or myDataTable.set():
    - MSG_EMPTY
    - MSG_ERROR
    - MSG_LOADING
    - COLOR_COLUMNFILLER (ScrollingDataTable)
    
* The formatTheadCell() method been changed from static a static method to an
instance method with an update to its argument signature.

* The initEvent will fire when rows are rendered from an initialized state, 
and the renderEvent will always fire when rows are rendered, and also when the 
underlying DOM incrementally changes (such as incrementally adding or deleting
rows or Columns). This is a change from prior behavior, when the the renderEvent
would *not* fire if the initEvent was fired and only when the entire view was
rendered (such as a new page). There is now a new postRenderEvent which fires
after the renderEvent, once the post-render cleanup routine has executed (i.e.,
Column width validations).

* For consistency with other doBefore abstract methods, doBeforeShowCellEditor()
returns true by default, and returns false to cancel showing the cell editor.

* Added the following APIs 
   - configs property
   - getBdTableEl() method (ScrollingDataTable only)
   - getHdContainerEl() method (ScrollingDataTable only)
   - getHdTableEl() method (ScrollingDataTable only)
   - updateCell() method
   - currencyOptions, dateOptions, and numberOptions Attributes for default formatting

* Column changes:
   - minWidth default value now null.
   - Added Column.maxAutoWidth property
   - Removed unused Column._oDefinition private property.
   - Hidden Columns are now manifested as cell liner elements with display:none
   to prevent content from being visible.
   - Resizeable Columns now create an additional resizer liner DIV element between
   the TH element and the liner DIV element. Implementers are advised to access the 
   liner DIV elements via Column.getThLinerEl() rather than TH.firstChild.
   - currencyOptions, dateOptions, and numberOptions properties for robust per-Column formatting
 
* In the markup, the primary data TBODY is (once again) before the message TBODY element.
 
* TR element IDs are now assigned with the corresponding Record ID.
 
* Removed unused TD ID assignments.
 
* All CSS clases representing Column states now assigned directly on TH and TD
elements, not on liner DIV elements.
 
* Added bottom border to last TR element in ScrollingDataTables.
 
* paginator attribute can be set to null to remove pagination.

* Paginator extracted to standalone class and optional dependency.
 
* The default CSS styles for captions have been updated.

* addRows(data, index) now inserts rows in the correct order

* initializeTable now resets Paginator's totalRecords

* default cell formatting broken out into Formatter collection method


*** version 2.5.2 ***

* Paginator now updates recordOffset to the starting index of the last page when
totalRecords is set to a size smaller than the current recordOffset.

* Assorted pagination and scrolling bugs.

* Resizing a Column no longer inadvertantly sorts it in IE.
 
* Header text no longer wraps by default.
 
* Added UI to fill gap when a scrolling DataTable is narrower than its container.
 
* Fixed wrong assignment of classnames for TDs and message cell.
 
* Fixed bugs for width, minWidth, and hidden Column values in non-scrolling DataTables.
 
* Added getBdContainerEl() method.



*** version 2.5.1 ***

* Only split THEAD from TBODY markup for scrollable tables.
* columnResizeEvent sends new width value.
* Improved performance for adding, deleting, and updating rows dynamically.



*** version 2.5.0 ***

* Introduced YAHOO.widget.Paginator to manage pagination.
* Introduced YAHOO.util.Chain to allow for progressive rendering.

Removed APIs

    * CLASS_SCROLLBODY
    * CLASS_TABLE
    * getTableEl()

Changed APIs

    * initializeTable() - No longer takes any arguments. Data must be added as a separate step.
    * doBeforeLoadData(sRequest, oResponse, oPayload) - oResponse is now the converted full response (typed JSON or XML as appropriate). oPayload is now an optional data payload implementer can pass in to DataSource.sendRequest via the callback object literal.
    * formatCell() - The first argument, elCell, is now a reference to the cell liner element rather than the TD itself.
    * onDataReturnAppendRows(sRequest, oResponse, oPayload) - oResponse is now the converted full response (typed JSON or XML as appropriate). oPayload is now an optional data payload implementer can pass in to DataSource.sendRequest via the callback object literal.
    * onDataReturnInitializeTable(sRequest, oResponse, oPayload) - oResponse is now the converted full response (typed JSON or XML as appropriate). oPayload is now an optional data payload implementer can pass in to DataSource.sendRequest via the callback object literal.
    * onDataReturnInsertRows(sRequest, oResponse, oPayload) - oResponse is now the converted full response (typed JSON or XML as appropriate). oPayload is now an optional data payload implementer can pass in to DataSource.sendRequest via the callback object literal.
    * paginator - Should now be an instance of YAHOO.widget.Paginator.
    * sortedBy.dir - Use CLASS_ASC or CLASS_DESC instead of "asc" and "desc" strings.
    * Scrolling must be enabled via the configs "scrollable", "width", and "height". CSS should no longer be used to set width or height on scrollable tables.    

Deprecated APIs

    * formatPaginatorDropdown() - Use new Paginator class.
    * formatPaginatorLinks() - Use new Paginator class.
    * formatPaginators() - Use new Paginator class.
    * refreshView() - Use render().
    * showPage() - Use new Paginator class.
    * updatePaginator() - Use new Paginator class.
    * headerCellClickEvent - Use theadCellClickEvent.
    * headerCellDblclickEvent - Use theadCellDblclickEvent.
    * headerCellMousedownEvent - Use theadCellMousedownEvent.
    * headerCellMouseoutEvent - Use theadCellMouseoutEvent.
    * headerCellMouseoverEvent - Use theadCellMouseoverEvent.
    * headerLabelClickEvent - Use theadLabelClickEvent.
    * headerLabelDblclickEvent - Use theadLabelDblclickEvent.
    * headerLabelMousedownEvent - Use theadLabelMousedownEvent.
    * headerLabelMouseoutEvent - Use theadLabelMouseoutEvent.
    * headerLabelMouseoverEvent - Use theadLabelMouseoverEvent.
    * headerRowClickEvent - Use theadRowClickEvent.
    * headerRowDblclickEvent - Use theadRowDblclickEvent.
    * headerRowMousedownEvent - Use theadRowMousedownEvent.
    * headerRowMouseoutEvent - Use theadRowMouseoutEvent.
    * headerRowMouseoverEvent - Use theadRowMouseoverEvent.
    * refreshEvent - Use renderEvent.
    * paginated - No longer used, as long as "paginator" value is an instance of Paginator class.


RecordSet

    * updateKey() - Use updateRecordValue().
    * keyUpdateEvent - Use recordValueUpdateEvent.

Column

    * width - Must now be a number. Strings will be ignored.
    * sortOptions.defaultOrder - Use sortOptions.defaultDir, and use CLASS_ASC or CLASS_DESC instead of "asc" and "desc" strings.



*** version 2.4.0 ***

* No changes.



*** version 2.3.1 ***

* For better support of resizeable Columns, the following core CSS changes have been
made:

- applied "table-layout:fixed" to TABLE elements
- removed "overflow:hidden" from TH and TD elements
- removed "white-space:nowrap" from TD elements

As a result, implementers may notice a change in the widths of their rendered
DataTables, which should be resolved by setting widths explicitly via CSS or
your Column definitions.

* Selection model issues have been addressed by clearing up ambiguous ID and
index usage. Record instances are now assigned globally unique and immutable ID
strings (no longer numbers). Record indexes are numbers that are mutable in order
to represent Record order within a RecordSet instance. TR elements are assigned
DOM ID strings that are *unrelated* to Record instance IDs and Record indexes. Be
aware that DOM element IDs will get reused when sorting and paginating. Furthermore,
Column instances are assigned globally unique and immutable ID strings
(no longer numbers). Column indexes are numbers that are mutable and represent
Column order within a ColumnSet instance. Please refer to the API documentation
for details on when to use Record/Column instance IDs, DOM element IDs, and
Record/Column index numbers.

* Enabling row or cell selection no longer breaks clicks on links and form elements.



*** version 2.3.0 ***

* DataSource requests over XHR no longer automatically insert a "?" in the URIs
between the host and the query. Implementers should explicitly include the
question mark if it is required by your server. Please refer to the XHR
examples for implementation details.

* Applied new skinning model.

* The MVC model has been stabilized and many APIs have been renamed or changed
quite a bit from the previous version. Implementers should now only use
DataTable APIs and not use any Record or RecordSet APIs to add/delete/update
rows, Records, and DOM elements. RecordSet synchronization will be managed for
you under the hood. For example, myDataTable.addRow() now accepts an object
literal of data and will create a Record and update the DOM. Calling
myDataTable.deleteRow() will delete the appropriate Record and update the DOM.
Please refer to the API reference for full details on property and method names and
argument signatures. When possible, Logger messages will provide deprecation warnings,
so implementers upgrading from the previous version are encouraged to use the debug
build of DataTable.

* The DataTable constructor signature has changed in 2 major ways:
1) Do not pass in a ColumnSet instance. Instead, pass in an array of Column
definitions directly, and a ColumnSet instance will be created for you under the hood.
2) In the progressive enhancement case, first instantiate a DataSource pointing
to your HTML TABLE element, and then pass in that DataSource instance to your
DataTable constructor. Please refer to the progressive enhancement example
for implementation details.

* DataTable now extends Element, which has become a required dependency. Implementers
should now use the myDataTable.set("propertyName", newValue) syntax instead of direct
dot notation of any properties.

* The underlying pagination architecture and API have been revised. Specifically,
the property paginator has been deprecated in favor of paginated,
paginatorOptions has been deprecated in favor of paginator, and related events
and method names have been changed. Please see the pagination examples for
implementation details. Please refer to the API reference for full details on
new property and method names and argument signatures.

* There is a known pagination bug where changing the rows-per-page dropdown while
on a page number that is out of bounds of the new range, the current page value
fails to get reset to an appropriate default value.

* There is a known pagination bug where custom containers are ignored.

* There is a known bug where row and cell selections are not tracked correctly in
paginated DataTables.

* The underlying editing architecture and API have been revised. Specifically, the
ColumnEditor class is no longer used, the method editCell() has been deprecated
in favor of showCellEditor(), and the Custom Event "cellEditEvent" is now
"editorSaveEvent". Please see the inline editing example for
implementation details. Please refer to the API reference for full details on
property and method names and argument signatures.

* There is a known issue where the built-in date editor throws a JavaScript
exception when encountering a null or non-Date value. Implementers using the built-in
date editor should validate for type Date and avoid null values in these data
fields.

* The underlying sort architecture, including YAHOO.util.Sort, has been modified
to accept a single sort function rather than separate functions for ascending
and descending sorts.

* Scrolling a DataTable with an active Cell Editor will cancel the edit to
to prevent the Cell Editor's position from getting out of sync with its
associated TD element.

* The following static methods are executed in the scope of the DataTable
instance: DataTable.validateNumber(), DataTable.formatButton(),
DataTable.formatCheckbox(), DataTable.formatCurrency(), DataTable.formatDate(),
DataTable.formatDropdown(), DataTable.formatEmail(), DataTable.formatLink(),
DataTable.formatNumber(), DataTable.formatRadio(), DataTable.formatText(),
DataTable.formatTextarea(), DataTable.formatTextbox().

* The following DataTable APIs have changed:
- The following static constants have been removed: CLASS_CURRENCY, CLASS_CURRENTPAGE,
CLASS_DATE, CLASS_EMAIL, CLASS_FIRSTLINK, CLASS_FIRSTPAGE, CLASS_HEADCONTAINER,
CLASS_HEADRESIZER, CLASS_HEADTEXT, CLASS_HIGHLIGHT, CLASS_LASTLINK, CLASS_LASTPAGE,
CLASS_LINK, CLASS_NEXTLINK, CLASS_NEXTPAGE, CLASS_NUMBER, CLASS_PAGELINK,
CLASS_PAGELINKS, CLASS_PAGESELECT, CLASS_PREVLINK, CLASS_PREVPAGE, CLASS_SORTEDBYASC,
CLASS_SORTEDBYDESC, CLASS_STRING.
- The following static constants have been added: CLASS_ASC, CLASS_BUTTON,
CLASS_DEFAULT, CLASS_DESC, CLASS_DISABLED, CLASS_DROPDOWN, CLASS_HEADER,
CLASS_HIGHLIGHTED, CLASS_LABEL, CLASS_NEXT, CLASS_PAGE, CLASS_PREVIOUS,
CLASS_RESIZER
- The property contextMenu is no longer supported.
- The property dataSource has been deprecated in favor of the accessor method
getDataSource().
- The property fixedWidth is not fully supported.
- The property sortedBy now defines key instead of colKey.
- The property rowSingleSelect has been deprecated in favor of selectionMode.

* The following Record APIs have changed:
- Record data values are no longer accessible with oRecord[key] or oRecord.key.
Implementers should now use oRecord.getData(key).
- The property yuiRecordId has been deprecated in favor of the accessor method
getId().

* The following RecordSet APIs have changed:
- The method getRecordBy() is not implemented.
- The method insert() has been deprecated in favor of addRecord() and addRecords().
- The method replace() has been renamed replaceRecords().
- The method sort() has been deprecated in favor of sortRecords().

* The following Column APIs have changed:
- Column type has been deprecated in favor of formatter. In your Column
definitions, please change type:"date" to formatter:"date", type:"currency" to
formatter:"currency", etc.
- The property parser is no longer used. Implementers should use the static
DataSource methods DataSource.parseDate(), DataSource.parseNumber(), and
DataSource.parseString() for type conversion functionality.
- The methods getColSpan() and getRowSpan() have been renamed to getColspan()
and getRowspan().
- The return value for the method getId() has been changed.
- The following methods are no longer implemented: parse(), parseCheckbox(),
parseDate(), parseNumber(), parseSelect(). Implementers should now use a
DataSource with a data type of HTML TABLE element.
- The showEditor() method is no longer implemented. Implementers should now use
the DataTable method showCellEditor().
- All static formatter functions have been moved from the Column class to the
DataTable class.

* The DataTable method getColumn() has a known issue where instead of accepting
a Column's key index value, the method accepts a Column's ID value. Until this
issue is fixed, implementers can use the following workaround:

    // Instead of this:
    // var oColumn = myDataTable.getColumn(0);

    // Use this:
    var oColumn = myDataTable.getColumn(myDataTable.getFirstTrEl().cells[0].yuiColumnId);










*** version 2.2.2 ***

* Removed workaround for a fixed Dom.getXY() bug that was causing a positioning
problem for inline editors on scrolled pages.



**** version 2.2.1 ***

* Changed default pagination from enabled to disabled. Must set property
paginator to true to enable built-in client-side pagination.
* Removed deleteSelectedRows() and added deleteRows().
* Deprecated properties isEmpty and isLoading, and methods showLoadingMessage(),
showEmptyMessage(), and hideTableMessages(). Implementers should now use
showTableMessage() and hideTableMessage().
* Deprecated methods paginateRows() and onDataReturnPaginateRows(). Implementers
should now use popualateTable() and onDataReturnPopulateTable().
* Deprecated pagination properties pageCurrent, rowsPerPage, startRecordIndex,
pageLinksLength, rowsPerPageDropdown, pageLinksStart, and pagers.
* Fixed unclickable links.
* Fix to support data values of 0 (zero).
* Fixed broken validation in multiple places when the value 0 (zero) is passed
in as an argument.
* Fixed incorrect month output in formatDate().
* Fixed broken empty message when there are zero rows.
* Allow implementers to use data with field name "id".
* Fixed Column resizeability in -min builds.
* Fixed Column sorting of null, undefined, and empty values.
* Fixed Column sorting of nested headers.
* Fixed paginator dropdowns to stay in sync when paginating.
* Fixed rowSingleSelect for paginated DataTable.
* Fix for currency values with more than 2 decimal places.
* Fixed broken TR ID assignments in replaceRows().
* Fixed Opera UI artifacting problem when repaginating via dropdowns.
* Fixed orphaned ColumnEditor during pagination or other de facto blur
interaction. Data gets saved.
* Extracted non-foundational CSS for scrollable DataTables to make UI easier to
customize.
* Updated methods select() and unselect() to also accept an array of elements or
an array of strings.
* Improved row selection behavior to model the desktop paradigm (i.e., require
CONTROL and/or SHIFT keys to multi-select).
* Tweaked inline editing for better Mac performance.
* Refactored pagination code to be easier to implement, configure, and extend.
* Accept an error boolean from DataSource in case of data error and show error
message.
* The CustomEvent rowDeleteEvent is now only fired once per deleted row and
its argument signature has been modified.
* Added selectRow(), rowSelectEvent, unselectRow(), rowUnselectEvent, rowAddEvent,
and rowUpdateEvent.
* Added constants CLASS_TABLE, CLASS_EDITOR, CLASS_FIRST, and CLASS_LAST.
* Added ColumnEditor class moveContainerTo().
* Add IDs and class hooks to TABLE element and ColumnEditor's container DIV.
* Add class hooks to first and last TR elements.
* Added hook to doBeforeLoadData() for the not-from-markup constructor flow.
* Added properties paginator and paginatorOptions, as well as method getPaginator().
* Added methods saveEditorData() and cancelEditorData().
* Improved type checking with YAHOO.lang.



**** version 2.2.0 ***

* Beta release.
* Caption is not supported when scrolling is enabled.
* Resizeability is not supported for fixed-width DataTables.