JIRA default field(Summary) that use CSS and JS web resource

Shrek Ding July 13, 2012

Hi, in https://developer.atlassian.com/display/JIRADEV/Custom+Fields+that+use+CSS+or+JavaScript+Web+Resources+in+JIRA+5.0

it is possible to set JS and CSS for custom field, so I want to know if it is possible to set for JIRA default(Standard) field, like Summary field? thanks.

1 answer

1 accepted

2 votes
Answer accepted
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2012

Yes, as long as you can identify an object to hang the code off of. I done it for checkboxes and radio buttons to get them to go across a page instead of down a page.

Shrek Ding July 13, 2012

Hi Norman, that is the question, how to identify an object to hang the code off of, do I need to define a new custom field type and hang the code on the new custom field's vm file?

I know how to hang code to a custom field with following code in atlassian-plugin.xml file, but how to do that for a default one?

<customfield-type key="clarityproject" name="${project.name}" class="Class Name">

		<description>Choose a Clarity Project from a search list of possible matches.</description>

		<resource type="velocity" name="view"
			location="templates/plugins/fields/view/view-basictext.vm" />
		<resource type="velocity" name="column-view"
			location="templates/plugins/fields/view/view-limited-text.vm" />
		<resource type="velocity" name="xml"
			location="templates/plugins/fields/xml/xml-basictext.vm" />
		<resource type="velocity" name="edit" 
			location="/edit-project-project.vm" />
</customfield-type>

Thanks.

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2012

You need to look at the generated source code page that the browser rendered. Then figure out what combination of ids, classes or tags you need to reach the object you want. It is hard to be more specific without an example.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events