Hello, i develop plugin for jira.
I have following resources in my xml file. Can someone show example how to use it in velocity template?
Thanks!
Hello,
You should add to your velocity template something like this:
$webResourceManager.requireResourcesForContext("pluginkey:jira-plugin-resources")
You can find the plugin key of your plugin in the add-on sections, after you installed your add-on.
@Alexey Matveev looks you've mixed up requireResourcesForContext and requireResource
$webResourceManager.requireResourcesForContext takes context value as a parameter. In this case it will be "jira-plugin"
$webResourceManager.requireResource takes resource key in format "pluginkey:modulekey".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. And after how to require it in template?
I should call another function? (just a resource name doesn't work)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mikhail_Kopylov thank you. It must be
$webResourceManager.requireResources("pluginkey:jira-plugin-resources")
You do not need to add the script tag. Your script is already loaded. Try to put alert into your js file and you will see the alert pop-up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
$webResourceManager.requireResource("pluginkey:jira-plugin-resources") actually :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, it works. I became js and css files.
But how to load images?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.