日期:2014-05-16 浏览次数:20915 次
userManageWindow = Ext.extend(Ext.Panel, {
title : '用户管理',
//width: 765,
//height: 525,
layout : 'fit',
height: 600,
initComponent : function() {
this.tbar = {
xtype : 'toolbar',
items : [ {
id : '000002',
xtype : 'button',
text : '添加用户',
listeners : {
'click' : function() {
userWindow.show();
}
}
}, {
id : '000003',
xtype : 'button',
text : '修改所选用户'
}, {
id : '000004',
xtype : 'button',
text : '冻结所选用户'
}, {
id : '000005',
xtype : 'button',
text : '删除所选用户'
}, {
id : '000006',
xtype : 'button',
text : '查看用户列表',
handler : getAllUser
} ]
};
this.items = [ { //Ext GRID
xtype : 'grid',
id : 'userinfo',
height: 500,
columns : [ {
xtype : 'gridcolumn',
dataIndex : 'string',
header : '序号',
sortable : true,
width : 100
}, {
xtype : 'numbercolumn',
dataIndex : 'number',
header : '姓名',
sortable : true,
width : 100,
align : 'right'
}, {
xtype : 'booleancolumn',
dataIndex : 'bool',
header : '所属组',
sortable : true,
width : 100
}, {
xtype : 'datecolumn',
dataIndex : 'date',
header : '当前状态',
sortable : true,
width : 100
}, {
xtype : 'datecolumn',
dataIndex : 'date',
header : '添加时间',
sortable : true,
width : 100
}, {
xtype : 'datecolumn',
dataIndex : 'date',
header : '添加人',
sortable : true,
width : 100
} ]
} ];
this.bbar = {
xtype : 'paging',
items : [ {
xtype : 'textfield'
} ]
};
userManageWindow.superclass.initComponent.call(this);
}
});
/*
* 添加或显示用户信息的窗体
*/
var userForm = new Ext.form.FormPanel( {
baseCls : 'x-plain',
labelWidth : 55,
url : 'addUser',
layout : {
type : 'vbox',
align : 'stretch' // Child items are stretched to
// full width
},
defaults : {
xtype : 'textfield'
},
items : [ {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '用户名',
name : 'username'
}, {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '用户ID',
name : 'userid'
}, {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '所属部门',
name : 'department'
}, {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '电话',
name : 'tel'
}, {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '手机',
name : 'cellphone'
}, {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '传真',
name : 'fax'
}, {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '性别',
name : 'sex'
}, {
plugins : [ Ext.ux.FieldLabeler ],
fieldLabel : '状态',
name : 'status'
}, {
plugins : [ Ext.ux.FieldLabeler ],
f