diff --git a/o2web/source/x_component_Selector/Identity.js b/o2web/source/x_component_Selector/Identity.js index 61cb654f8f892b52837f21e53cbcfd2f3228bd25..de07fdb9adf27d88e5b238cde9f138b3bfc03e06 100644 --- a/o2web/source/x_component_Selector/Identity.js +++ b/o2web/source/x_component_Selector/Identity.js @@ -1637,6 +1637,8 @@ MWF.xApplication.Selector.Identity.Include = new Class({ this.selector.items.push(item); if( category && category.subItems ){ category.subItems.push( item ); + }else if(this.selector.subItems){ + this.selector.subItems.push( item ) } } }.bind(this)); @@ -1657,6 +1659,8 @@ MWF.xApplication.Selector.Identity.Include = new Class({ this.selector.items.push(item); if( category && category.subItems ){ category.subItems.push( item ); + }else if(this.selector.subItems){ + this.selector.subItems.push( item ) } } }.bind(this)); diff --git a/o2web/source/x_component_Selector/Person.js b/o2web/source/x_component_Selector/Person.js index 897dc40a69779ccfa2d774c673b87a5ecd546ab0..3da269774eddb9cd6822e747a5f917437253109a 100644 --- a/o2web/source/x_component_Selector/Person.js +++ b/o2web/source/x_component_Selector/Person.js @@ -1457,15 +1457,19 @@ MWF.xApplication.Selector.Person = new Class({ } }, _selectSingleItem : function(){ + var _self = this; var checkItem = function () { if(this.items.length === 1 || this.subItems.length === 1 ){ if( this.items.length === 1 && this.subItems.length === 0 ){ 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 ){ 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] ){ if( !this.items[0].isSelected )this.items[0].clickItem(); + this.fireEvent("afterSelectSingleItem",[this, this.items[0]]) } } } @@ -1475,11 +1479,13 @@ MWF.xApplication.Selector.Person = new Class({ if( !category.subCategorys || category.subCategorys.length === 0 ){ if( category.subItems && category.subItems.length === 1 ){ if( !category.subItems[0].isSelected )category.subItems[0].clickItem(); + _self.fireEvent("afterSelectSingleItem",[_self, category.subItems[0]]) } }else if(category.subCategorys.length === 1){ if( category.subItems && category.subItems.length > 0 ){ }else if( !category.subCategorys[0]._hasChild || !category.subCategorys[0]._hasChild() ){ //category.subCategorys[0].isItem && if( !category.subItems[0].isSelected )category.subItems[0].clickItem(); + _self.fireEvent("afterSelectSingleItem",[_self, category.subItems[0]]) }else{ checkCategory( category.subCategorys[0] ) } @@ -1498,6 +1504,7 @@ MWF.xApplication.Selector.Person = new Class({ if( list.length === 0 ){ if( category.subItems && category.subItems.length === 1 ){ if( !category.subItems[0].isSelected )category.subItems[0].clickItem(); + _self.fireEvent("afterSelectSingleItem",[_self, category.subItems[0]]) } } }