日期:2014-05-16 浏览次数:20870 次
Ext.Loader.setPath('Ext.ux', 'js/extjs/ux');
Ext.define('ups.form.selector.UserSelector',{
extend:'Ext.ux.form.ItemSelector',
alias: 'widget.userSelector',
id: 'itemselector-user',
anchor: '100%',
labelAlign:'right',
fieldLabel: '分组管理员',
displayField: 'text',
valueField: 'value',
allowBlank: true,
imagePath: 'js/extjs/ux/css/images/',
msgTarget: 'side',
fromTitle: '管理员',
toTitle: '已选择',
buttonsText: {
top: "移到顶部",
up: "向上一行",
add: "Add to Selected",
remove: "移除",
down: "向下一行",
bottom: "移到底部"
},
initComponent: function(){
this.store = Ext.create('ups.form.selector.UserSelectorStore') ;
this.callParent(arguments);
}
});
Ext.define('ups.form.UpsGroupForm',{
extend:'Ext.form.Panel',
alias: 'widget.upsGroupform',
id : 'form1',
border:false,
frame:true,
autoWidth:true,
url:'ups!saveUpsGroup',
border:false,
layout : 'fit',
items:[{
layout:{
type:'vbox',
align:'stretch'
},
fieldDefaults:{
labelAlign:'top',
labelWidth:70,
labelStyle:'font-weight:bold',
anchor: '100%'
},
items:[{
xtype:'textfield',
inputType:'hidden',
name:'groupID'
},{
labelAlign:'right',
xtype: Ext.create('ups.form.UpsGroupComboBox'),
name:'parentName',
fieldLabel:'上级分组'
},{
labelAlign:'right',
xtype: 'textfield',
name:'groupName',
fieldLabel:'分组名称',
blankText:'请输入分组名称',
allowBlank:false
},{
labelAlign:'right',
xtype : Ext.create('ups.form.selector.UserSelector'),
flex : 1
},{
labelAlign:'right',
xtype: 'textareafiel