提交 1409d975 编写于 作者: U unknown

修复CMS列表排序可能存在的问题

上级 b05b4de9
...@@ -345,6 +345,7 @@ MWF.xApplication.cms.Module.ListExplorer.DefaultList = new Class({ ...@@ -345,6 +345,7 @@ MWF.xApplication.cms.Module.ListExplorer.DefaultList = new Class({
this.loadElementList(); this.loadElementList();
}, },
resort : function(th){ resort : function(th){
debugger;
this.orderField = th.retrieve("field"); this.orderField = th.retrieve("field");
var orderType = th.retrieve("orderType"); var orderType = th.retrieve("orderType");
//th.eliminate(orderType); //th.eliminate(orderType);
...@@ -757,16 +758,20 @@ MWF.xApplication.cms.Module.ListExplorer.List = new Class({ ...@@ -757,16 +758,20 @@ MWF.xApplication.cms.Module.ListExplorer.List = new Class({
}.bind(this)); }.bind(this));
}, },
resort : function(th){ resort : function(th){
debugger;
this.orderField = th.retrieve("field"); this.orderField = th.retrieve("field");
this.orderType = ( th.retrieve("orderType") || "" ).toLowerCase(); this.orderType = ( th.retrieve("orderType") || "" ).toLowerCase();
//th.eliminate(orderType); if( this.orderField === this.data.orderField ){
if( this.orderType == "" ){ this.orderType = this.orderType === "asc" ? "desc" : "asc";
this.orderType = "asc";
}else if( this.orderType == "asc" ){
this.orderType = "desc";
}else{ }else{
this.orderField = this.data.orderField ? this.data.orderField : ""; if( this.orderType == "" ){
this.orderType = this.data.orderType ? this.data.orderType : ""; this.orderType = "asc";
}else if( this.orderType == "asc" ){
this.orderType = "desc";
}else{
this.orderField = this.data.orderField ? this.data.orderField : "";
this.orderType = this.data.orderType ? this.data.orderType : "";
}
} }
this.reload(); this.reload();
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册