This commit is contained in:
chenmin 2014-08-04 17:36:44 +08:00
commit 226d19b912
3 changed files with 10 additions and 5 deletions

View File

@ -40,12 +40,17 @@ class MemosController < ApplicationController
end
def create
unless params[:quote].nil?
@quote = params[:quote][:quote]
else
if params[:quote].nil?
@quote = ""
else
@quote = params[:quote]
end
#unless params[:quote].nil?
# @quote = params[:quote][:quote]
#end
@memo = Memo.new(params[:memo])
@memo.forum_id = params[:forum_id]
@memo.author_id = User.current.id

View File

@ -4,7 +4,7 @@
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
<div id="message_quote" class="wiki"></div>
<%= text_area :quote,:quote,:style => 'display:none' %>
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
<%= label_tag(l(:label_reply_plural)) %>:
<!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> -->
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %></p>

View File

@ -1,4 +1,4 @@
//ckeditor.setData("<%= raw escape_javascript(@content) %>");
$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>");
$('#quote_quote').html("<%= raw escape_javascript(@content) %>");
$('#quote').val("<%= raw escape_javascript(@content) %>");
showAndScrollTo("new_memo", "cke_editor01");