summaryrefslogtreecommitdiffstats
path: root/app/views/journals/update.js.erb
blob: 3d6be8d940156d4c8d93b146048e84e22faf4f15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<% if @journal.frozen? %>
  $("#change-<%= @journal.id %>").remove();
<% else %>
  $("#change-<%= @journal.id %>").attr('class', '<%= @journal.css_classes %>');
  $("#change-<%= @journal.id %> .journal-actions").html('<%= escape_javascript(render_journal_actions(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
  $("#journal-<%= @journal.id %>-private_notes").replaceWith('<%= escape_javascript(render_private_notes_indicator(@journal)) %>');
  $("#journal-<%= @journal.id %>-notes").replaceWith('<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
  $("#journal-<%= @journal.id %>-notes").show();
  $("#journal-<%= @journal.id %>-form").remove();
  setupWikiTableSortableHeader();
<% end %>

<%= call_hook(:view_journals_update_js_bottom, { :journal => @journal }) %>