提交 c3f2c27c 编写于 作者: U unknown

人员选择组件增加afterCheckSelectSingleItem事件

上级 97c1e443
......@@ -1458,20 +1458,16 @@ MWF.xApplication.Selector.Person = new Class({
},
_selectSingleItem : function(){
var _self = this;
var isSingleItem = false;
var checkItem = function () {
if(this.items.length === 1 || this.subItems.length === 1 ){
if( this.items.length === 1 && this.subItems.length === 0 ){
isSingleItem = true;
if( !this.items[0].isSelected )this.items[0].clickItem();
this.fireEvent("afterSelectSingleItem",[this, this.items[0]]);
}else if( this.items.length === 0 && this.subItems.length === 1 ){
isSingleItem = true;
if( !this.items[0].isSelected )this.subItems[0].clickItem();
this.fireEvent("afterSelectSingleItem",[this, this.items[0]])
}else if( this.items.length === 1 && this.subItems.length === 1 ){
if( this.items[0] === this.subItems[0] ){
isSingleItem = true;
if( !this.items[0].isSelected )this.items[0].clickItem();
this.fireEvent("afterSelectSingleItem",[this, this.items[0]])
}else{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册