I have a JIRA plugin which adds a new tab to the project sidebar in JIRA 7 as defined here via web-item. https://developer.atlassian.com/jiradev/jira-platform/guides/projects/design-guide-jira-project-centric-view/development-guide-jira-project-centric-view
I want to use a custom icon now, so I guess I need to make it available somehow to CSS and define this in param="iconClass". But where and in which image type to put the icon in my plugin and how to define the CSS class for it?
Any ideas how to do that?
Best regards
Holger
Community moderators have prevented the ability to post new answers.
You need to create a <web-resource/> in your atlassian-plugin.xml and have it serve a single css file that has the background property on the class name that you've created and then use the jira.project.sidebar context on the web-resource.
Great, works fine!
Here is my atlassian-plugin.xml
<web-resource ...> <resource type="download" name="versionmanager.css" location="/versionmanager/versionmanager.css"/> <resource type="download" name="version_edit.svg" location="/images/version_edit.svg"/> ... </web-resource>
And my css file
.version-manager-icon { background-image: url("version_edit.svg"); }
And web-item in atlassian-plugin.xml
<web-item ...> <param name="iconClass" value="aui-icon-large version-manager-icon"/> ... </web-item>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Take care to add a content-type parameter on the resource. If you don't, the image will be served as octet-stream.
<web-resource key="bitbucket.repository.nav.resources" name="Repository navigation resources"> <resource type="download" name="repository.css" location="/css/repository.css"/> <resource type="download" name="icon.svg" location="/images/icon.svg"> <param name="content-type" value="image/svg+xml"/> </resource> <context>atl.general</context> </web-resource>
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.