Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Use Web Resources on HTML File

I'm trying to make jira plugin. I want to add image, css and js files in my html file but I couldn't do it.

That's how looks my atlassian-plugin.xml

<web-resource key="Saphire-resources" name="Saphire Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<context>atl.general</context>
<resource type="download" name="Saphire.css" location="css/Saphire.css"/>
</web-resource>
<!-- add our web panel -->
<web-panel key="myPanel" location="servicedesk.portal.subheader">
<resource name="view" type="static" location="index.html"/>
<resource type="download" name="images/" location="images/"/>
</web-panel>

I'm not sure where i have to write the resources for my web HTML, so I tried one in web-panel label and another one in web-resource label.

I tried to follow this post: https://community.atlassian.com/t5/Answers-Developer-Questions/JIRA-Plugin-Development-How-to-import-image-file-on-velocity/qaq-p/521008

 

And I writte in my HTML the next code: 

<head>
<link rel="stylesheet" type="text/css" href="$req.contextPath/download/resources/com.atlasian.saphire:Saphire-resources/Saphire.css">
</head>
<body>
<button
id="send" type="button" class="btn" onclick="prompt()"><img src="$req.contextPath/download/resources/com.atlasian.saphire:Saphire-resources/images/send.png" /></button>
</body>

 I have the same problem win a JS file.

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Statuspage

New feature: Slack notifications for Statuspage

We're excited to announce the release of a long-requested feature on Statuspage. Now visitors to your status page can subscribe to get notified in Slack when you report an incident or maintenance. Th...

51 views 0 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you