javascript - Redmine plugins scripting -
i'm new javascript, redmine , ror. far have read , understood plugin development tutorial. when try things on own won't work...
if use this:
<% content_for :header_tags %> <%= javascript_include_tag 'script', :plugin => 'my_plugin' %> <% end %>
it generate correct link code on page source there no scripts loaded redmine_root/public/plugin_assets
. supposed happen?
i make hello world example work.
but far can understand, never work on whole redmine app if scripts don't loaded redmine_root/public/plugin_assets
.
if can me out understand why scripts not loading , how use scripts under redmine grateful.
- is code sample copy-paste project code? or typed manually misprints?
%
,=
signs missed in places, must<%= ... %>
or<% ... %>
what content of
redmine_root/public/plugin_assets
folder? must have plugin folder named same plugin,images
,javascripts
,stylesheets
folders, here:redmine_root ... plugins your_plugin # plugin name other_plugins ... public ... plugin_assets your_plugin # plugin name, must match plugin name in redmine_root/plugins javascripts your_script.js images stylesheets other_plugins
in case javascript_include_tag
works correctly standart parameters (script , plugin names).
Comments
Post a Comment