mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
added helpText attributes to Sonia.group.FormPanel
This commit is contained in:
@@ -150,6 +150,11 @@ Sonia.group.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
updateErrorMsgText: 'Group update failed',
|
||||
createErrorMsgText: 'Group creation failed',
|
||||
|
||||
// help
|
||||
nameHelpText: 'The unique name for the group.',
|
||||
descriptionHelpText: 'A short description for the group.',
|
||||
membersHelpText: 'The usernames of the group members.',
|
||||
|
||||
memberStore: null,
|
||||
|
||||
initComponent: function(){
|
||||
@@ -214,11 +219,13 @@ Sonia.group.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
fieldLabel: this.nameText,
|
||||
name: 'name',
|
||||
allowBlank: false,
|
||||
readOnly: this.item != null
|
||||
readOnly: this.item != null,
|
||||
helpText: this.nameHelpText
|
||||
},{
|
||||
fieldLabel: this.descriptionText,
|
||||
name: 'description',
|
||||
xtype: 'textarea'
|
||||
xtype: 'textarea',
|
||||
helpText: this.descriptionHelpText
|
||||
}]
|
||||
},{
|
||||
id: 'memberGrid',
|
||||
@@ -255,6 +262,13 @@ Sonia.group.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
this.memberStore.remove(selected);
|
||||
}
|
||||
}
|
||||
},'->',{
|
||||
id: 'memberGridHelp',
|
||||
xtype: 'box',
|
||||
autoEl: {
|
||||
tag: 'img',
|
||||
src: 'resources/images/help.gif'
|
||||
}
|
||||
}]
|
||||
}];
|
||||
|
||||
@@ -262,6 +276,18 @@ Sonia.group.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
||||
Sonia.group.FormPanel.superclass.initComponent.apply(this, arguments);
|
||||
},
|
||||
|
||||
afterRender: function(){
|
||||
// call super
|
||||
Sonia.group.FormPanel.superclass.afterRender.apply(this, arguments);
|
||||
|
||||
Ext.QuickTips.register({
|
||||
target: Ext.getCmp('memberGridHelp'),
|
||||
title: '',
|
||||
text: this.membersHelpText,
|
||||
enabled: true
|
||||
});
|
||||
},
|
||||
|
||||
updateMembers: function(item){
|
||||
var members = [];
|
||||
this.memberStore.data.each(function(record){
|
||||
|
||||
Reference in New Issue
Block a user