|
|
@@ -16,7 +16,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({
|
|
|
"categoryType": "unit",
|
|
|
"dutyUnitLevelBy" : "duty"
|
|
|
},
|
|
|
- initialize: function(container, options){
|
|
|
+ initialize: function(container, options, delayLoad){
|
|
|
//MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false);
|
|
|
this.loading = true;
|
|
|
this.setOptions(options);
|
|
|
@@ -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 ){
|
|
|
MWF.xDesktop.requireApp("Selector", "MultipleSelector", function() {
|
|
|
this.selector = new MWF.xApplication.Selector.MultipleSelector(this.container, this.options );
|
|
|
- this.selector.load();
|
|
|
+ if( delayLoad !== true )this.selector.load();
|
|
|
this.loading = false;
|
|
|
}.bind(this));
|
|
|
}else{
|
|
|
@@ -34,25 +34,25 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({
|
|
|
if ((type.toLowerCase()==="unit") && (this.options.unitType)){
|
|
|
MWF.xDesktop.requireApp("Selector", "UnitWithType", function(){
|
|
|
this.selector = new MWF.xApplication.Selector.UnitWithType(this.container, options);
|
|
|
- this.selector.load();
|
|
|
+ if( delayLoad !== true )this.selector.load();
|
|
|
this.loading = false;
|
|
|
}.bind(this));
|
|
|
}else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) && this.options.categoryType.toLowerCase()==="duty"){
|
|
|
MWF.xDesktop.requireApp("Selector", "IdentityWidthDuty", function(){
|
|
|
this.selector = new MWF.xApplication.Selector.IdentityWidthDuty(this.container, options);
|
|
|
- this.selector.load();
|
|
|
+ if( delayLoad !== true )this.selector.load();
|
|
|
this.loading = false;
|
|
|
}.bind(this));
|
|
|
}else if ((type.toLowerCase()==="identity") && ((this.options.dutys) && this.options.dutys.length) ){ //&& this.options.categoryType.toLowerCase()==="unit"
|
|
|
MWF.xDesktop.requireApp("Selector", "IdentityWidthDutyCategoryByUnit", function(){
|
|
|
this.selector = new MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit(this.container, options);
|
|
|
- this.selector.load();
|
|
|
+ if( delayLoad !== true )this.selector.load();
|
|
|
this.loading = false;
|
|
|
}.bind(this));
|
|
|
}else{
|
|
|
MWF.xDesktop.requireApp("Selector", type, function(){
|
|
|
this.selector = new MWF.xApplication.Selector[type](this.container, options);
|
|
|
- this.selector.load();
|
|
|
+ if( delayLoad !== true )this.selector.load();
|
|
|
this.loading = false;
|
|
|
}.bind(this));
|
|
|
}
|