<% entity = @issue || @journal.journalized %>
<% editor = entity.class.name.underscore %>

if(typeof load_update_form === 'function') {
  load_update_form(false, false);
}
if (typeof CKEDITOR !== 'undefined') {
  CKEDITOR.instances.<%= editor %>_notes.setData( '<%= raw j(@content) %>' );
}
else{
  $("textarea#<%= editor %>_notes").val("<%= raw j(@content) %>");
}
EASY.utils.showAndScrollTo('update', -130, 'update input:submit');
$('.sidebar-link_to-update').removeClass('button-positive').addClass('button');

<%
  # when quoting a private journal, check the private checkbox
  if @journal && @journal.private_notes?
%>
$('#issue_private_notes').prop('checked', true);
<% end %>
