1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-30 04:09:38 +00:00
redmine/app/views/journals/update.js.erb
Go MAEDA 38730e5b3c Add a button to copy pre code block content to the clipboard (#29214).
Patch by Mizuki ISHIKAWA (user:ishikawa999) and Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23663 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-04-17 06:52:50 +00:00

23 lines
1.3 KiB
Plaintext

<% 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();
var journal_header = $("#change-<%= @journal.id %>>div.note>h4.note-header");
var journal_updated_info = journal_header.find("span.update-info");
if (journal_updated_info.length > 0) {
journal_updated_info.replaceWith('<%= escape_javascript(render_journal_update_info(@journal)) %>');
} else {
journal_header.append('<%= escape_javascript(render_journal_update_info(@journal)) %>');
}
setupWikiTableSortableHeader();
setupCopyButtonsToPreElements();
setupHoverTooltips();
<% end %>
<%= call_hook(:view_journals_update_js_bottom, { :journal => @journal }) %>