diff --git a/o2web/source/x_component_Selector/Identity.js b/o2web/source/x_component_Selector/Identity.js index d6b0793fb434a0b60db9ffab20b52c25d4002741..56651a871e7abe62257018878bb228201bac99ff 100644 --- a/o2web/source/x_component_Selector/Identity.js +++ b/o2web/source/x_component_Selector/Identity.js @@ -495,9 +495,11 @@ MWF.xApplication.Selector.Identity.ItemCategory = new Class({ } }, clickItem: function( callback ){ - if (this._hasChild()){ + if (this._hasChild() && !this.loading){ var firstLoaded = !this.loaded; + this.loading = true; this.loadSub(function(){ + this.loading = false; if( firstLoaded ){ if( !this.selector.isFlatCategory ){ this.children.setStyles({"display": "block", "height": "auto"}); diff --git a/o2web/source/x_component_Selector/IdentityWidthDuty.js b/o2web/source/x_component_Selector/IdentityWidthDuty.js index 5e4c5cae4489a1d113087bdfe5de8136023b249d..e0d340772b05dfac3a1dca35e7b155e22ba1e41b 100644 --- a/o2web/source/x_component_Selector/IdentityWidthDuty.js +++ b/o2web/source/x_component_Selector/IdentityWidthDuty.js @@ -193,8 +193,8 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({ this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/"+style+"/icon/companyicon.png)"); }, loadSub: function(callback){ - if (!this.loaded && !this.loading){ - this.loading = true; + if (!this.loaded && !this.loadingsub){ + this.loadingsub = true; if (this.selector.options.units.length){ var action = MWF.Actions.get("x_organization_assemble_express"); var data = {"name":this.data.name, "unit":""}; @@ -234,7 +234,7 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({ if (i>=count){ if (!this.loaded) { this.loaded = true; - this.loading = false; + this.loadingsub = false; this.itemLoaded = true; if (callback) callback(); } @@ -259,7 +259,7 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({ if (i>=count){ if (!this.loaded) { this.loaded = true; - this.loading = false; + this.loadingsub = false; this.itemLoaded = true; if (callback) callback(); } @@ -279,7 +279,7 @@ MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory = new Class({ } }.bind(this)); this.loaded = true; - this.loading = false; + this.loadingsub = false; if (callback) callback(); }.bind(this), null, this.data.name); } diff --git a/o2web/source/x_component_Selector/Unit.js b/o2web/source/x_component_Selector/Unit.js index c69d022bd7b903b8684e1e5ad7684c958533df1a..0f8eabd257c628beac77afec187a433992ab2345 100644 --- a/o2web/source/x_component_Selector/Unit.js +++ b/o2web/source/x_component_Selector/Unit.js @@ -510,7 +510,8 @@ MWF.xApplication.Selector.Unit.Item = new Class({ } }, loadSubItems: function( callback ){ - if (!this.loaded){ + if (!this.loaded && !this.loading){ + this.loading = true; if (!this.children){ this.children = new Element("div", { "styles": this.selector.css.selectorItemCategoryChildrenNode @@ -529,6 +530,7 @@ MWF.xApplication.Selector.Unit.Item = new Class({ } }.bind(this)); this.loaded = true; + this.loading = false; if(callback)callback(); }.bind(this), null, this.data.distinguishedName); }else{ @@ -734,7 +736,8 @@ MWF.xApplication.Selector.Unit.SearchItem = new Class({ }, loadSubItems: function( callback ){ //只是为了在isFlatCategory模式下,加载全称用的,否则用继承的就可以 - if (!this.loaded){ + if (!this.loaded && !this.loading){ + this.loading = true; if (!this.children){ this.children = new Element("div", { "styles": this.selector.css.selectorItemCategoryChildrenNode @@ -760,6 +763,7 @@ MWF.xApplication.Selector.Unit.SearchItem = new Class({ } }.bind(this)); this.loaded = true; + this.loading = false; if(callback)callback(); }.bind(this), null, this.data.distinguishedName); }else{ diff --git a/o2web/source/x_component_Selector/UnitWithType.js b/o2web/source/x_component_Selector/UnitWithType.js index e2e0b65de253137867ebb9c034f81ff0ef0accff..f3e3f081607470612647ae2f02d113fa69bfc069 100644 --- a/o2web/source/x_component_Selector/UnitWithType.js +++ b/o2web/source/x_component_Selector/UnitWithType.js @@ -183,7 +183,8 @@ MWF.xApplication.Selector.UnitWithType.Item = new Class({ } }, loadSubItems: function(callback){ - if (!this.loaded){ + if (!this.loaded && !this.loading){ + this.loading = true; if (!this.children){ this.children = new Element("div", { "styles": this.selector.css.selectorItemCategoryChildrenNode @@ -207,6 +208,7 @@ MWF.xApplication.Selector.UnitWithType.Item = new Class({ if(callback)callback() }.bind(this)); this.loaded = true; + this.loading = false; }else{ this.children.setStyle("display", "block"); }