提交 be0a8868 编写于 作者: U unknown

修复selector搜索无下级分类组织时的问题

上级 577985b3
......@@ -161,6 +161,7 @@ MWF.xApplication.Selector.Unit = new Class({
},
_listItemByKey: function(callback, failure, key){
if( this.options.expandSubEnable ){
if (this.options.units.length){
var units = [];
this.options.units.each(function(u){
......@@ -176,6 +177,14 @@ MWF.xApplication.Selector.Unit = new Class({
this.orgAction.listUnitByKey(function(json){
if (callback) callback.apply(this, [json]);
}.bind(this), failure, key);
}else{
if (key){
this.initSearchArea(true);
this.searchInItems(key);
}else{
this.initSearchArea(false);
}
}
},
_getItem: function(callback, failure, id, async){
this.orgAction.getUnit(function(json){
......
......@@ -73,6 +73,7 @@ MWF.xApplication.Selector.UnitWithType = new Class({
},
_listItemByKey: function(callback, failure, key){
if( this.options.expandSubEnable ){
key = {"key": key};
if (this.options.units.length){
var units = [];
......@@ -90,6 +91,14 @@ MWF.xApplication.Selector.UnitWithType = new Class({
this.orgAction.listUnitByKey(function(json){
if (callback) callback.apply(this, [json]);
}.bind(this), failure, key);
}else{
if (key){
this.initSearchArea(true);
this.searchInItems(key);
}else{
this.initSearchArea(false);
}
}
},
_getItem: function(callback, failure, id, async){
this.orgAction.getUnit(function(json){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册