parent
993c7d8f41
commit
44c097dbaf
|
@ -73,7 +73,7 @@ class JournalsController < ApplicationController
|
||||||
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
||||||
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n"
|
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n"
|
||||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n"
|
@content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n"
|
||||||
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content << "</blockquote>"
|
@content = "<blockquote style='padding-left:0px;margin-left:0px;'>" << @content << "</blockquote>\n\n<br/>"
|
||||||
@id = user.id
|
@id = user.id
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
render_404
|
render_404
|
||||||
|
|
|
@ -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_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_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(: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) %>
|
||||||
|
|
|
@ -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| %>
|
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||||
<%= error_messages_for 'issue', 'time_entry' %>
|
<%= error_messages_for 'issue', 'time_entry' %>
|
||||||
<%= render :partial => 'conflict' if @conflict %>
|
<%= render :partial => 'conflict' if @conflict %>
|
||||||
|
@ -19,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<input name="issue_quote_new" type="hidden" value="<%= %>" />
|
<input name="issue_quote_new" type="hidden" value="<%= %>" />
|
||||||
<fieldset><legend>回复</legend>
|
<fieldset><legend>回复</legend>
|
||||||
<%= 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' %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<!--<%# if @issue.safe_attribute? 'private_notes' %>-->
|
<!--<%# if @issue.safe_attribute? 'private_notes' %>-->
|
||||||
<!--<label for="issue_private_notes"><%#= f.check_box :private_notes, :no_label => true %> <%#= l(:field_private_notes) %></label>-->
|
<!--<label for="issue_private_notes"><%#= f.check_box :private_notes, :no_label => true %> <%#= l(:field_private_notes) %></label>-->
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
<p>
|
<p>
|
||||||
<% if journal.details.any? %>
|
<% if journal.details.any? %>
|
||||||
<% details_to_strings(journal.details).each do |string| %>
|
<% details_to_strings(journal.details).each do |string| %>
|
||||||
<p><%= string %></p>
|
<p><%= string.html_safe %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<!--编辑、引用、回复按钮-->
|
<!--编辑、引用、回复按钮-->
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</div>
|
</div>
|
||||||
<p style="padding-top: 5px"></p>
|
<p style="padding-top: 5px"></p>
|
||||||
<%#--引用时不能修改,剥离出引用内容--%>
|
<%#--引用时不能修改,剥离出引用内容--%>
|
||||||
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
|
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();issue_journal_kind_reply.sync();$('#issue-form').submit();">
|
||||||
<%= l(:button_submit) %>
|
<%= l(:button_submit) %>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -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
|
# when quoting a private journal, check the private checkbox
|
||||||
if @journal && @journal.private_notes?
|
if @journal && @journal.private_notes?
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
:id => act.id},
|
:id => act.id},
|
||||||
:class => "problem_tit fl fb " %>
|
:class => "problem_tit fl fb " %>
|
||||||
</a><br />
|
</a><br />
|
||||||
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
<p class="mt5 break_word"><%= act.description.html_safe %><br />
|
||||||
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>
|
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
<%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"),
|
<%= 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" %>
|
{:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"}, :class => "problem_tit fl fb" %>
|
||||||
</a><br />
|
</a><br />
|
||||||
<p class="mt5 break_word"><%= textilizable act,:notes %><br />
|
<p class="mt5 break_word"><%= act.notes.html_safe %><br />
|
||||||
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -370,7 +370,9 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function quote_issue_journal(){
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*缺陷完成度决定缺陷状态*/
|
/*缺陷完成度决定缺陷状态*/
|
||||||
|
|
Loading…
Reference in New Issue