📄 datatable-debug.js
字号:
* Number of table cells the Column spans. * * @property _nColspan * @type Number * @private */ _nColspan : 1, /** * Number of table rows the Column spans. * * @property _nRowspan * @type Number * @private */ _nRowspan : 1, /** * Column's parent Column instance, or null. * * @property _oParent * @type YAHOO.widget.Column * @private */ _oParent : null, /** * The DOM reference to the associated TH element. * * @property _elTh * @type HTMLElement * @private */ _elTh : null, /** * The DOM reference to the associated TH element's liner DIV element. * * @property _elThLiner * @type HTMLElement * @private */ _elThLiner : null, /** * The DOM reference to the associated TH element's label SPAN element. * * @property _elThLabel * @type HTMLElement * @private */ _elThLabel : null, /** * The DOM reference to the associated resizerelement (if any). * * @property _elResizer * @type HTMLElement * @private */ _elResizer : null, /** * Internal width tracker. * * @property _nWidth * @type Number * @private */ _nWidth : null, /** * For unreg() purposes, a reference to the Column's DragDrop instance. * * @property _dd * @type YAHOO.util.DragDrop * @private */ _dd : null, /** * For unreg() purposes, a reference to the Column resizer's DragDrop instance. * * @property _ddResizer * @type YAHOO.util.DragDrop * @private */ _ddResizer : null, ///////////////////////////////////////////////////////////////////////////// // // Public member variables // ///////////////////////////////////////////////////////////////////////////// /** * Unique name, required. * * @property key * @type String */ key : null, /** * Associated database field, or null. * * @property field * @type String */ field : null, /** * Text or HTML for display as Column's label in the TH element. * * @property label * @type String */ label : null, /** * Column head cell ABBR for accessibility. * * @property abbr * @type String */ abbr : null, /** * Array of object literals that define children (nested headers) of a Column. * * @property children * @type Object[] */ children : null, /** * Column width (in pixels). * * @property width * @type Number */ width : null, /** * Minimum Column width (in pixels). * * @property minWidth * @type Number * @default null */ minWidth : null, /** * When a width is not defined for a Column, maxAutoWidth defines an upper * limit that the Column should be auto-sized to. If resizeable is enabled, * users may still resize to a greater width. Most useful for Columns intended * to hold long unbroken, unwrapped Strings, such as URLs, to prevent very * wide Columns from disrupting visual readability by inducing truncation. * * @property maxAutoWidth * @type Number * @default null */ maxAutoWidth : null, /** * True if Column is in hidden state. * * @property hidden * @type Boolean * @default false */ hidden : false, /** * True if Column is in selected state. * * @property selected * @type Boolean * @default false */ selected : false, /** * Custom CSS class or array of classes to be applied to every cell in the Column. * * @property className * @type String || String[] */ className : null, /** * Defines a format function. * * @property formatter * @type String || HTMLFunction */ formatter : null, /** * Config passed to YAHOO.util.Number.format() by the 'currency' Column formatter. * * @property currencyOptions * @type Object * @default null */ currencyOptions : null, /** * Config passed to YAHOO.util.Date.format() by the 'date' Column formatter. * * @property dateOptions * @type Object * @default null */ dateOptions : null, /** * A CellEditor instance, otherwise Column is not editable. * * @property editor * @type YAHOO.widget.CellEditor */ editor : null, /** * True if Column is resizeable, false otherwise. The Drag & Drop Utility is * required to enable this feature. Only bottom-level and non-nested Columns are * resizeble. * * @property resizeable * @type Boolean * @default false */ resizeable : false, /** * True if Column is sortable, false otherwise. * * @property sortable * @type Boolean * @default false */ sortable : false, /** * @property sortOptions.defaultOrder * @deprecated Use sortOptions.defaultDir. */ /** * Default sort direction for Column: YAHOO.widget.DataTable.CLASS_ASC or YAHOO.widget.DataTable.CLASS_DESC. * * @property sortOptions.defaultDir * @type String * @default null */ /** * Custom field to sort on. * * @property sortOptions.field * @type String * @default null */ /** * Custom sort handler. * * @property sortOptions.sortFunction * @type Function * @default null */ sortOptions : null, ///////////////////////////////////////////////////////////////////////////// // // Public methods // ///////////////////////////////////////////////////////////////////////////// /** * Returns unique ID string. * * @method getId * @return {String} Unique ID string. */ getId : function() { return this._sId; }, /** * Column instance name, for logging. * * @method toString * @return {String} Column's unique name. */ toString : function() { return "Column instance " + this._sId; }, /** * Returns object literal definition. * * @method getDefinition * @return {Object} Object literal definition. */ getDefinition : function() { var oDefinition = {}; // Update the definition oDefinition.abbr = this.abbr; oDefinition.className = this.className; oDefinition.editor = this.editor; oDefinition.editorOptions = this.editorOptions; //TODO: deprecated oDefinition.field = this.field; oDefinition.formatter = this.formatter; oDefinition.hidden = this.hidden; oDefinition.key = this.key; oDefinition.label = this.label; oDefinition.minWidth = this.minWidth; oDefinition.maxAutoWidth = this.maxAutoWidth; oDefinition.resizeable = this.resizeable; oDefinition.selected = this.selected; oDefinition.sortable = this.sortable; oDefinition.sortOptions = this.sortOptions; oDefinition.width = this.width; return oDefinition; }, /** * Returns unique Column key. * * @method getKey * @return {String} Column key. */ getKey : function() { return this.key; }, /** * Returns field. * * @method getField * @return {String} Column field. */ getField : function() { return this.field; }, /** * Returns Column key which has been sanitized for DOM (class and ID) usage * starts with letter, contains only letters, numbers, hyphen, or period. * * @method getSanitizedKey * @return {String} Sanitized Column key. */ getSanitizedKey : function() { return this.getKey().replace(/[^\w\-.:]/g,""); }, /** * Public accessor returns Column's current position index within its * ColumnSet's keys array, if applicable. Only non-nested and bottom-level * child Columns will return a value. * * @method getKeyIndex * @return {Number} Position index, or null. */ getKeyIndex : function() { return this._nKeyIndex; }, /** * Public accessor returns Column's current position index within its * ColumnSet's tree array, if applicable. Only non-nested and top-level parent * Columns will return a value; * * @method getTreeIndex * @return {Number} Position index, or null. */ getTreeIndex : function() { return this._nTreeIndex; }, /** * Public accessor returns Column's parent instance if any, or null otherwise. * * @method getParent * @return {YAHOO.widget.Column} Column's parent instance. */ getParent : function() { return this._oParent; }, /**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -