X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..6a7e4474cba9d8be4b2ec445e10f1691f7277c50:/examples/ux/treegrid/TreeGridColumns.js diff --git a/examples/ux/treegrid/TreeGridColumns.js b/examples/ux/treegrid/TreeGridColumns.js index ea2732c5..e10980e2 100644 --- a/examples/ux/treegrid/TreeGridColumns.js +++ b/examples/ux/treegrid/TreeGridColumns.js @@ -1,34 +1,28 @@ /*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC + * Ext JS Library 3.2.0 + * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license */ -(function() { +(function() { Ext.override(Ext.list.Column, { - init : function() { - if(!this.type){ - this.type = "auto"; + init : function() { + var types = Ext.data.Types, + st = this.sortType; + + if(this.type){ + if(Ext.isString(this.type)){ + this.type = Ext.data.Types[this.type.toUpperCase()] || types.AUTO; + } + }else{ + this.type = types.AUTO; } - var st = Ext.data.SortTypes; // named sortTypes are supported, here we look them up - if(typeof this.sortType == "string"){ - this.sortType = st[this.sortType]; - } - - // set default sortType for strings and dates - if(!this.sortType){ - switch(this.type){ - case "string": - this.sortType = st.asUCString; - break; - case "date": - this.sortType = st.asDate; - break; - default: - this.sortType = st.none; - } + if(Ext.isString(st)){ + this.sortType = Ext.data.SortTypes[st]; + }else if(Ext.isEmpty(st)){ + this.sortType = this.type.sortType; } } });