Wtf.UploadWindow=function(A){Wtf.apply(this,A);this.uploadPanel=new Wtf.FormPanel({frame:true,method:"POST",fileUpload:true,waitMsgTarget:true,url:"FileUpload.jsp?flag=1",layout:"column",items:[{columnWidth:1,layout:"form",items:[{html:"Select the file you want to upload"},{layout:"form",layoutConfig:{labelSeparator:""},labelWidth:0,items:[new Wtf.form.TextField({id:"browseBttn",inputType:"file"})]},{layout:"form",items:[{buttons:[{text:"Upload",type:"submit",scope:this,handler:function(){if(Wtf.getCmp("browseBttn").getValue()!=""){this.uploadPanel.form.submit({scope:this,waitMsg:"Loading...",success:function(D,C){var E=C.result.success.path;var F=Wtf.getLmsImgPath+E;var B;if(this.cid){B=document.getElementById(this.cid)}else{B=document.getElementById("picUpload2")}B.value=E;B.src=F;msgBoxShow(["Upload Successful","File Uploaded Successfully"],Wtf.MessageBox.INFO);this.close()},failure:function(C,B){msgBoxShow(["Error","A problem occurred while uploading"],Wtf.MessageBox.ERROR);this.close()}})}}},{text:"Cancel",scope:this,handler:function(){this.close()}}]}]}]}]});Wtf.UploadWindow.superclass.constructor.call(this,{iconCls:"winicon",modal:true,resizable:false,width:300,title:"Upload File...",items:[this.uploadPanel]})};Wtf.extend(Wtf.UploadWindow,Wtf.Window,{onRender:function(A){Wtf.UploadWindow.superclass.onRender.call(this,A);this.add(this.uploadPanel)}})