Fix @mention autocomplete for comments & forum posts.
Fix comment autocomplete (broken in 1257639). Also fix forum post
autocomplete (didn't work when editing forum posts).
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<%= simple_form_for(comment, :html => {:class => "edit_comment"}) do |f| %>
|
||||
<%= f.hidden_field :post_id %>
|
||||
<%= dtext_field "comment", "body", :value => comment.body, :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %>
|
||||
<%= dtext_field "comment", "body", :classes => "autocomplete-mentions", :value => comment.body, :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %>
|
||||
<%= f.button :submit, "Submit", :data => { :disable_with => "Submitting..." } %>
|
||||
<%= dtext_preview_button "comment", "body", :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %>
|
||||
<% if comment.new_record? %>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- preview_id
|
||||
- value
|
||||
-->
|
||||
<div class="input text optional">
|
||||
<div class="input text optional <%= classes %>">
|
||||
<label class="text optional" for="<%= input_id %>"><%= name %></label>
|
||||
|
||||
<div class="dtext-previewable">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%= simple_form_for(forum_post) do |f| %>
|
||||
<%= f.input :topic_id, :as => :hidden %>
|
||||
<%= dtext_field "forum_post", "body", :value => forum_post.body, :input_id => "forum_post_body_for_#{forum_post.id}", :preview_id => "dtext-preview-for-#{forum_post.id}" %>
|
||||
<%= dtext_field "forum_post", "body", :value => forum_post.body, :classes => "autocomplete-mentions", :input_id => "forum_post_body_for_#{forum_post.id}", :preview_id => "dtext-preview-for-#{forum_post.id}" %>
|
||||
|
||||
<%= f.button :submit, "Submit" %>
|
||||
<%= dtext_preview_button "forum_post", "body", :input_id => "forum_post_body_for_#{forum_post.id}", :preview_id => "dtext-preview-for-#{forum_post.id}" %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%= simple_form_for(forum_post) do |f| %>
|
||||
<%= f.input :topic_id, :as => :hidden %>
|
||||
<%= dtext_field "forum_post", "body" %>
|
||||
<%= dtext_field "forum_post", "body", :classes => "autocomplete-mentions" %>
|
||||
|
||||
<%= f.button :submit, "Submit", :data => { :disable_with => "Submitting..." } %>
|
||||
<%= dtext_preview_button "forum_post", "body" %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<%= hidden_field_tag "forum_topic[original_post_attributes][topic_id]", forum_topic.id %>
|
||||
<% end %>
|
||||
|
||||
<%= dtext_field "forum_post", "body", :input_name => "forum_topic[original_post_attributes][body]", :value => forum_topic.original_post.body, :input_id => "forum_post_body_for_#{forum_topic.original_post.id}", :preview_id => "dtext-preview-for-#{forum_topic.original_post.id}" %>
|
||||
<%= dtext_field "forum_post", "body", :classes => "autocomplete-mentions", :input_name => "forum_topic[original_post_attributes][body]", :value => forum_topic.original_post.body, :input_id => "forum_post_body_for_#{forum_topic.original_post.id}", :preview_id => "dtext-preview-for-#{forum_topic.original_post.id}" %>
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.is_moderator? %>
|
||||
|
||||
Reference in New Issue
Block a user