Sha256: 941b1a220cecc1f886420fde471aeb0baaf9e61f3babfaf69048b1e1f2a04442

Contents?: true

Size: 540 Bytes

Versions: 9

Compression:

Stored size: 540 Bytes

Contents

<%
  id = @comment.parent.nil? ? "commontator-thread-#{@commontator_thread.id}-new-comment" :
                              "commontator-comment-#{@comment.parent.id}-reply"
%>

var commontatorForm = $("#<%= id %>").html("<%= escape_javascript(
  render partial: 'form', locals: { comment: @comment, thread: @commontator_thread }
) %>").hide().fadeIn();
$('html, body').animate({ scrollTop: commontatorForm.offset().top - window.innerHeight/2 }, 'fast');

$("#<%= id %>-link").hide();

$('#<%= id %>-body').focus();

<%= javascript_proc %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
commontator-7.0.1 app/views/commontator/comments/new.js.erb
commontator-7.0.0 app/views/commontator/comments/new.js.erb
commontator-6.3.2 app/views/commontator/comments/new.js.erb
commontator-6.3.1 app/views/commontator/comments/new.js.erb
commontator-6.3.0 app/views/commontator/comments/new.js.erb
commontator-6.2.1 app/views/commontator/comments/new.js.erb
commontator-6.2.0 app/views/commontator/comments/new.js.erb
commontator-6.1.1 app/views/commontator/comments/new.js.erb
commontator-6.1.0 app/views/commontator/comments/new.js.erb