diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb index 769e62209..a38bd4096 100644 --- a/app/controllers/journals_controller.rb +++ b/app/controllers/journals_controller.rb @@ -73,7 +73,7 @@ class JournalsController < ApplicationController text = text.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]') @content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n" @content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n" - @content = "
" << @content << "
" + @content = "
" << @content << "
\n\n
" @id = user.id rescue ActiveRecord::RecordNotFound render_404 diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 2643c93e7..ae2a848e0 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -3,4 +3,4 @@ <%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'talk_edit fr' if User.current.allowed_to?(:add_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %> <%= link_to l(:button_edit), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("all_attributes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %> -<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %> +<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_journal_kind_reply"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %> diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index c6b805d0a..f6b41f36d 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -1,3 +1,4 @@ +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> <%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %> <%= error_messages_for 'issue', 'time_entry' %> <%= render :partial => 'conflict' if @conflict %> @@ -19,7 +20,7 @@
回复 - <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %> + <%= f.kindeditor :notes, :style => "width:99%;",:height=>'100px', :cssData =>"blockquote { padding:0px}", :rows => "5", :no_label => true, :editor_id=>'issue_journal_kind_reply' %>
diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 68e991594..8befaf37e 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -12,9 +12,9 @@

<% if journal.details.any? %> <% details_to_strings(journal.details).each do |string| %> -

<%= string %>

+

<%= string.html_safe %>

<% end %> - <% end %> + <% end %>

diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 67867e2c6..0eb779a23 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -64,7 +64,7 @@

<%#--引用时不能修改,剥离出引用内容--%> - + <%= l(:button_submit) %> <% end %> diff --git a/app/views/journals/new.js.erb b/app/views/journals/new.js.erb index b24b5ffb6..9c5d87079 100644 --- a/app/views/journals/new.js.erb +++ b/app/views/journals/new.js.erb @@ -1,4 +1,4 @@ -$('#issue_notes').val("<%= raw escape_javascript(@content) %>"); +issue_journal_kind_reply.html("<%= raw escape_javascript(@content) %>"); <% # when quoting a private journal, check the private checkbox if @journal && @journal.private_notes? diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 971794699..22317dc91 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -34,7 +34,7 @@ :id => act.id}, :class => "problem_tit fl fb " %>
-

<%= textAreailizable act,:description %>
+

<%= act.description.html_safe %>
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

@@ -51,7 +51,7 @@ <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"}, :class => "problem_tit fl fb" %>
-

<%= textilizable act,:notes %>
+

<%= act.notes.html_safe %>
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 491b5bb92..10561fe01 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -370,7 +370,9 @@ $(document).ready(function () { } function quote_issue_journal(){ - document.getElementById("#issue_notes").focus(); + alert("test"); + issue_journal_kind_reply.focus(); + issue_journal_kind_reply.cmd.range.setStart(issue_journal_kind_reply.cmd.range.startOffset) } /*缺陷完成度决定缺陷状态*/