diff --git a/o2web/source/x_component_Selector/Person.js b/o2web/source/x_component_Selector/Person.js index ad34ef50f6f6c890d27a7b23a031cc44740e3d76..6e6afaa575dca603d5a8e841c806b6392d58d9df 100644 --- a/o2web/source/x_component_Selector/Person.js +++ b/o2web/source/x_component_Selector/Person.js @@ -1703,6 +1703,14 @@ MWF.xApplication.Selector.Person.Item = new Class({ } }, loadSubItem: function(){}, + disable : function(){ + this.node.hide(); + this.disabled = true; + }, + enable : function(){ + this.node.show(); + this.disabled = false; + }, check: function(){ //if (this.selector.options.count.toInt()===1){ // this.checkSelectedSingle(); @@ -2365,7 +2373,7 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({ if ((count.toInt()===0) || (this.selector.selectedItems.length+(this.subItems.length-selectedSubItemCount))<=count){ var checkedCount = 0; this.subItems.each( function(item){ - if(!item.isSelected)item.selected( false, function () { + if(!item.isSelected && !item.disabled )item.selected( false, function () { checkedCount++; if( this.subItems.length === checkedCount ){ if( checkValid )this.selector.fireEvent("valid", [this.selector, this]); diff --git a/o2web/source/x_component_Selector/Unit.js b/o2web/source/x_component_Selector/Unit.js index d3bf01bda705cde76cb2c512990b33dc13e3f968..38e112d4781a928835b4f903b1a4fd3d35f6d67f 100644 --- a/o2web/source/x_component_Selector/Unit.js +++ b/o2web/source/x_component_Selector/Unit.js @@ -396,7 +396,7 @@ MWF.xApplication.Selector.Unit.Item = new Class({ this.selectAll(ev, checkValid); if( this.subCategorys && this.subCategorys.length ){ this.subCategorys.each( function( category ){ - if(category.selectAllNested)category.selectAllNestedev, checkValid() + if(category.selectAllNested)category.selectAllNested, checkValid() }) } if( this.subItems && this.subItems.length ){ @@ -427,7 +427,7 @@ MWF.xApplication.Selector.Unit.Item = new Class({ if ((count.toInt()===0) || (this.selector.selectedItems.length+(this.subItems.length-selectedSubItemCount))<=count){ var checkedCount = 0; this.subItems.each( function(item){ - if(!item.isSelected)item.selected(false, function () { + if(!item.isSelected && !item.disabled )item.selected(false, function () { checkedCount++; if( this.subItems.length === checkedCount ){ if( checkValid )this.selector.fireEvent("valid", [this.selector, this]);