梦幻之旅

DEBUG - 天道酬勤

   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  671 随笔 :: 6 文章 :: 256 评论 :: 0 Trackbacks
Ext.data.Store.prototype.applySort = function()
        
{
            
if(this.sortInfo && !this.remoteSort)
            
{
                
var s = this.sortInfo, f = s.field;
                
var st = this.fields.get(f).sortType;
                
var fn = function(r1, r2)
                
{
                    
var v1 = st(r1.data[f]), v2 = st(r2.data[f]);
                    
if(typeof(v1) == "string")
                    
{
                        
return v1.localeCompare(v2);
                    }

                    
return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
                }
;
                
this.data.sort(s.direction, fn);
                
if(this.snapshot && this.snapshot != this.data)
                
{
                    
this.snapshot.sort(s.direction, fn);
                }

            }

        }
;
posted on 2011-01-09 00:02 HUIKK 阅读(441) 评论(1)  编辑  收藏 所属分类: EXT

评论

# re: Ext combox 中文排序 2014-09-05 14:51 78
啊u会发生栏杆上的房间内嘎嘎嘎嘎嘎嘎个是大法官的发生过圣达菲个  回复  更多评论
  


只有注册用户登录后才能发表评论。


网站导航: