|
4 | 4 |
|
5 | 5 | -# Two hidden fields store the IDs of notes and emails shown for the asset. These IDs are used
|
6 | 6 | -# by [Expand/Collapse All]. The contents gets updated by actions such as [Add] or [Delete].
|
7 |
| - = hidden_field_tag :shown_notes, "#{commentable.comment_ids.join(',')}" |
8 |
| - = hidden_field_tag :shown_emails, "#{commentable.email_ids.join(',')}" |
| 7 | + = hidden_field_tag :shown_notes, "#{commentable.comment_ids.join(',')}", :id => "#{id_prefix}_shown_notes" |
| 8 | + = hidden_field_tag :shown_emails, "#{commentable.email_ids.join(',')}", :id => "#{id_prefix}_shown_emails" |
9 | 9 |
|
10 | 10 | = link_to avatar_for(@current_user, :size => "25x25"), user_path(@current_user)
|
11 | 11 | .tools{ {:id => "#{id_prefix}_comment_new_tools"}.merge(invisible) }
|
12 |
| - = link_to_function("Expand All", "crm.flip_notes_and_emails('Expanded', 'More...', 'Less...')") << " | " |
13 |
| - = link_to_function("Collapse All", "crm.flip_notes_and_emails('Collapsed', 'More...', 'Less...')") |
| 12 | + = link_to_function("Expand All", "crm.flip_notes_and_emails('Expanded', 'More...', 'Less...', '#{id_prefix}')") << " | " |
| 13 | + = link_to_function("Collapse All", "crm.flip_notes_and_emails('Collapsed', 'More...', 'Less...', '#{id_prefix}')") |
14 | 14 |
|
15 | 15 | %div{ {:id => "#{id_prefix}_post"}.merge(hidden_if(true))}
|
16 | 16 | = form_for(@comment, :remote => true, :html => {:id => "#{id_prefix}_new_comment"}) do |f|
|
|
0 commit comments