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.

  1. is code sample copy-paste project code? or typed manually misprints? % , = signs missed in places, must <%= ... %> or <% ... %>
  2. 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

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -