提交 75538d7c 编写于 作者: U unknown

人员选择组件加延迟加载参数

上级 f3f44fd4
...@@ -16,7 +16,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({ ...@@ -16,7 +16,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({
"categoryType": "unit", "categoryType": "unit",
"dutyUnitLevelBy" : "duty" "dutyUnitLevelBy" : "duty"
}, },
initialize: function(container, options){ initialize: function(container, options, delayLoad){
//MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false); //MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false);
this.loading = true; this.loading = true;
this.setOptions(options); this.setOptions(options);
...@@ -25,7 +25,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({ ...@@ -25,7 +25,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({
if( this.options.types && typeOf(this.options.types) === "array" && this.options.types.length > 0 ){ if( this.options.types && typeOf(this.options.types) === "array" && this.options.types.length > 0 ){
MWF.xDesktop.requireApp("Selector", "MultipleSelector", function() { MWF.xDesktop.requireApp("Selector", "MultipleSelector", function() {
this.selector = new MWF.xApplication.Selector.MultipleSelector(this.container, this.options ); this.selector = new MWF.xApplication.Selector.MultipleSelector(this.container, this.options );
this.selector.load(); if( delayLoad !== true )this.selector.load();
this.loading = false; this.loading = false;
}.bind(this)); }.bind(this));
}else{ }else{
...@@ -34,25 +34,25 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({ ...@@ -34,25 +34,25 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({
if ((type.toLowerCase()==="unit") && (this.options.unitType)){ if ((type.toLowerCase()==="unit") && (this.options.unitType)){
MWF.xDesktop.requireApp("Selector", "UnitWithType", function(){ MWF.xDesktop.requireApp("Selector", "UnitWithType", function(){
this.selector = new MWF.xApplication.Selector.UnitWithType(this.container, options); this.selector = new MWF.xApplication.Selector.UnitWithType(this.container, options);
this.selector.load(); if( delayLoad !== true )this.selector.load();
this.loading = false; this.loading = false;
}.bind(this)); }.bind(this));
}else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) && this.options.categoryType.toLowerCase()==="duty"){ }else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) && this.options.categoryType.toLowerCase()==="duty"){
MWF.xDesktop.requireApp("Selector", "IdentityWidthDuty", function(){ MWF.xDesktop.requireApp("Selector", "IdentityWidthDuty", function(){
this.selector = new MWF.xApplication.Selector.IdentityWidthDuty(this.container, options); this.selector = new MWF.xApplication.Selector.IdentityWidthDuty(this.container, options);
this.selector.load(); if( delayLoad !== true )this.selector.load();
this.loading = false; this.loading = false;
}.bind(this)); }.bind(this));
}else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) ){ //&& this.options.categoryType.toLowerCase()==="unit" }else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) ){ //&& this.options.categoryType.toLowerCase()==="unit"
MWF.xDesktop.requireApp("Selector", "IdentityWidthDutyCategoryByUnit", function(){ MWF.xDesktop.requireApp("Selector", "IdentityWidthDutyCategoryByUnit", function(){
this.selector = new MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit(this.container, options); this.selector = new MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit(this.container, options);
this.selector.load(); if( delayLoad !== true )this.selector.load();
this.loading = false; this.loading = false;
}.bind(this)); }.bind(this));
}else{ }else{
MWF.xDesktop.requireApp("Selector", type, function(){ MWF.xDesktop.requireApp("Selector", type, function(){
this.selector = new MWF.xApplication.Selector[type](this.container, options); this.selector = new MWF.xApplication.Selector[type](this.container, options);
this.selector.load(); if( delayLoad !== true )this.selector.load();
this.loading = false; this.loading = false;
}.bind(this)); }.bind(this));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册