Hi,
I know this question has been asked several times... but I get nightmares already, i can't get my javascript in my Plugin. Here is resources definition in my atlassian-plugin.xml:
<web-resource key="skilldatenbank.resources" name="Skilldatenbank Plugin Web Resources" > <dependency>com.atlassian.auiplugin:ajs</dependency> <dependency>confluence.web.resources:ajs</dependency> <dependency>confluence.web.resources:jquery</dependency> <resource type="download" name="confluence-skilldatenbank-plugin.css" location="/css/confluence-skilldatenbank-plugin.css" > <property key="content-type" value="text/css" /> </resource> <resource type="download" name="confluence-skilldatenbank-plugin.js" location="/js/confluence-skilldatenbank-plugin.js" > <property key="content-type" value="text/javascript"/> </resource> <resource type="download" name="images/" location="/images"/> <context>atl.general</context> </web-resource>
and so i try to reference this resources in my .vm page.
#requireResource("de.twt.confluence.plugins:skilldatenbank.resources")
but there are neither javacsript nor styles in my page...
what is even more strange, it is not a self-defining <script> rendered in the template...
<head> <title>$i18n.getText("catpureskills.page.title")</title> #requireResource("de.twt.confluence.plugins:skilldatenbank.resources") <script type="text/javascript"> jQuery(document).ready(function() { alert(); }); function fnSendAssessment(arg) { alert(arg); } </script> </head>
if i start my "plugin" with: atlas-debug it does't work.
Please HELP!!! :-)
What is your groupID and your artefactID in your pom.xml and the atlassian-plugin-key in atlassian-plugin.xml?
Maybe "de.twt.confluence.plugins:skilldatenbank.resources"
is wrong.
pom.xml
<modelVersion>4.0.0</modelVersion> <groupId>de.twt.confluence.plugins</groupId> <artifactId>confluence-skilldatenbank-plugin</artifactId> <version>1.0</version>
atlassian-plugin.xml
<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2"> <plugin-info> <description>${project.description}</description> <version>${project.version}</version> <vendor name="${project.organization.name}" url="${project.organization.url}" /> <param name="plugin-icon">images/pluginIcon.png</param> <param name="plugin-logo">images/pluginLogo.png</param> </plugin-info>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try
#requireResource("de.twt.confluence.plugins.confluence-skilldatenbank-plugin:skilldatenbank.resources")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I'll try that out. Whether you know why javascript is not displayed on the page... i have included javascript in the VM Page at the header section, but it doesn't work!
<script type="text/javascript"> jQuery(document).ready(function() { alert(); }); function fnSendAssessment(arg) { alert(arg); } </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.