87,921
社区成员
发帖
与我相关
我的任务
分享
layout:'form',
xtype:'fieldset',
title:'上午第一大节',
aotuHeight:true,
/*defaultType:'numberfield',*/
items:[
{layout:'column',//对每一个fieldset进行列排列
items:[
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM1start',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM1end',
maxValue:20,
minValue:1
},{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM1start2',
maxValue:20,
minValue:1
},{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM2end2',
maxValue:20,
minValue:1
}]
}
]
},
{},{},{}]
,buttons: [
{
// 重设按钮
text: '重设',
// 单击该按钮时重设表单
handler: function()
{
this.up('form').getForm().reset();
/* Ext.Msg.alert("按钮","巴塞罗那球迷"); */
}
},
{
// 提交按钮
text: '提交',
formBind: true, // 只有当整个表单输入校验通过时,该按钮才可用
disabled: true, // 设置该按钮默认不可用
// 单击该按钮的事件处理函数
handler: function()
{
// 获取表单,实际返回的是Ext.form.Basic对象
var form = this.up('form').getForm();
// 如果表单输入校验通过
if (form.isValid())
{
// 以Ajax方式提交表单
form.submit(
{
// 提交成功,第一个参数是Ext.form.Basic对象
// 第二个参数是Ext.action.Action对象
success: function(form, action)
{
Ext.Msg.alert('提交成功!', action.result.msg);
},
// 提交失败
failure: function(form, action)
{
Ext.Msg.alert('提交失败!', action.result.msg);
}
});
}
}
}
]
{
id: 'card-1',
layout:'form',
title:'周一课程录入',
url:'courseIn',
name:'form',
/* layout: 'hbox',*/
/*method:' Monday',*///传入后台可以每周建立一个方法判断录入
method:'POST',
renderTo: Ext.getBody(),
width:20,
bodyPadding: 1,
items: /*[
//上午第一大节课录入
{
filedLabel:'上午第一大节',
title: '上午第一大节',
layout: 'hbox',
bodyPadding: 5,
height: 80, // 指定高度
items: [
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM1start',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM1end',
maxValue:20,
minValue:1
},
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM1start2',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM2end2',
maxValue:20,
minValue:1
}
],
flex: 4,
resizable: {
handles: 'n s ns',
minWidth: 200,
minHeight: 80,
maxWidth: 500,
maxHeight: 400,
transparent:false,
pinned: true
}
},
// 上午第二大节课录入
{
title: '上午第二大节',
layout: 'hbox',
bodyPadding: 5,
height: 80, // 指定高度
items: [
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM2start',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM2end',
maxValue:20,
minValue:1
},
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM2start2',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM2end2',
maxValue:20,
minValue:1
}
],
flex: 4,
resizable: {
handles: 'n s ns',
minWidth: 200,
minHeight: 80,
maxWidth: 500,
maxHeight: 400,
transparent:false,
pinned: true
}
},
//下午第一大节课
{
title: '下午第一大节',
layout: 'hbox',
bodyPadding: 5,
height: 80, // 指定高度
items: [
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'PM1start',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'PM1end',
maxValue:20,
minValue:1
},
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'PM1start2',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'PM1end2',
maxValue:20,
minValue:1
}
],
flex: 4,
resizable: {
handles: 'n s ns',
minWidth: 200,
minHeight: 80,
maxWidth: 500,
maxHeight: 400,
transparent:false,
pinned: true
}
},
//下午第二大节课录入
{
title: '下午第二大节',
layout: 'hbox',
bodyPadding: 5,
height: 80, // 指定高度
items: [
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'PM2start',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'PM2end',
maxValue:20,
minValue:1
},
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'PM2start2',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'PM2end2',
maxValue:20,
minValue:1
}
],
flex: 4,
resizable: {
handles: 'n s ns',
minWidth: 200,
minHeight: 80,
maxWidth: 500,
maxHeight: 400,
transparent:false,
pinned: true
}
}
]*/
[
{
layout:'form',
xtype:'fieldset',
title:'上午第一大节',
aotuHeight:true,
/*defaultType:'numberfield',*/
items:[
{layout:'column',//对每一个fieldset进行列排列
items:[
{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM1start',
maxValue:20,
minValue:1
},
{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM1end',
maxValue:20,
minValue:1
},{
fieldLabel: '起始周',
xtype: 'numberfield',
name:'AM1start2',
maxValue:20,
minValue:1
},{
fieldLabel: '结束周',
xtype: 'numberfield',
name:'AM2end2',
maxValue:20,
minValue:1
}]
}
]
},
{},{},{}]
,buttons: [
{
// 重设按钮
text: '重设',
// 单击该按钮时重设表单
handler: function()
{
this.up('form').getForm().reset();
/* Ext.Msg.alert("按钮","巴塞罗那球迷"); */
}
},
{
// 提交按钮
text: '提交',
formBind: true, // 只有当整个表单输入校验通过时,该按钮才可用
disabled: true, // 设置该按钮默认不可用
// 单击该按钮的事件处理函数
handler: function()
{
// 获取表单,实际返回的是Ext.form.Basic对象
var form = this.up('form').getForm();
// 如果表单输入校验通过
if (form.isValid())
{
// 以Ajax方式提交表单
form.submit(
{
// 提交成功,第一个参数是Ext.form.Basic对象
// 第二个参数是Ext.action.Action对象
success: function(form, action)
{
Ext.Msg.alert('提交成功!', action.result.msg);
},
// 提交失败
failure: function(form, action)
{
Ext.Msg.alert('提交失败!', action.result.msg);
}
});
}
}
}
]
}