📄 readme
字号:
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 changeshave 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 drivenDataTables. 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 instanceAttributes, 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 aninstance 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 deletingrows or Columns). This is a change from prior behavior, when the the renderEventwould *not* fire if the initEvent was fired and only when the entire view wasrendered (such as a new page). There is now a new postRenderEvent which firesafter 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 TDelements, 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 whentotalRecords 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 beenmade:- applied "table-layout:fixed" to TABLE elements- removed "overflow:hidden" from TH and TD elements- removed "white-space:nowrap" from TD elementsAs a result, implementers may notice a change in the widths of their renderedDataTables, which should be resolved by setting widths explicitly via CSS oryour Column definitions.* Selection model issues have been addressed by clearing up ambiguous ID andindex usage. Record instances are now assigned globally unique and immutable IDstrings (no longer numbers). Record indexes are numbers that are mutable in order
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -