<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加人员</title>
<script src="ext-3.0.0/adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="ext-3.0.0/ext-all.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="ext-3.0.0/resources/css/ext-all.css" />
<script type="text/javascript">
Ext.onReady(function(){
var _window=new Ext.Window({
title:"添加人员",
width: 500,
height: 350,
plain:true,
labelWidth:59,
defaultType:"textfield",
layout:"form",
buttonAlign:"center",
items:[
{
xtype:"panel",
layout:"column",
baseCls:"x-plain",
style:"padding:5px",
items:[
{
columnWidth:.5,
defaultType:"textfield",
layout:"form",
baseCls:"x-plain",
defaults:{width:160},
labelWidth:55,
items:[{
fieldLabel:"姓名"
},
{
fieldLabel:"密码"
},{
fieldLabel:"性别",
readOnly:true
},{
xtype:"datefield",
format:"Y-m-d",
value:new Date(),
readOnly:true,
fieldLabel:"日期" ,
listeners:{
"blur":function(_df){
var d=_df.ownerCt.findByType("textfield")[2];
d.setValue(new Date().getFullYear()-_df.getValue().getFullYear());
}
}
},{
fieldLabel:"联系电话"
},{
fieldLabel:"性别",
xtype:"combo",
displayField:"sex",
mode:"local",
readOnly:true,
triggerAction:"all",
value:"男",
store:new Ext.data.SimpleStore({
fields:["sex","b"],
data:[["男","a"],["女","b"]]
})
}]
},
{
columnWidth:.5,
defaultType:"textfield",
layout:"form",
labelWidth:55,
baseCls:"x-plain",
items:[{
fieldLabel:"个人照片",
inputType:"image",
width:170,
height:160
}]
}
]
},{
xtype:"panel",
layout:"form",
baseCls:"x-plain",
defaultType:"textfield",
style:"padding:5px",
labelWidth:55,
items:[
{
fieldLabel:"身份证号",
width:400
},
{
fieldLabel:"具体地址",
width:400
},
{
xtype:"panel",
layout:"column",
baseCls:"x-plain",
items:[
{
columnWidth:.5,
layout:"form",
defaultType:"textfield",
baseCls:"x-plain",
labelWidth:55,
items:[
{
fieldLabel:"职务",
xtype:"combo",
readOnly:true,
triggerAction: 'all',
mode: 'local',
store: new Ext.data.SimpleStore({
fields: [
'job'
],
data: [["程序员"], ["高级程序员"]]
}),
displayField: 'job'
}
]
},
{
columnWidth:.5,
baseCls:"x-plain",
layout:"column",
items:[
{
xtype:"panel",
columnWidth:.3,
baseCls:"x-plain",
items:[
{
xtype:"button",
text:"添加职务"
}
]
},
{
xtype:"panel",
baseCls:"x-plain",
columnWidth:.3,
items:[
{
xtype:"button",
text:"修改职务"
}
]
},
{
xtype:"panel",
baseCls:"x-plain",
columnWidth:.4,
items:[
{
xtype:"button",
text:"删除职务"
}
]
}
]
}
]
}
]
}
],
showLock:false,
listeners:{
"show":function(_window){
if(!_window["showLock"]){
_window.findByType("textfield")[6].getEl().dom.src = "1.gif" ;
_window["showLock"] = true;
}
}
},
buttons:[{
text:"确定"
},{
text:"取消"
}]
}
).show();
}) ;
</script>
</head>
<body>
</body>
</html>