@@ -54,6 +54,13 module ApplicationHelper | |||
|
54 | 54 | link_to "#{issue.tracker.name} ##{issue.id}", :controller => "issues", :action => "show", :id => issue |
|
55 | 55 | end |
|
56 | 56 | |
|
57 | def toggle_link(name, id, options={}) | |
|
58 | onclick = "Element.toggle('#{id}'); " | |
|
59 | onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ") | |
|
60 | onclick << "return false;" | |
|
61 | link_to(name, "#", :onclick => onclick) | |
|
62 | end | |
|
63 | ||
|
57 | 64 | def image_to_function(name, function, html_options = {}) |
|
58 | 65 | html_options.symbolize_keys! |
|
59 | 66 | tag(:input, html_options.merge({ |
@@ -24,10 +24,9 | |||
|
24 | 24 | </div> |
|
25 | 25 | |
|
26 | 26 | <% if authorize_for 'news', 'add_comment' %> |
|
27 | <% form_tag({:action => 'add_comment', :id => @news}) do %> | |
|
28 | <%= error_messages_for 'comment' %> | |
|
29 | <p><label for="comment_comment"><%= l(:label_comment_add) %></label><br /> | |
|
30 | <%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %></p> | |
|
31 | <%= submit_tag l(:button_add) %> | |
|
27 | <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comment" %></p> | |
|
28 | <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %> | |
|
29 | <%= text_area 'comment', 'comment', :cols => 60, :rows => 6 %> | |
|
30 | <p><%= submit_tag l(:button_add) %></p> | |
|
32 | 31 | <% end %> |
|
33 | 32 | <% end %> No newline at end of file |
@@ -15,7 +15,7 | |||
|
15 | 15 | <%= submit_tag l(:button_submit), :class => "button-small" %> |
|
16 | 16 | </td> |
|
17 | 17 | <td align="left" style="width:15%"> |
|
18 | <a href="#" onclick="Element.toggle('trackerselect')"><%= l(:label_options) %></a> | |
|
18 | <%= toggle_link l(:label_options), "trackerselect" %> | |
|
19 | 19 | <div id="trackerselect" class="rightbox overlay" style="width:140px; display:none;"> |
|
20 | 20 | <p><strong><%=l(:label_tracker_plural)%></strong></p> |
|
21 | 21 | <% @trackers.each do |tracker| %> |
@@ -17,7 +17,7 | |||
|
17 | 17 | <%= submit_tag l(:button_submit), :class => "button-small" %> |
|
18 | 18 | </td> |
|
19 | 19 | <td> |
|
20 | <a href="#" onclick="Element.toggle('trackerselect')"><%= l(:label_options) %></a> | |
|
20 | <%= toggle_link l(:label_options), "trackerselect" %> | |
|
21 | 21 | <div id="trackerselect" class="rightbox overlay" style="width:140px; display: none;"> |
|
22 | 22 | <p><strong><%=l(:label_tracker_plural)%></strong></p> |
|
23 | 23 | <% @trackers.each do |tracker| %> |
General Comments 0
You need to be logged in to leave comments.
Login now