<% reply = Message.new(:subject => "RE: #{topic.subject}")%>
<% if !topic.locked? && authorize_for('messages', 'reply') %>
-
+
diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb
index 4151c91f3..5ae3459a5 100644
--- a/app/views/boards/show.html.erb
+++ b/app/views/boards/show.html.erb
@@ -28,7 +28,7 @@
window.attachEvent("onload", buildsubmenus)
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false) %>
+ <%= import_ke(enable_at: true, prettify: false) %>
<% end %>
@@ -102,6 +102,10 @@ function nh_init_board(params){
if(/trident/.test(userAgent)){
$("div.talk_new .ke-container").css({'margin-left':'0px'});
}
+
+ if(typeof enableAt === 'function'){
+ enableAt(this,params.about_talk.attr('data-at-id'), params.about_talk.attr('data-at-type'));
+ }
// var toolbar = $("div[class='ke-toolbar']",params.about_talk);
// $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
// params.toolbar_container.append(toolbar);
diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb
index b0354b53f..8f0c5f38d 100644
--- a/app/views/comments/create.js.erb
+++ b/app/views/comments/create.js.erb
@@ -3,4 +3,4 @@ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(r
<% else %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
<% end %>
-init_activity_KindEditor_data('<%= @user_activity_id%>',"","87%");
+init_activity_KindEditor_data('<%= @user_activity_id%>',"","87%", "UserActivity");
diff --git a/app/views/courses/_course_activity.html.erb b/app/views/courses/_course_activity.html.erb
index b4c560fa4..d31b28bc0 100644
--- a/app/views/courses/_course_activity.html.erb
+++ b/app/views/courses/_course_activity.html.erb
@@ -1,5 +1,5 @@
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
+ <%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<% end %>
-<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
+<%= content_for(:header_tags) do %>
+ <%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
+<% end %>
diff --git a/app/views/courses/syllabus.html.erb b/app/views/courses/syllabus.html.erb
index f4b8ce8a4..9d20b5adb 100644
--- a/app/views/courses/syllabus.html.erb
+++ b/app/views/courses/syllabus.html.erb
@@ -1,6 +1,6 @@
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
+ <%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<%= javascript_include_tag 'blog' %>
<% end %>
@@ -40,7 +40,7 @@
}
}
$(function() {
- init_activity_KindEditor_data(<%= @article.id%>,null,"87%");
+ init_activity_KindEditor_data(<%= @article.id%>,null,"87%", "<%=@article.class.to_s%>");
showNormalImage('message_description_<%= @article.id %>');
});
diff --git a/app/views/homework_common/start_anonymous_comment.js.erb b/app/views/homework_common/start_anonymous_comment.js.erb
index ea63ea12c..ffeda2cb5 100644
--- a/app/views/homework_common/start_anonymous_comment.js.erb
+++ b/app/views/homework_common/start_anonymous_comment.js.erb
@@ -2,10 +2,10 @@
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})%>");
- init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+ init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@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}) %>");
- init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+ init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "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 214a157dc..308e8a39f 100644
--- a/app/views/homework_common/stop_anonymous_comment.js.erb
+++ b/app/views/homework_common/stop_anonymous_comment.js.erb
@@ -1,10 +1,10 @@
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})%>");
-init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@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}) %>");
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity');
<% end %>
/*
$("#<%#= @homework.id %>_stop_anonymous_comment").replaceWith('');*/
diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb
index 2879c9592..a1bde3981 100644
--- a/app/views/issues/_edit.html.erb
+++ b/app/views/issues/_edit.html.erb
@@ -1,9 +1,8 @@
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
+ <%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
<% end %>
-
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true,:remote=>true} do |f| %>
<%= error_messages_for 'issue', 'time_entry' %>
<%= render :partial => 'conflict' if @conflict %>
@@ -21,9 +20,23 @@
+
+
+
+
+
+ <%= call_hook(:view_issues_edit_notes_bottom, {:issue => @issue, :notes => @notes, :form => f}) %>
+
+
+
+
+
<%= f.hidden_field :lock_version %>
<%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id] %>
<% end %>
-
\ No newline at end of file
+
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index 7cda806a1..62d3ff8a5 100644
--- a/app/views/issues/_form.html.erb
+++ b/app/views/issues/_form.html.erb
@@ -49,7 +49,7 @@
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %>
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
- <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'85%', :resizeType => 0, :no_label => true %>
+ <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'87%', :resizeType => 0, :no_label => true,at_id: @project.id, at_type: @project.class.to_s %>
<%# end %>
<%#= wikitoolbar_for 'issue_description' %>
<% end %>
@@ -103,4 +103,4 @@
<%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
<% end %>
确定
-
取消
\ No newline at end of file
+
取消
diff --git a/app/views/issues/_issue_replies.html.erb b/app/views/issues/_issue_replies.html.erb
index 5e6e624b6..6ee676f8c 100644
--- a/app/views/issues/_issue_replies.html.erb
+++ b/app/views/issues/_issue_replies.html.erb
@@ -17,7 +17,7 @@
<% else %>
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_time(reply.created_on) %>
+ <%#= format_time(reply.created_on) %>
<% if reply.details.any? %>
diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb
index d2052a887..85b15c8d1 100644
--- a/app/views/issues/add_journal.js.erb
+++ b/app/views/issues/add_journal.js.erb
@@ -4,6 +4,6 @@
sd_create_editor_from_data(<%= @issue.id%>, null, "100%");
<%else%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id}) %>");
- init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+ init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity');
// sd_create_editor_from_data(<%#= @issue.id%>, null, "100%");
-<%end %>
\ No newline at end of file
+<%end %>
diff --git a/app/views/issues/add_journal_in_org.js.erb b/app/views/issues/add_journal_in_org.js.erb
index ad7a85540..34e874f13 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%");
\ No newline at end of file
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
\ No newline at end of file
diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb
index 0e068929d..b1d6c7668 100644
--- a/app/views/issues/new.html.erb
+++ b/app/views/issues/new.html.erb
@@ -1,5 +1,5 @@
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
+ <%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
<% end %>
diff --git a/app/views/messages/quote.js.erb b/app/views/messages/quote.js.erb
index eee820c61..b0e8ecb85 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%");
+ init_activity_KindEditor_data(<%= @message.id%>,null,"85%", "<%=@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 ac80de3b4..518479344 100644
--- a/app/views/messages/reply.js.erb
+++ b/app/views/messages/reply.js.erb
@@ -3,4 +3,4 @@
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
<%end%>
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
\ No newline at end of file
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
\ No newline at end of file
diff --git a/app/views/org_document_comments/_reply_form.html.erb b/app/views/org_document_comments/_reply_form.html.erb
index 7871b910d..8808ff8b7 100644
--- a/app/views/org_document_comments/_reply_form.html.erb
+++ b/app/views/org_document_comments/_reply_form.html.erb
@@ -1,2 +1,2 @@
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
diff --git a/app/views/org_document_comments/add_reply.js.erb b/app/views/org_document_comments/add_reply.js.erb
index 1906cae95..968d7295d 100644
--- a/app/views/org_document_comments/add_reply.js.erb
+++ b/app/views/org_document_comments/add_reply.js.erb
@@ -1,3 +1,2 @@
-
$("#organization_document_<%= @act.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => params[:flag], :act => @act}) %>");
-init_activity_KindEditor_data(<%= @act.id %>,"","87%");
\ No newline at end of file
+init_activity_KindEditor_data(<%= @act.id %>,"","87%", "<%=@act.class.to_s%>");
diff --git a/app/views/org_document_comments/index.html.erb b/app/views/org_document_comments/index.html.erb
index 9c46aded7..7734a2853 100644
--- a/app/views/org_document_comments/index.html.erb
+++ b/app/views/org_document_comments/index.html.erb
@@ -19,7 +19,7 @@
<% @documents.each do |document| %>
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document, :act => OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id=?", document.id).first, :flag => 0} %>
diff --git a/app/views/org_document_comments/quote.js.erb b/app/views/org_document_comments/quote.js.erb
index a71b23f0e..7ea5daf7b 100644
--- a/app/views/org_document_comments/quote.js.erb
+++ b/app/views/org_document_comments/quote.js.erb
@@ -3,7 +3,7 @@ if($("#reply_message_<%= @org_comment.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(<%= @org_comment.id%>,null,"85%");
+ init_activity_KindEditor_data(<%= @org_comment.id%>,null,"85%", "<%=@org_comment.class.to_s%>");
});
}else if($("#reply_to_message_<%= @org_comment.id %>").length >0) {
$("#reply_to_message_<%= @org_comment.id%>").replaceWith("");
diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb
index 7a64e4514..0848bc4e5 100644
--- a/app/views/org_document_comments/show.html.erb
+++ b/app/views/org_document_comments/show.html.erb
@@ -1,7 +1,7 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor",'blog' %>
diff --git a/app/views/organizations/_org_activities.html.erb b/app/views/organizations/_org_activities.html.erb
index 969c504da..8bd1f5bbf 100644
--- a/app/views/organizations/_org_activities.html.erb
+++ b/app/views/organizations/_org_activities.html.erb
@@ -2,7 +2,7 @@
<% org_activities.each do |act| %>
<% if act.container_type == 'Organization' %>
diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb
index c50ff50ab..37f4d00ed 100644
--- a/app/views/organizations/show.html.erb
+++ b/app/views/organizations/show.html.erb
@@ -61,7 +61,7 @@
<% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 and params[:org_subfield_id].nil? %>
<% act = OrgActivity.where("org_act_type = 'OrgDocumentComment' and org_act_id =?", @organization.home_id).first %>
diff --git a/app/views/projects/_project_activities.html.erb b/app/views/projects/_project_activities.html.erb
index f97646d3c..bdfa0055a 100644
--- a/app/views/projects/_project_activities.html.erb
+++ b/app/views/projects/_project_activities.html.erb
@@ -1,4 +1,4 @@
-<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg', "init_activity_KindEditor" %>
+<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>