Stefan Gränitz
2010-10-22 13:23:19 UTC
Hello,
for some reasons I disabled the Default Top Navigation Bar and defined
my own. So far it works. Now I need an additional image file that I want
to ship with my plugin. So I defined it as a resource:
{code}
<top-navigation key="division_custom_topnav" ...>
<order>9</order>
<description key="division.topnav.desc" />
<resource type="velocity" name="view"
location="templates/topnav.vm" />
<resource type="download" name="arrow_right.gif"
location="images/arrow_right.gif" />
</top-navigation>
{code}
..and put the file to the specified directory. In my velocity template I
want to include this image, but how can I access it? *Who gives me the
URL to use?*
In the jira-calendar-plugin I found this approach to reference resources:
{code}
<script type="text/javascript"
src="$webResourceManager.getStaticPluginResource(
'com.atlassian.jira.ext.calendar:issues-calendar-resource-js',
'issuescalendar.js')">
</script>
{code}
For me this would mean:
{code}
$webResourceManager.getStaticPluginResource(
'com.nativeinstruments.jira.plugins.dialogs:division_custom_topnav',
'arrow_right.gif')
{code}
..should work. But it does not. Velocity doesn't even touch it! The
string is not replaced by anything and occurs unchanged in the HTML
output. Anyone knows whats wrong??
thanx
--
Stefan Gränitz - Software Services
stefan.graenitz-***@public.gmane.org
NATIVE INSTRUMENTS GmbH
Schlesische Str. 28
10997 Berlin, Germany
http://www.native-instruments.com
***
TRAKTOR KONTROL S4 - the ultimate integrated DJ system
=> http://www.native-instruments.com/traktor-kontrol-s4
KOMPLETE 7 - the NI instruments and effects collection
=> http://www.native-instruments.com/komplete7
->>>>>> NATIVE INSTRUMENTS - The Future of Sound <<<<<<-
Registergericht: Amtsgericht Charlottenburg
Registernummer: HRB 72458
UST.-ID.-Nr. DE 20 374 7747
Geschäftsführung: Daniel Haver (CEO), Mate Galic
for some reasons I disabled the Default Top Navigation Bar and defined
my own. So far it works. Now I need an additional image file that I want
to ship with my plugin. So I defined it as a resource:
{code}
<top-navigation key="division_custom_topnav" ...>
<order>9</order>
<description key="division.topnav.desc" />
<resource type="velocity" name="view"
location="templates/topnav.vm" />
<resource type="download" name="arrow_right.gif"
location="images/arrow_right.gif" />
</top-navigation>
{code}
..and put the file to the specified directory. In my velocity template I
want to include this image, but how can I access it? *Who gives me the
URL to use?*
In the jira-calendar-plugin I found this approach to reference resources:
{code}
<script type="text/javascript"
src="$webResourceManager.getStaticPluginResource(
'com.atlassian.jira.ext.calendar:issues-calendar-resource-js',
'issuescalendar.js')">
</script>
{code}
For me this would mean:
{code}
$webResourceManager.getStaticPluginResource(
'com.nativeinstruments.jira.plugins.dialogs:division_custom_topnav',
'arrow_right.gif')
{code}
..should work. But it does not. Velocity doesn't even touch it! The
string is not replaced by anything and occurs unchanged in the HTML
output. Anyone knows whats wrong??
thanx
--
Stefan Gränitz - Software Services
stefan.graenitz-***@public.gmane.org
NATIVE INSTRUMENTS GmbH
Schlesische Str. 28
10997 Berlin, Germany
http://www.native-instruments.com
***
TRAKTOR KONTROL S4 - the ultimate integrated DJ system
=> http://www.native-instruments.com/traktor-kontrol-s4
KOMPLETE 7 - the NI instruments and effects collection
=> http://www.native-instruments.com/komplete7
->>>>>> NATIVE INSTRUMENTS - The Future of Sound <<<<<<-
Registergericht: Amtsgericht Charlottenburg
Registernummer: HRB 72458
UST.-ID.-Nr. DE 20 374 7747
Geschäftsführung: Daniel Haver (CEO), Mate Galic