var form,mid;
mid = params.id;
if(isempt(mid))mid = 0;

function boackindie(){
	if(mid!=0){
		var data = rock[params.index][1].changedata;
		form.adddata(data, 'id');
		form.setmsg('修改状态','blue');
		form.getField('fileid').loadfile('infor', data.id);
	}
}
var panel= {
	width:750,xtype:'rockform',
	submitfields:'title,typename,xu,isshow,content,zuozhe,indate',border:false,
	params:{int_filestype:'xu,isshow',otherfields:'optdt={now},optname={admin}'},tablename:'infor',
	items:[{
			fieldLabel:'id号',value:'0',name:'idPost',hidden:true	
		},{
			xtype: 'fieldcontainer',layout:'hbox',items:[{
				fieldLabel:''+bitian+'信息类型',name:'typenamePost',allowBlank: false,xtype:'optioncombo',optionmnum:'infortype',width:'49%'
			},{
				fieldLabel:'序号',name:'xuPost',value:'0',minValue:0,xtype:'numberfield',width:'49%'
			}]
		},{
			fieldLabel:''+bitian+'主题',name:'titlePost',allowBlank: false
		},{
			fieldLabel:'内容',name:'contentPost',xtype:'htmleditor',height:250
		},
		uploadwindows.fields({allowBlank:false}),{
			xtype: 'fieldcontainer',defaultType: 'textfield',layout:'hbox',items:[{
				fieldLabel:'&nbsp;',name:'isshowPost',xtype:'checkboxfield',boxLabel:'显示首页',inputValue:'1',checked:true,labelSeparator:''
			}]
		},{
			xtype: 'fieldcontainer',defaultType: 'textfield',layout:'hbox',items:[{
				fieldLabel:'发布者/部门',name:'zuozhePost',width:'49%'
			},{
				fieldLabel:'时间',name:'indatePost',xtype:'datetimefield',width:'49%'
			}]
		}
	],
	success:function(){
		if(params.index){
			rock[params.index][1].isreadload = true;
			closetabs('inforadd_'+mid+'');
		}
	}
};

return {
	panel:{
		xtype:'panel',border:false,
		layout: {
			type: 'hbox',
			align: 'stretch',
			pack: 'center'
		},
		items:panel
	},
	init:function(){
		form = rock[index].child('rockform');
		boackindie();
	}
};