Use double quotes inside ERB

We were using single quotes inside ERB code when that code was inside
HTML double quotes.
This commit is contained in:
Javi Martín
2019-03-25 13:31:26 +01:00
parent 4c35df4812
commit 3e4e65ead7
65 changed files with 107 additions and 107 deletions

View File

@@ -3,7 +3,7 @@
<span class="divider">&nbsp;|&nbsp;</span>
<a id="flag-expand-comment-<%= comment.id %>"
data-toggle="flag-drop-comment-<%= comment.id %>"
title="<%= t('shared.flag') %>">
title="<%= t("shared.flag") %>">
<span class="icon-flag flag-disable"></span>
</a>
<span id="flag-drop-comment-<%= comment.id %>"
@@ -19,7 +19,7 @@
<span class="divider">&nbsp;|&nbsp;</span>
<a id="unflag-expand-comment-<%= comment.id %>"
data-toggle="unflag-drop-comment-<%= comment.id %>"
title="<%= t('shared.unflag') %>">
title="<%= t("shared.unflag") %>">
<span class="icon-flag flag-active"></span>
</a>
<span class="dropdown-pane" id="unflag-drop-comment-<%= comment.id %>" data-dropdown data-auto-focus="true">

View File

@@ -1 +1 @@
$("#flag-actions-<%= dom_id(@comment) %>").html('<%= j render("comments/flag_actions", comment: @comment) %>');
$("#flag-actions-<%= dom_id(@comment) %>").html("<%= j render("comments/flag_actions", comment: @comment) %>");

View File

@@ -5,7 +5,7 @@ var comment_html = "<%= j(render @comment) %>"
App.Comments.reset_form(commentable_id);
App.Comments.add_comment(commentable_id, comment_html);
<% else -%>
var parent_id = '<%= "comment_#{@comment.parent_id}" %>';
var parent_id = "<%= "comment_#{@comment.parent_id}" %>";
App.Comments.reset_and_hide_form(parent_id);
App.Comments.add_reply(parent_id, comment_html);
<% end -%>

View File

@@ -1,5 +1,5 @@
<% dom_id = parent_or_commentable_dom_id(@comment.parent_id, @commentable) %>
var field_with_errors = "#js-comment-form-<%= dom_id %> #comment-body-<%= dom_id %>";
App.Comments.display_error(field_with_errors, "<%= j render('comments/errors') %>");
App.Comments.display_error(field_with_errors, "<%= j render("comments/errors") %>");

View File

@@ -1 +1 @@
$("#<%= dom_id(@comment) %>_votes").html('<%= j render("comments/votes", comment: @comment) %>');
$("#<%= dom_id(@comment) %>_votes").html("<%= j render("comments/votes", comment: @comment) %>");