app/views/commontator/comments/cancel.js.erb in commontator-4.8.0 vs app/views/commontator/comments/cancel.js.erb in commontator-4.9.0
- old
+ new
@@ -1,12 +1,19 @@
<% unless @comment.try(:id).blank? %>
<% @comment.reload %>
$("#comment_<%= @comment.id.to_s %>_body_div").html("<%= escape_javascript(
- render :partial => 'body', :locals => {:comment => @comment}) %>");
+ render :partial => 'body', :locals => { :comment => @comment }) %>");
<% end %>
-$("#thread_<%= @thread.id %>_new_comment_div").hide();
+<% unless @new_comment.nil? %>
+ $("#thread_<%= @thread.id %>_new_comment_form_div").html("<%= escape_javascript(
+ render :partial => 'form',
+ :locals => { :comment => @new_comment,
+ :thread => @thread,
+ :per_page => @per_page }) %>");
+<% else %>
+ $("#thread_<%= @thread.id %>_new_comment_form_div").hide();
-$("#thread_<%= @thread.id %>_new_comment_link_span").fadeIn();
+ $("#thread_<%= @thread.id %>_new_comment_link_div").fadeIn();
+<% end %>
<%= javascript_proc %>
-