X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..76cb34406ceaf9681a76e13b531d7eafa483ad88:/examples/tree/ColumnNodeUI.js diff --git a/examples/tree/ColumnNodeUI.js b/examples/tree/ColumnNodeUI.js deleted file mode 100644 index 49e48d9e..00000000 --- a/examples/tree/ColumnNodeUI.js +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Ext JS Library 2.2.1 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -Ext.tree.ColumnTree = Ext.extend(Ext.tree.TreePanel, { - lines:false, - borderWidth: Ext.isBorderBox ? 0 : 2, // the combined left/right border for each cell - cls:'x-column-tree', - - onRender : function(){ - Ext.tree.ColumnTree.superclass.onRender.apply(this, arguments); - this.headers = this.body.createChild( - {cls:'x-tree-headers'},this.innerCt.dom); - - var cols = this.columns, c; - var totalWidth = 0; - - for(var i = 0, len = cols.length; i < len; i++){ - c = cols[i]; - totalWidth += c.width; - this.headers.createChild({ - cls:'x-tree-hd ' + (c.cls?c.cls+'-hd':''), - cn: { - cls:'x-tree-hd-text', - html: c.header - }, - style:'width:'+(c.width-this.borderWidth)+'px;' - }); - } - this.headers.createChild({cls:'x-clear'}); - // prevent floats from wrapping when clipped - this.headers.setWidth(totalWidth); - this.innerCt.setWidth(totalWidth); - } -}); - -Ext.tree.ColumnNodeUI = Ext.extend(Ext.tree.TreeNodeUI, { - focus: Ext.emptyFn, // prevent odd scrolling behavior - - renderElements : function(n, a, targetNode, bulkRender){ - this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : ''; - - var t = n.getOwnerTree(); - var cols = t.columns; - var bw = t.borderWidth; - var c = cols[0]; - - var buf = [ - '
  • ', - '"]; - for(var i = 1, len = cols.length; i < len; i++){ - c = cols[i]; - - buf.push('
    ', - '
    ',(c.renderer ? c.renderer(a[c.dataIndex], n, a) : a[c.dataIndex]),"
    ", - "
    "); - } - buf.push( - '
    ', - '', - "
  • "); - - if(bulkRender !== true && n.nextSibling && n.nextSibling.ui.getEl()){ - this.wrap = Ext.DomHelper.insertHtml("beforeBegin", - n.nextSibling.ui.getEl(), buf.join("")); - }else{ - this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf.join("")); - } - - this.elNode = this.wrap.childNodes[0]; - this.ctNode = this.wrap.childNodes[1]; - var cs = this.elNode.firstChild.childNodes; - this.indentNode = cs[0]; - this.ecNode = cs[1]; - this.iconNode = cs[2]; - this.anchor = cs[3]; - this.textNode = cs[3].firstChild; - } -}); \ No newline at end of file