MWF.xDesktop.requireApp("process.Xform","Office",null,false);MWF.xApplication.cms.Xform.Office=MWF.CMSOffice=new Class({Extends:MWF.APPOffice,getFormId:function(){var t=this.form.businessData.document.id;return"form"+this.json.id+t},getFileName:function(){var t="docx";switch(this.json.officeType){case"word":t="docx";break;case"excel":t="xlsx";break;case"ppt":t="pptx"}var e=this.form.businessData.document.id;return"file"+this.json.id+e+"."+t},getOfficeObjectId:function(){var t=this.form.businessData.document.id;return"NTKOOCX"+this.json.id+t},getFileInputName:function(){var t=this.form.businessData.document.id;return"fileInput"+this.json.id+t},getFile:function(t){var e=null;atts=this.form.businessData.attachmentList||[];for(var i=0;i300)m=m.substr(0,300)+"……"}var h=new Element("div",{text:m}).inject(this.node)}var h=MWF.xApplication.process.Xform.LP.openOfficeInfor;h=h.replace("{type}",this.json.officeType);var f=new Element("div",{styles:{width:"200px",height:"24px",margin:"auto","margin-top":"18px","padding-left":"30px","font-size":"16px","font-weight":"bold",color:"#2b5797","font-family":"Gadugi",cursor:"pointer",background:"url("+this.form.path+""+this.form.options.style+"/icon/"+this.json.officeType+".png"+") no-repeat left center"},text:h}).inject(this.node);var u=this.getOfficeFileUrl();if(!u){this.node.setStyle("display","none")}f.addEvent("click",function(){var t=this.getOfficeFileUrl();if(t){if(window.o2){window.o2.openDocument(t)}else if(window.webkit){window.webkit.messageHandlers.openDocument.postMessage(t)}else{window.open(t)}}}.bind(this))}});