⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datatable.js

📁 这是YUI的源码及相关示例。里面有很多很炫的Javascript效果。
💻 JS
📖 第 1 页 / 共 5 页
字号:
     * @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;    },    /**     * Public accessor returns Column's calculated COLSPAN value.     *     * @method getColspan     * @return {Number} Column's COLSPAN value.     */    getColspan : function() {        return this._nColspan;    },    // Backward compatibility    getColSpan : function() {        return this.getColspan();    },    /**     * Public accessor returns Column's calculated ROWSPAN value.     *     * @method getRowspan     * @return {Number} Column's ROWSPAN value.     */    getRowspan : function() {        return this._nRowspan;    },    /**     * Returns DOM reference to the key TH element.     *     * @method getThEl     * @return {HTMLElement} TH element.     */    getThEl : function() {        return this._elTh;    },    /**     * Returns DOM reference to the TH's liner DIV element. Introduced since     * resizeable Columns may have an extra resizer liner, making the DIV liner     * not reliably the TH element's first child.                    *     * @method getThLInerEl     * @return {HTMLElement} TH element.     */    getThLinerEl : function() {        return this._elThLiner;    },        /**     * Returns DOM reference to the resizer element, or null.     *     * @method getResizerEl     * @return {HTMLElement} DIV element.     */    getResizerEl : function() {        return this._elResizer;    },    // Backward compatibility    /**     * @method getColEl     * @deprecated Use getThEl     */    getColEl : function() {        return this.getThEl();    },    getIndex : function() {        return this.getKeyIndex();    },    format : function() {    }};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -