Hi Joel,
I get custom javascript scripts into admin pages in the past I've just
added them programmatically. If you call include_javascript(script)
in your controller the javascript library should be spat out in the
rendered HTML (for an index controller method). I've explained more
about it here - http://hamishrickerby.com/2008/08/15/radiant-cms-tutorial-custom-javascript-in-admin-pages/
def index
include_javascript("admin/mootools-1.2-core-yc.js")
# rest of your index code goes here
end
HTH.
::: hamish rickerby :::
m: [email protected]
twitter: @rickerbh
http://glimmerdesign.com
On 23 May 2009, at 12:49, Joel Oliveira wrote:
Hi everyone -
I'm trying to put together a really simple extension for the admin
area that
relies on a javascript library. I generated the extension and
changed the
contents of the main extension.rb file to contain
def activate
admin.page.index.add :top, 'new_header'
end
and placed a partial in
my_extension/app/views/admin/pages/_new_header.html.haml that
contains
- include_javascript 'admin/my_js'
When I restart my dev instance it doesn't show up. When I put that
same
snippet of haml in another header partial it does. What am I
missing to get
it to spit out the script tag?
Thanks in advance!
- Joel
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant