| 1 |
- MWF.xDesktop.requireApp("process.Xform","Personfield",null,false);MWF.xApplication.cms.Xform.Personfield=MWF.CMSPersonfield=new Class({Extends:MWF.APPPersonfield,getSelectRange:function(){if(this.json.range==="unit"){return this.getScriptSelectUnit()}if(this.json.range==="draftUnit"){return this.getNextSelectUnit(this.form.businessData.document.creatorIdentity)}if(this.json.range==="currentUnit"){if(layout.session.user.identityList.length){var e=[];layout.session.user.identityList.each(function(t){e.push(t.id)});return this.getNextSelectUnit(e)}else{return[]}}return[]},clickSelect:function(){var t=this.getInputData();var e=this.json.count?this.json.count:0;switch(this.json.range){case"":}var i=this.getSelectRange();if(this.json.selectType=="identity"){var s=this.getSelectRangeDuty()}if(this.json.range!=="all"){if(!i.length){this.form.notice(MWF.xApplication.process.Xform.LP.noSelectRange,"error",this.node);return false}}var n={type:this.json.selectType,unitType:this.json.selectUnitType==="all"?"":this.json.selectUnitType,values:t,count:e,units:i,dutys:this.json.selectType=="identity"?s:[],onComplete:function(t){var e=[];t.each(function(t){e.push(MWF.org.parseOrgData(t.data))}.bind(this));if(this.json.isInput){this.addData(e)}else{this.setData(e)}this.validationMode();this.validation()}.bind(this),onCancel:function(){this.validation()}.bind(this),onLoad:function(){if(this.descriptionNode)this.descriptionNode.setStyle("display","none")}.bind(this),onClose:function(){v=this._getBusinessData();if(!v||!v.length)if(this.descriptionNode)this.descriptionNode.setStyle("display","block")}.bind(this)};var o=new MWF.O2Selector(this.form.app.content,n)}});
|