diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d15d350e6..08d7bc2c1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2808,7 +2808,7 @@ int main(int argc, char** argv){ end if opt[:init_activity] - ss += javascript_include_tag "init_activity_KindEditor" + ss += javascript_include_tag "create_kindeditor" end ss.html_safe diff --git a/app/views/blog_comments/_simple_ke_reply_form.html.erb b/app/views/blog_comments/_simple_ke_reply_form.html.erb index 61669058b..292587cad 100644 --- a/app/views/blog_comments/_simple_ke_reply_form.html.erb +++ b/app/views/blog_comments/_simple_ke_reply_form.html.erb @@ -21,8 +21,8 @@ <% end %> +
- 发送 diff --git a/app/views/blog_comments/quote.js.erb b/app/views/blog_comments/quote.js.erb index cd53707d5..9bd226ce1 100644 --- a/app/views/blog_comments/quote.js.erb +++ b/app/views/blog_comments/quote.js.erb @@ -3,7 +3,7 @@ if($("#reply_message_<%= @blogComment.id%>").length > 0) { $(function(){ $('#reply_subject').val("<%= raw escape_javascript(@subject) %>"); $('#quote_quote').val("<%= raw escape_javascript(@temp.content.html_safe) %>"); - init_activity_KindEditor_data(<%= @blogComment.id%>,null,"85%", "<%=@blogComment.class.to_s%>"); + sd_create_editor_from_data(<%= @blogComment.id%>,null,"100%", "<%=@blogComment.class.to_s%>"); }); }else if($("#reply_to_message_<%= @blogComment.id%>").length >0) { $("#reply_to_message_<%= @blogComment.id%>").replaceWith(""); diff --git a/app/views/blog_comments/reply.js.erb b/app/views/blog_comments/reply.js.erb index 2a4e71f1c..915ab892d 100644 --- a/app/views/blog_comments/reply.js.erb +++ b/app/views/blog_comments/reply.js.erb @@ -5,4 +5,4 @@ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/article', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); //init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity'); <% end %> -init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity'); \ No newline at end of file +sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity'); \ No newline at end of file diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb index 4a407089f..c80274db4 100644 --- a/app/views/blog_comments/show.html.erb +++ b/app/views/blog_comments/show.html.erb @@ -1,6 +1,7 @@ <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false) %> - <%= javascript_include_tag "init_activity_KindEditor",'blog' %> + <%#= javascript_include_tag "init_activity_KindEditor",'blog' %> + <%= javascript_include_tag "create_kindeditor",'blog' %> <% end %> diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index 4ca86e7ae..05f69055f 100644 --- a/app/views/blogs/_article.html.erb +++ b/app/views/blogs/_article.html.erb @@ -198,8 +198,8 @@ + - 发送 diff --git a/app/views/blogs/_article_list.html.erb b/app/views/blogs/_article_list.html.erb index ca85c0ba2..f3fd1aa61 100644 --- a/app/views/blogs/_article_list.html.erb +++ b/app/views/blogs/_article_list.html.erb @@ -1,19 +1,19 @@ <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false) %> - <%= javascript_include_tag "init_activity_KindEditor" %> + <%= javascript_include_tag "create_kindeditor" %> <% end %> <% if topic %> diff --git a/app/views/boards/_course_show_detail.html.erb b/app/views/boards/_course_show_detail.html.erb index 1898fce02..bc7b9667e 100644 --- a/app/views/boards/_course_show_detail.html.erb +++ b/app/views/boards/_course_show_detail.html.erb @@ -1,19 +1,19 @@ <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false) %> - <%= javascript_include_tag "init_activity_KindEditor" %> + <%= javascript_include_tag "create_kindeditor" %> <% end %> <% if topics%> <% topics.each do |topic| %> @@ -40,7 +40,7 @@ } $(function () { - init_activity_KindEditor_data(<%= topic.id%>, null, "87%", "<%=topic.class.to_s%>"); + sd_create_editor_from_data(<%= topic.id%>, null, "100%", "<%=topic.class.to_s%>"); }); <% if topic %> diff --git a/app/views/boards/_project_show_detail.html.erb b/app/views/boards/_project_show_detail.html.erb index 367f0552c..1d5cc3b75 100644 --- a/app/views/boards/_project_show_detail.html.erb +++ b/app/views/boards/_project_show_detail.html.erb @@ -1,18 +1,18 @@ <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false) %> - <%= javascript_include_tag "init_activity_KindEditor" %> + <%= javascript_include_tag "create_kindeditor" %> <% end %> <% if topics%> <% topics.each do |topic| %> @@ -39,7 +39,7 @@ } $(function () { - init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); + sd_create_editor_from_data(<%= topic.id%>, null, "100%"); }); <% if topic %> diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb index f94eda065..0814b5f50 100644 --- a/app/views/comments/create.js.erb +++ b/app/views/comments/create.js.erb @@ -5,4 +5,4 @@ <% else %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); <% end %> -init_activity_KindEditor_data('<%= @user_activity_id%>',"","87%", "UserActivity"); +sd_create_editor_from_data('<%= @user_activity_id%>',"","100%", "UserActivity"); diff --git a/app/views/courses/_course_activity.html.erb b/app/views/courses/_course_activity.html.erb index 1b0d5330d..d65c0b3ab 100644 --- a/app/views/courses/_course_activity.html.erb +++ b/app/views/courses/_course_activity.html.erb @@ -38,54 +38,6 @@ }) <% course_activities.each do |activity| if course_activities %> <% if activity && activity.course_act%> diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 0c4f4c1e0..c7e4a7428 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -32,9 +32,9 @@ \ No newline at end of file diff --git a/app/views/homework_common/set_evaluation_attr.js.erb b/app/views/homework_common/set_evaluation_attr.js.erb index 73436750c..987abd351 100644 --- a/app/views/homework_common/set_evaluation_attr.js.erb +++ b/app/views/homework_common/set_evaluation_attr.js.erb @@ -1,8 +1,8 @@ clickCanel(); <% if @user_activity_id != -1 %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@courae_activity}) %>"); -init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity"); +sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity"); <% else %> $("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework,:is_in_course => @is_in_course}) %>"); -init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@homework.class.to_s%>"); +sd_create_editor_from_data(<%= @homework.id%>,"","100%", "<%=@homework.class.to_s%>"); <% end %> \ No newline at end of file diff --git a/app/views/homework_common/start_anonymous_comment.js.erb b/app/views/homework_common/start_anonymous_comment.js.erb index 8b2e9ed04..91a68011e 100644 --- a/app/views/homework_common/start_anonymous_comment.js.erb +++ b/app/views/homework_common/start_anonymous_comment.js.erb @@ -3,11 +3,11 @@ <% if @user_activity_id == -1 %> $("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>"); $("#evaluation_start_time_<%=@homework.id %>").html("匿评开启时间:<%=format_time(Time.now) %>"); - init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@homework.class.to_s%>"); + sd_create_editor_from_data(<%= @homework.id%>,"","100%", "<%=@homework.class.to_s%>"); <% else %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>"); $("#evaluation_start_time_<%=@user_activity_id %>").html("匿评开启时间:<%=format_time(Time.now) %>"); - init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity"); + sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity"); <% end %> /*$("#<%#= @homework.id %>_start_anonymous_comment").replaceWith('<%#= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_homework_common_path(@homework), remote: true, id:"#{@homework.id}_stop_anonymous_comment",:class => "postOptionLink")%>');*/ <% elsif @statue == 2 %> diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb index 2f8d8c6d6..874374476 100644 --- a/app/views/homework_common/stop_anonymous_comment.js.erb +++ b/app/views/homework_common/stop_anonymous_comment.js.erb @@ -2,11 +2,11 @@ alert('关闭成功'); <% if @user_activity_id == -1 %> $("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>"); $("#evaluation_end_time_<%=@homework.id %>").html("匿评关闭时间:<%=format_time(Time.now) %>"); -init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@homework.class.to_s%>"); +sd_create_editor_from_data(<%= @homework.id%>,"","100%", "<%=@homework.class.to_s%>"); <% else %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>"); $("#evaluation_end_time_<%=@user_activity_id %>").html("匿评关闭时间:<%=format_time(Time.now) %>"); -init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity'); +sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity'); <% end %> /* $("#<%#= @homework.id %>_stop_anonymous_comment").replaceWith('');*/ diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 2a1ae56d4..3ee20ee2a 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -18,7 +18,7 @@ } $(function () { - init_activity_KindEditor_data(<%= issue.id%>, null, "87%", "<%= issue.class.name %>"); + sd_create_editor_from_data(<%= issue.id%>, null, "100%", "<%= issue.class.name %>"); }); <%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %> diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb index 48a9b012e..21519d5a1 100644 --- a/app/views/issues/add_journal.js.erb +++ b/app/views/issues/add_journal.js.erb @@ -21,6 +21,7 @@ sd_create_editor_from_data(<%= @issue.id %>, null, "100%","<%=@issue.class.name%>"); <%else%> $("#div_user_issue_reply_<%=@user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @issue, :user_activity_id => @user_activity_id}) %>"); - init_activity_KindEditor_data(<%= @user_activity_id %>,"","87%", 'UserActivity'); + sd_create_editor_from_data(<%= @user_activity_id %>, null, "100%", "UserActivity"); +//init_activity_KindEditor_data(<%= @user_activity_id %>,"","87%", 'UserActivity'); // sd_create_editor_from_data(<%#= @issue.id%>, null, "100%"); <%end %> diff --git a/app/views/issues/add_journal_in_org.js.erb b/app/views/issues/add_journal_in_org.js.erb index 34e874f13..ed4666d0c 100644 --- a/app/views/issues/add_journal_in_org.js.erb +++ b/app/views/issues/add_journal_in_org.js.erb @@ -1,3 +1,3 @@ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>"); -init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity"); \ No newline at end of file +sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity"); \ No newline at end of file diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 4217ca44e..ad5d971ed 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -3,15 +3,15 @@ <% end %> \ No newline at end of file diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 022b8c76b..33de21c0f 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -27,7 +27,7 @@ } } $(function() { - init_activity_KindEditor_data(<%= @topic.id%>,null,"85%", "<%=@topic.class.to_s%>"); + sd_create_editor_from_data(<%= @topic.id%>,null,"100%", "<%=@topic.class.to_s%>"); showNormalImage('message_description_<%= @topic.id %>'); }); @@ -171,8 +171,13 @@ + diff --git a/app/views/messages/_org_subfield_show.html.erb b/app/views/messages/_org_subfield_show.html.erb index fab0f752e..4d5af61dd 100644 --- a/app/views/messages/_org_subfield_show.html.erb +++ b/app/views/messages/_org_subfield_show.html.erb @@ -58,7 +58,8 @@ } $(function() { - init_activity_KindEditor_data(<%= @topic.id%>,null,"94%", "<%=@topic.class.to_s%>"); + //init_activity_KindEditor_data(<%= @topic.id%>,null,"94%", "<%=@topic.class.to_s%>"); + sd_create_editor_from_data(<%= @topic.id%>,null,"100%", "<%=@topic.class.to_s%>"); showNormalImage('message_description_<%= @topic.id %>'); }); @@ -201,8 +202,13 @@ diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index a0e9db171..3a306ba74 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -88,7 +88,7 @@ } } $(function() { - init_activity_KindEditor_data(<%= @topic.id%>,null,"85%", "<%=@topic.class.to_s%>"); + sd_create_editor_from_data(<%= @topic.id%>,null,"100%", "<%=@topic.class.to_s%>"); showNormalImage('message_description_<%= @topic.id %>'); }); @@ -227,8 +227,13 @@ diff --git a/app/views/messages/_reply_message.html.erb b/app/views/messages/_reply_message.html.erb index a859a088a..15cb465de 100644 --- a/app/views/messages/_reply_message.html.erb +++ b/app/views/messages/_reply_message.html.erb @@ -18,8 +18,8 @@ <%= 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 b0e8ecb85..89f953bb9 100644 --- a/app/views/messages/quote.js.erb +++ b/app/views/messages/quote.js.erb @@ -11,7 +11,7 @@ if($("#reply_message_<%= @message.id%>").length > 0) { $(function(){ $('#reply_subject').val("<%= raw escape_javascript(@subject) %>"); $('#quote_quote').val("<%= raw escape_javascript(@temp.content.html_safe) %>"); - init_activity_KindEditor_data(<%= @message.id%>,null,"85%", "<%=@message.class.to_s%>"); + sd_create_editor_from_data(<%= @message.id%>,null,"100%", "<%=@message.class.to_s%>"); }); }else if($("#reply_to_message_<%= @message.id%>").length >0) { $("#reply_to_message_<%= @message.id%>").replaceWith(""); diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb index f61de74f0..385a49a82 100644 --- a/app/views/messages/reply.js.erb +++ b/app/views/messages/reply.js.erb @@ -5,4 +5,4 @@ <% elsif @org_subfield %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <%end%> -init_activity_KindEditor_data(<%= @user_activity_id %>,"","87%", "UserActivity"); \ No newline at end of file +sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity"); \ No newline at end of file diff --git a/app/views/news/_course_news_detail.html.erb b/app/views/news/_course_news_detail.html.erb index 954f7dbf1..61db84134 100644 --- a/app/views/news/_course_news_detail.html.erb +++ b/app/views/news/_course_news_detail.html.erb @@ -1,19 +1,19 @@ <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false) %> - <%= javascript_include_tag "init_activity_KindEditor" %> + <%= javascript_include_tag "create_kindeditor" %> <% end %> <% if newss%> <% newss.each do |news| %> @@ -40,7 +40,7 @@ } $(function () { - init_activity_KindEditor_data(<%= news.id%>, null, "87%"); + sd_create_editor_from_data(<%= news.id%>, null, "100%"); showNormalImage('activity_description_<%= news.id %>'); }); diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index 05a430d57..3236aa6a0 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -184,8 +184,13 @@ diff --git a/app/views/news/_organization_show.html.erb b/app/views/news/_organization_show.html.erb index 3189b03bf..0a7770ac0 100644 --- a/app/views/news/_organization_show.html.erb +++ b/app/views/news/_organization_show.html.erb @@ -1,181 +1,186 @@ -<%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> -<% end %> - - - - -- - <%= l(:label_cancel_with_space) %> - - - <%= l(:label_comment_with_space) %> - -
- <% end %> - -+ + <%= l(:label_cancel_with_space) %> + + + <%= l(:label_comment_with_space) %> + +
+ <% end %> + +