AskPanel=function(config){ Ext.apply(this,config); this.SysTagsmanage=new Ext.ux.RadioGroup({ fieldLabel:'项目实施', name:'Manage', //labelSeparator:'', horizontal:true, radios:[ { value:'理念培训', boxLabel:'理念培训' }, { value:'现状评估', boxLabel:'现状评估' }, { value:'流程设计', boxLabel:'流程设计' }, { value:'工具实施', boxLabel:'工具实施' }, { value:'上线推广', boxLabel:'上线推广' }, { value:'持续改进', boxLabel:'持续改进' } ] }); this.SysTagstech=new Ext.ux.RadioGroup({ fieldLabel:'技术标准', name:'Technology', horizontal:true, radios:[ { value:'COBIT', boxLabel:'COBIT' }, { value:'ISO27001', boxLabel:'ISO27001' }, { value:'SOX', boxLabel:'SOX' }, { value:'COSO', boxLabel:'COSO' }, { value:'CMMI', boxLabel:'CMMI' }, { value:'TOGAF', boxLabel:'TOGAF' }, { value:'ITIL/ISO20000', boxLabel:'ITIL/ISO20000' }, { value:'PRINCE 2/PMBOK', boxLabel:'PRINCE 2/PMBOK' } ] }); this.SysTagsindustry=new Ext.ux.RadioGroup({ fieldLabel:'行业实践', name:'Industry', horizontal:true, radios:[ { value:'金融', boxLabel:'金融' }, { value:'电信', boxLabel:'电信' }, { value:'政府', boxLabel:'政府' }, { value:'能源电力', boxLabel:'能源电力' }, { value:'交通物流', boxLabel:'交通物流' }, { value:'制造', boxLabel:'制造' }, { value:'其他', boxLabel:'其他' } ] }); this.SysTagsService=new Ext.ux.RadioGroup({ fieldLabel:'服务类别', name:'Industry', horizontal:true, radios:[ { value:'理论研究', boxLabel:'理论研究' }, { value:'实践咨询', boxLabel:'实践咨询' }, { value:'认证培训', boxLabel:'认证培训' }, { value:'考试资料', boxLabel:'考试资料' }, { value:'工具实施', boxLabel:'工具实施' } ] }); AskPanel.superclass.constructor.call(this, { closable:true, autoScroll:true, bodyStyle:'padding:5px 3px 0', id:'tab_ask', title:'提问', border:false, frame:true, labelAlign:'right', labelWidth: 60, url:'submitAsk.aspx', defaultType: 'textfield', items: [ { fieldLabel: '问题', id:'askc', name:'Ques', allowBlank:false, maxLength:50, anchor:'95%' },{ xtype:'textarea', fieldLabel: '详细描述', id:'descc', name:'Desc', maxLength:5000, height:200, anchor:'95%' },{ fieldLabel:'标签', id:'tagsc', name:'Tags', maxLength: 100, anchor:'95%' },{ xtype:'statictextfield', fieldLabel:'提示', value:'自定义标签以“,”分隔', anchor:'93%' }, this.SysTagsmanage,this.SysTagstech,this.SysTagsindustry,this.SysTagsService, { xtype:'checkbox', fieldLabel:"公开", boxLabel:"企业版会员发表问题时可以设置此问题是否公开给其他企业版用户,如果是涉及到公司内部问题,请不要复选此框", id:'isopenc', name:"IsOpen", inputValue:"YES" }, { xtype:'checkbox', fieldLabel:"知识贡献", boxLabel:"此类问题不能回答,仅供阅读。", id:'isknown', name:"IsKnown", inputValue:"YES" }, { xtype:'checkbox', fieldLabel:"公告", boxLabel:"管理员发表问题时,可以设置问题在公告区显示。", id:'isbulletinc', name:"IsBulletin", inputValue:"YES" }, { xtype:'staticimagefield', fieldLabel: '验证码', id:'imgcode', name:'ImgCode', value:'' }, { xtype:'textfield', fieldLabel: '输入', id:'vcode', name:'VCode', allowBlank:false, maxLength:5, listeners:{ specialkey:function(f, e){ if(e.getKey() == e.ENTER){ this.OnBtnSubmit(); } }, scope:this } } , { xtype:'hidden', id:'isnormal', name:'isNormal', value:this.isNormal } ], tbar: [{ text: '相关问题', scope:this, iconCls:'icon-relation', tooltip:'查找榆次问题相关的问题,是您不需要再重复提问', handler: this.OnBtnRelation }, '-',{ text: '提交问题', iconCls:'icon-submit', scope:this, tooltip:'提交问题,等待网友或专家为您解答', handler: this.OnBtnSubmit }] }); } Ext.extend(AskPanel,Ext.form.FormPanel,{ OnBtnRelation:function(){ skey=this.items.get("askc").getValue(); if(skey!=""){ qlist(1000+searchcounter,"搜索符合条件“"+skey+"”的结果"); searchcounter++; } }, OnBtnSubmit:function(){ if (this.form.isValid()) { this.form.submit({ waitMsg:'正在提交...', scope:this, failure: function(form, action) { if(action.result){ Ext.MessageBox.alert('错误信息', action.result.info); } else{ Ext.MessageBox.alert('错误信息', "服务器端发生错误!"); } this.items.get('imgcode').setValue(''); }, success: function(form, action) { if(action.result.success){ Ext.MessageBox.alert('成功', '问题提交成功!'); if(this.ds){this.ds.reload();} this.ownerCt.remove(this,true); } else{ Ext.MessageBox.alert('错误信息', action.result.info); } } } ); } else{ Ext.MessageBox.alert('错误', '请检查您的输入!'); } } });