Hi All,
I'm trying to add some help text for a custom field in create screen, which is mentioned in the link,
https://confluence.atlassian.com/display/JIRA/Creating+Help+for+a+Custom+Field
I used below script and added to description of the "Application Name" custom field, but not getting anything in create screen.
<script type="text/javascript">
function showHelp() {
var helpDiv = AJS.$("Application Name");
if (helpDiv.length == 1) {
helpDiv = helpDiv[0];
if (helpDiv.style.display == 'none')
{ helpDiv.style.display = ''; }
else
{ helpDiv.style.display='none'; }
}
}
</script>
<a href="#" title="Application Name" onclick="showHelp(); return false;"><img src="/images/icons/ico_help.png"/></a>
<div id="Application Name" style="display:none">
Application Name - help text
</div>
Could you please suggest a solution.
thanks,
Sanu P Soman
try by adding javascript inside of this bind event
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) { //add your code here });
check this
https://answers.atlassian.com/questions/47843/strange-javascript-problem-in-create-screen
Tried,
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
<script type="text/javascript">
function showHelp() {
var helpDiv = AJS.$("Application Name");
if (helpDiv.length == 1) {
helpDiv = helpDiv[0];
if (helpDiv.style.display == 'none') {
helpDiv.style.display = '';
} else {
helpDiv.style.display='none';
}
}
}
</script>
<a href="#" title="Application Name" onclick="showHelp(); return false;"><img src="/images/icons/ico_help.png"/></a>
<div id="Application Name" style="display:none">
Application Name - help text
</div>
});
But getting,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try like this
<script type="text/javascript"> JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) { function showHelp() { var helpDiv = AJS.$("Application Name"); if (helpDiv.length == 1) { helpDiv = helpDiv[0]; if (helpDiv.style.display == 'none') { helpDiv.style.display = ''; } else { helpDiv.style.display='none'; } } } }); </script> <a href="#" title="Application Name" onclick="showHelp(); return false;"><img src="/images/icons/ico_help.png"/></a> <div id="Application Name" style="display:none"> Application Name - help text </div>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now nothing showing in description, the problem is something else?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.