Including js for custom field admin screen ( field configuration)

Kepio
Contributor
March 21, 2012

The docmentions to use web-resource to declare js/css to be used in a plugin - it works great for the view/edit screen of my custom field, but the javascript is not picked up in the "admin" config screens. Do I need to add something more than what would be below?

<web-resource name="Resources" key="resources">
        <context>atl.general</context>
        <resource name="foo.js" type="download" location="foo.js"></resource>
    </web-resource>

1 answer

1 accepted

1 vote
Answer accepted
Dieter
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.
March 21, 2012
Hi Kepio, instead of atl.general try jira.general if you are on 4.2+ If you want to keep your plugin cross product compatible you should try to add the context atl.admin since atl.general is for everything except admin.screens. Please also have a look at https://developer.atlassian.com/display/JIRADEV/Web+Resource+Plugin+Module what else is possible as context.
Dieter
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.
March 21, 2012
Kepio
Contributor
March 21, 2012

Brilliant - thank you so much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events