I'm trying to get a javascript file registered, but I can't figure out what I am doing wrong.
In my.product/src/my/product, I add a directory called 'static'.
In configure.zcml, I add:
<plone:static
name="my.product.resources"
type="plone"
directory="static"
/>
Then in the static directory, I add a js file with a simple on click statement:
jQuery(function($){
$('#hello').click(function(e){
alert('hello');
}
});
Then under profiles/default, in registry.xml, I have:
<?xml version="1.0"?>
<registry>
<records prefix="plone.resources/my.product.resources"
interface='Products.CMFPlone.interfaces.IResourceRegistry'>
<value key="js">++plone++static/myproduct.js</value>
</records>
</registry>
I run quick install and it "registers" because I go to Site Setup -> Resource Registries, I see 'my.product.resources' under resources. However, when I go to overrides to check my javascript file's code (Overrides -> ++plone++static/myproduct.js), I get an error popup "error loading resource for editing".
I'm assuming I'm having difficulty pointing to the file in my package, what am I doing wrong?