Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
226d19b912
|
@ -40,12 +40,17 @@ class MemosController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
unless params[:quote].nil?
|
|
||||||
@quote = params[:quote][:quote]
|
if params[:quote].nil?
|
||||||
else
|
|
||||||
@quote = ""
|
@quote = ""
|
||||||
|
else
|
||||||
|
@quote = params[:quote]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#unless params[:quote].nil?
|
||||||
|
# @quote = params[:quote][:quote]
|
||||||
|
#end
|
||||||
|
|
||||||
@memo = Memo.new(params[:memo])
|
@memo = Memo.new(params[:memo])
|
||||||
@memo.forum_id = params[:forum_id]
|
@memo.forum_id = params[:forum_id]
|
||||||
@memo.author_id = User.current.id
|
@memo.author_id = User.current.id
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||||
<div id="message_quote" class="wiki"></div>
|
<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)) %>:
|
<%= label_tag(l(:label_reply_plural)) %>:
|
||||||
<!-- <p> < %= f.text_area :content, :required => true, :size => "75%", :resize => "none", id: 'editor01' %> </p> -->
|
<!-- <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>
|
<%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %></p>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//ckeditor.setData("<%= raw escape_javascript(@content) %>");
|
//ckeditor.setData("<%= raw escape_javascript(@content) %>");
|
||||||
$('#message_quote').html("<%= raw escape_javascript(@temp.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");
|
showAndScrollTo("new_memo", "cke_editor01");
|
Loading…
Reference in New Issue