- <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => reply.id,},:method => "post", :remote => true) do |f|%>
+ <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
diff --git a/app/views/messages/quote.js.erb b/app/views/messages/quote.js.erb
index 965c458e9..78ba0c142 100644
--- a/app/views/messages/quote.js.erb
+++ b/app/views/messages/quote.js.erb
@@ -6,7 +6,11 @@ $('#quote_quote').html("<%#= raw escape_javascript(@temp.content.html_safe) %>")
showAndScrollTo("reply", "message_content");
$('#message_content').scrollTop = $('#message_content').scrollHeight - $('#message_content').clientHeight;
$("img").removeAttr("align");*/
-$("#reply_message_<%= @message.id%>").replaceWith("<%= escape_javascript(render :partial => 'reply_message', :locals => {:reply => @message,:temp =>@temp,:subject =>@subject}) %>");
-$(function(){
- init_activity_KindEditor_data(<%= @message.id%>,null,"87%");
-});
\ No newline at end of file
+if($("#reply_message_<%= @message.id%>").length > 0) {
+ $("#reply_message_<%= @message.id%>").replaceWith("<%= escape_javascript(render :partial => 'reply_message', :locals => {:reply => @message,:temp =>@temp,:subject =>@subject}) %>");
+ $(function(){
+ init_activity_KindEditor_data(<%= @message.id%>,null,"85%");
+ });
+}else if($("#reply_to_message_<%= @message.id%>").length >0) {
+ $("#reply_to_message_<%= @message.id%>").replaceWith("
");
+}
\ No newline at end of file
diff --git a/public/javascripts/init_activity_KindEditor.js b/public/javascripts/init_activity_KindEditor.js
index decbbb341..db871e723 100644
--- a/public/javascripts/init_activity_KindEditor.js
+++ b/public/javascripts/init_activity_KindEditor.js
@@ -5,7 +5,7 @@ function init_editor(params){
var paramsWidth = params.width == undefined ? "100%" : params.width;
var editor = params.kindutil.create(params.textarea, {
- resizeType : 1,minWidth:"1px",width:"95%",
+ resizeType : 1,minWidth:"1px",width:"94%",
height:"33px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
items:['emoticons'],
@@ -25,7 +25,7 @@ function init_editor(params){
$('#reply_image_' + id).addClass('imageFuzzy');
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
params.submit_btn.hide();
- this.resize("95%", null);
+ this.resize("94%", null);
}else if(edit.html().val().trim() != ""){
params.submit_btn.show();
}
@@ -157,5 +157,6 @@ function init_activity_KindEditor_data(id){
});
});
- $(".ke-edit").css("height","33px");
+ div_form = $("div[nhname='new_message_" + id + "']");
+ $(".ke-edit", div_form).css("height","33px");
}
\ No newline at end of file
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 54416e7f4..2da36a991 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1074,4 +1074,4 @@ a.postRouteLink {font-weight:bold; color:#484848;}
a.postRouteLink:hover {text-decoration:underline;}
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
-.ReplyToMessageInputContainer {width:282px; float:left;}
\ No newline at end of file
+.ReplyToMessageInputContainer {width:582px; float:left;}
\ No newline at end of file