Skip to content

Commit

Permalink
added .rvmrc to gitignore, fixed a few syntax typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kotlyar committed Mar 27, 2012
1 parent f95c9b5 commit 4455068
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,3 +7,4 @@ spec/dummy/log/*.log
spec/dummy/tmp/ spec/dummy/tmp/
*.swp *.swp
*.gem *.gem
.rvmrc
12 changes: 6 additions & 6 deletions app/views/opinio/comments/create.js.erb
@@ -1,13 +1,13 @@
$('#no_comments').fadeOut() $('#no_comments').fadeOut();
<% if @comment.valid? %> <% if @comment.valid? %>
<% if @reply %> <% if @reply %>
if($('#comment_<%= @comment.commentable_id %> ul').length == 0) if($('#comment_<%= @comment.commentable_id %> ul').length == 0)
$('#comment_<%= @comment.commentable_id %>').append('<ul id="comment_<%= @comment.commentable_id %>_replies" class="replies"></ul>') $('#comment_<%= @comment.commentable_id %>').append('<ul id="comment_<%= @comment.commentable_id %>_replies" class="replies"></ul>');
$('#comment_<%= @comment.commentable_id %>_replies').append("<%= escape_javascript( render @comment, :locals => {:reply => @reply} ) %>") $('#comment_<%= @comment.commentable_id %>_replies').append("<%= escape_javascript( render @comment, :locals => {:reply => @reply} ) %>");
$('#commentable_id').val('<%= @comment.commentable.commentable_id %>') $('#commentable_id').val('<%= @comment.commentable.commentable_id %>');
$('#commentable_type').val('<%= @comment.commentable.commentable_type %>') $('#commentable_type').val('<%= @comment.commentable.commentable_type %>');
<% else %> <% else %>
$('#comments').prepend("<%= escape_javascript( render @comment, :locals => {:reply => @reply} ) %>") $('#comments').prepend("<%= escape_javascript( render @comment, :locals => {:reply => @reply} ) %>");
<% end %> <% end %>
<% else %> <% else %>
$('#comments').prepend("<%= escape_javascript(flash[:notice]) %>"); $('#comments').prepend("<%= escape_javascript(flash[:notice]) %>");
Expand Down
8 changes: 4 additions & 4 deletions app/views/opinio/comments/reply.js.erb
@@ -1,4 +1,4 @@
$("#commentable_id").val('<%= @commentable_id %>') $("#commentable_id").val('<%= @commentable_id %>');
$("#commentable_type").val('<%= @commentable_type %>') $("#commentable_type").val('<%= @commentable_type %>');
$("#new_comment textarea").val('') $("#new_comment textarea").val('');
$("#new_comment textarea").focus() $("#new_comment textarea").focus();

0 comments on commit 4455068

Please sign in to comment.