From 8b4d47fb315d81eeba204360a3ca53371e9828f2 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Fri, 18 Mar 2011 18:28:43 +0100 Subject: [PATCH] improve helpText attributes --- .../main/resources/sonia/scm/git.config.js | 1 + .../src/main/resources/sonia/scm/hg.config.js | 13 ++++--- .../main/resources/sonia/scm/svn.config.js | 1 + .../main/webapp/resources/js/sonia.config.js | 34 +++++++++++++++---- .../main/webapp/resources/js/sonia.group.js | 2 +- .../webapp/resources/js/sonia.repository.js | 10 +++--- 6 files changed, 46 insertions(+), 15 deletions(-) diff --git a/plugins/scm-git-plugin/src/main/resources/sonia/scm/git.config.js b/plugins/scm-git-plugin/src/main/resources/sonia/scm/git.config.js index 73140140bc..924c0cfcfa 100644 --- a/plugins/scm-git-plugin/src/main/resources/sonia/scm/git.config.js +++ b/plugins/scm-git-plugin/src/main/resources/sonia/scm/git.config.js @@ -37,6 +37,7 @@ registerConfigPanel({ xtype: 'textfield', name: 'repositoryDirectory', fieldLabel: 'Repository directory', + helpText: 'The location of the Git repositories.', allowBlank : false }] }); diff --git a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js index 0532890ece..b5c8794619 100644 --- a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js +++ b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js @@ -37,26 +37,31 @@ registerConfigPanel({ xtype : 'textfield', fieldLabel : 'HG Binary', name : 'hgBinary', - allowBlank : false + allowBlank : false, + helpText: 'The location of the Mercurial binary.' },{ xtype : 'textfield', fieldLabel : 'Python Binary', name : 'pythonBinary', - allowBlank : false + allowBlank : false, + helpText: 'The location of the Python binary.' },{ xtype : 'textfield', fieldLabel : 'Python Path', - name : 'pythonPath' + name : 'pythonPath', + helpText: 'The Python path.' },{ xtype: 'textfield', name: 'repositoryDirectory', fieldLabel: 'Repository directory', + helpText: 'The location of the Mercurial repositories.', allowBlank : false },{ xtype: 'checkbox', name: 'useOptimizedBytecode', fieldLabel: 'Optimized Bytecode (.pyo)', - inputValue: 'true' + inputValue: 'true', + helpText: 'Use the Python "-O" switch.' },{ xtype: 'button', text: 'Load Auto-Configuration', diff --git a/plugins/scm-svn-plugin/src/main/resources/sonia/scm/svn.config.js b/plugins/scm-svn-plugin/src/main/resources/sonia/scm/svn.config.js index c3fd59f90f..16f2b5965f 100644 --- a/plugins/scm-svn-plugin/src/main/resources/sonia/scm/svn.config.js +++ b/plugins/scm-svn-plugin/src/main/resources/sonia/scm/svn.config.js @@ -37,6 +37,7 @@ registerConfigPanel({ xtype: 'textfield', name: 'repositoryDirectory', fieldLabel: 'Repository directory', + helpText: 'The location of the Suberversion repositories.', allowBlank : false }] }); diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.config.js b/scm-webapp/src/main/webapp/resources/js/sonia.config.js index 1530a35368..1db46b29e4 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.config.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.config.js @@ -114,6 +114,19 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ errorTitleText: 'Error', errorMsgText: 'Could not load config.', + // help + servernameHelpText: 'The name of this server. This name would be part of the repository url.', + pluginRepositoryHelpText: 'The url of the plugin repository. Explanation of the {placeholders}:\n\ +
version = SCM-Manager Version
os = Operation System
arch = Architecture', + enableForwardingHelpText: 'Enbale mod_proxy port forwarding.', + forwardPortHelpText: 'The forwarding port.', + allowAnonymousAccessHelpText: 'Anonymous users can see public repositories.', + enableSSLHelpText: 'Enable SSL.', + sslPortHelpText: 'The ssl port.', + adminGroupsHelpText: 'Comma seperated list of groups with admin rights.', + adminUsersHelpText: 'Comma seperated list of users with admin rights.', + + initComponent: function(){ var config = { @@ -124,12 +137,14 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ xtype: 'textfield', fieldLabel: this.servnameText, name: 'servername', + helpText: this.servernameHelpText, allowBlank: false },{ xtype: 'checkbox', fieldLabel: this.enableForwardingText, name: 'enablePortForward', inputValue: 'true', + helpText: this.enableForwardingHelpText, listeners: { check: function(){ Ext.getCmp('serverport').setDisabled( ! this.checked ); @@ -141,23 +156,27 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ fieldLabel: this.forwardPortText, name: 'forwardPort', disabled: true, - allowBlank: false + allowBlank: false, + helpText: this.forwardPortHelpText },{ xtype: 'textfield', fieldLabel: this.pluginRepositoryText, name: 'plugin-url', vtype: 'pluginurl', - allowBlank: false + allowBlank: false, + helpText: this.pluginRepositoryHelpText },{ xtype: 'checkbox', fieldLabel: this.allowAnonymousAccessText, name: 'anonymousAccessEnabled', - inputValue: 'true' + inputValue: 'true', + helpText: this.allowAnonymousAccessHelpText },{ xtype: 'checkbox', fieldLabel: this.enableSSLText, name: 'enableSSL', inputValue: 'true', + helpText: this.enableSSLHelpText, listeners: { check: function(){ Ext.getCmp('sslPort').setDisabled( ! this.checked ); @@ -169,17 +188,20 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ fieldLabel: this.sslPortText, name: 'sslPort', disabled: true, - allowBlank: false + allowBlank: false, + helpText: this.sslPortHelpText },{ xtype : 'textfield', fieldLabel : this.adminGroupsText, name : 'admin-groups', - allowBlank : true + allowBlank : true, + helpText: this.adminGroupsHelpText },{ xtype : 'textfield', fieldLabel : this.adminUsersText, name : 'admin-users', - allowBlank : true + allowBlank : true, + helpText: this.adminUsersHelpText }], onSubmit: function(values){ diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.group.js b/scm-webapp/src/main/webapp/resources/js/sonia.group.js index 73a7326faf..d12396e810 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.group.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.group.js @@ -151,7 +151,7 @@ Sonia.group.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ createErrorMsgText: 'Group creation failed', // help - nameHelpText: 'The unique name for this group.', + nameHelpText: 'The unique name of the group.', descriptionHelpText: 'A short description of the group.', membersHelpText: 'The usernames of the group members.', diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js index 3cb2feccd9..b174c34ba6 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js @@ -189,12 +189,14 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{ createErrorMsgText: 'Repository creation failed', // help - nameHelpText: 'The name of the repository. This name would be part of the reository url.', - typeHelpText: 'The type of the repository.', - contactHelpText: 'An e-mailaddress of the person who is in charge for this repository.', + nameHelpText: 'The name of the repository. This name would be part of the repository url.', + typeHelpText: 'The type of the repository (e.g. Mercurial, Git or Subversion).', + contactHelpText: 'An email address of the person who is in charge for this repository.', descriptionHelpText: 'A short description of the repository.', publicHelpText: 'A public repository which is readable by every person.', - permissionHelpText: '... coming soon ...', + permissionHelpText: 'If the "Group Permission" box is checked, then the name represents the groupname otherwise the username.
\n\ + Type explenation:
READ = read permission
WRITE = read and write permission
\n\ + OWNER = read, write permissions and also the ability to manage the properties and permissions', permissionStore: null,