package.min.js 2.3 KB

1
  1. MWF.xApplication.Selector=MWF.xApplication.Selector||{};MWF.xDesktop.requireApp("Selector","lp."+MWF.language,null,false);MWF.O2Selector=new Class({Implements:[Options],options:{count:0,type:"person",title:"Select Person",groups:[],roles:[],units:[],unitType:"",values:[]},initialize:function(t,e){this.setOptions(e);this.container=t;var i=this.options.type.capitalize();if(i){if(i.toLowerCase()==="unit"&&this.options.unitType){MWF.xDesktop.requireApp("Selector","UnitWithType",function(){this.selector=new MWF.xApplication.Selector.UnitWithType(this.container,e);this.selector.load()}.bind(this))}else if(i.toLowerCase()==="identity"&&(this.options.dutys&&this.options.dutys.length)){MWF.xDesktop.requireApp("Selector","IdentityWidthDuty",function(){this.selector=new MWF.xApplication.Selector.IdentityWidthDuty(this.container,e);this.selector.load()}.bind(this))}else{debugger;MWF.xDesktop.requireApp("Selector",i,function(){this.selector=new MWF.xApplication.Selector[i](this.container,e);this.selector.load()}.bind(this))}}else{debugger;MWF.xDesktop.requireApp("Selector","MultipleSelector",function(){this.selector=new MWF.xApplication.Selector.MultipleSelector(this.container,this.options);this.selector.load()}.bind(this))}}});MWF.O2SelectorFilter=new Class({Implements:[Options],options:{count:0,type:"person",title:"Select Person",groups:[],roles:[],units:[],unitType:"",values:[]},initialize:function(t,e){this.setOptions(e);this.value=t;var i=this.options.type.capitalize();if(i){if(i.toLowerCase()==="unit"&&this.options.unitType){MWF.xDesktop.requireApp("Selector","UnitWithType",function(){this.selector=new MWF.xApplication.Selector.UnitWithType.Filter(this.container,e);this.selector.load()}.bind(this))}else if(i.toLowerCase()==="identity"&&(this.options.dutys&&this.options.dutys.length)){MWF.xDesktop.requireApp("Selector","IdentityWidthDuty",function(){this.selectFilter=new MWF.xApplication.Selector.IdentityWidthDuty.Filter(this.value,e)}.bind(this),false)}else{MWF.xDesktop.requireApp("Selector",i,function(){this.selectFilter=new MWF.xApplication.Selector[i].Filter(this.value,e)}.bind(this),false)}}else{debugger;MWF.xDesktop.requireApp("Selector","MultipleSelector",function(){this.selectFilter=new MWF.xApplication.Selector.MultipleSelector.Filter(this.container,this.options)}.bind(this),false)}},filter:function(t,e){return this.selectFilter.filter(t,e)}});