Context menu problem after upgrade 3.3
Added by Haihan Ji almost 8 years ago
A few days ago, I upgrade redmine to3.3. It a disaster!
We have many customize plugins that use ApplicationHelper#context_menu(url)
. But redmine 3.3 remove the parameter, and declare url
in form tag.
I want an easy method to make old plugins work. Any suggestions?
thank you!
Replies (1)
RE: Context menu problem after upgrade 3.3 - Added by Haihan Ji almost 8 years ago
Well, I made it.
Old:
<%= form_tag({}) do %>
<table class="list">
<tr class="hascontextmenu">
...
</table>
<% end %>
<%= context_menu(context_url) %>
New:
<%= form_tag({}, :data => {:cm_url => context_url}) do %>
<table class="list">
<tr class="hascontextmenu">
...
</table>
<% end %>
<% if method(:context_menu).arity == 0 %>
<%= context_menu %>
<% else %>
<%= context_menu(context_url) %>
<% end %>