Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq

This commit is contained in:
ouyangxuhua 2015-09-23 14:55:13 +08:00
commit 1fe8c60a32
9 changed files with 127 additions and 141 deletions

View File

@ -36,8 +36,7 @@ class JournalsController < ApplicationController
sort_update(@query.sortable_columns) sort_update(@query.sortable_columns)
if @query.valid? if @query.valid?
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC", @journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC", :limit => 25)
:limit => 25)
end end
@title = (@project ? @project.name : Setting.app_title) + ": " + (@query.new_record? ? l(:label_changes_details) : @query.name) @title = (@project ? @project.name : Setting.app_title) + ": " + (@query.new_record? ? l(:label_changes_details) : @query.name)
render :layout => false, :content_type => 'application/atom+xml' render :layout => false, :content_type => 'application/atom+xml'
@ -72,9 +71,9 @@ class JournalsController < ApplicationController
end end
# Replaces pre blocks with [...] # Replaces pre blocks with [...]
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\n" @content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n"
# @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content << "</blockquote>"
@id = user.id @id = user.id
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
render_404 render_404

View File

@ -6,12 +6,11 @@
<li> <li>
<label class="label"><span class="c_red f12">*</span><%= l(:field_status) %></label> <label class="label"><span class="c_red f12">*</span><%= l(:field_status) %></label>
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> <% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
<%= f.select :status_id, <%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }),
(@allowed_statuses.collect { |p| [p.name, p.id] }), {:no_label => true},
{:no_label => true}, # ajax 刷新
# ajax 刷新 #:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :class => "w150" %>
:class => "w150" %>
<% else %> <% else %>
<%= h(@issue.status.name) %> <%= h(@issue.status.name) %>
<% end %> <% end %>
@ -20,10 +19,9 @@
<li> <li>
<label class="label"><span class="c_red f12">*</span><%= l(:field_priority) %></label> <label class="label"><span class="c_red f12">*</span><%= l(:field_priority) %></label>
<% if @issue.safe_attribute? 'priority_id' %> <% if @issue.safe_attribute? 'priority_id' %>
<%= f.select :priority_id, <%= f.select :priority_id, (@priorities.collect { |p| [p.name, p.id] }),
(@priorities.collect { |p| [p.name, p.id] }), {:required => true, :no_label => true}, :disabled => !@issue.leaf?,
{:required => true, :no_label => true}, :disabled => !@issue.leaf?, :class => "w150" %>
:class => "w150" %>
<% end %> <% end %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
@ -32,8 +30,8 @@
<label class="label"><%= l(:field_assigned_to) %></label> <label class="label"><%= l(:field_assigned_to) %></label>
<% if @issue.safe_attribute? 'assigned_to_id' %> <% if @issue.safe_attribute? 'assigned_to_id' %>
<%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), <%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to),
{:required => @issue.required_attribute?('assigned_to_id'), :no_label => true}, {:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
:class => "w150" %> :class => "w150" %>
<% end %> <% end %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
@ -41,8 +39,8 @@
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %> <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
<label class="label"><%= l(:field_fixed_version) %></label> <label class="label"><%= l(:field_fixed_version) %></label>
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), <%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true}, {:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
:class => "w150" %> :class => "w150" %>
<%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'), <%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
new_project_version_path(@issue.project), new_project_version_path(@issue.project),
:remote => true, :remote => true,
@ -60,11 +58,7 @@
<li> <li>
<label class="label02"><%= l(:field_start_date) %></label> <label class="label02"><%= l(:field_start_date) %></label>
<% if @issue.safe_attribute? 'start_date' %> <% if @issue.safe_attribute? 'start_date' %>
<%= f.text_field :start_date, <%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('start_date') %>
:size => 22,
:disabled => !@issue.leaf?,
:no_label => true,
:required => @issue.required_attribute?('start_date') %>
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %> <%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
<% end %> <% end %>
</li> </li>
@ -72,10 +66,7 @@
<li> <li>
<label class="label02"><%= l(:field_due_date) %></label> <label class="label02"><%= l(:field_due_date) %></label>
<% if @issue.safe_attribute? 'due_date' %> <% if @issue.safe_attribute? 'due_date' %>
<%= f.text_field :due_date, :size => 22, <%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('due_date') %>
:disabled => !@issue.leaf?,
:no_label => true,
:required => @issue.required_attribute?('due_date') %>
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %> <%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
<% end %> <% end %>
</li> </li>
@ -83,10 +74,7 @@
<li> <li>
<label class="label02"><%= l(:field_estimated_hours) %></label> <label class="label02"><%= l(:field_estimated_hours) %></label>
<% if @issue.safe_attribute? 'estimated_hours' %> <% if @issue.safe_attribute? 'estimated_hours' %>
<%= f.text_field :estimated_hours, :size => 22, <%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('estimated_hours') %>
:disabled => !@issue.leaf?,
:no_label => true,
:required => @issue.required_attribute?('estimated_hours') %>
<span class="mt3 ml5"><%= l(:field_hours) %></span> <span class="mt3 ml5"><%= l(:field_hours) %></span>
<% end %> <% end %>
</li> </li>
@ -94,9 +82,9 @@
<li><label class="label02">&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</label> <li><label class="label02">&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</label>
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %> <% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }), <%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
{:required => @issue.required_attribute?('done_ratio'), :no_label => true}, {:required => @issue.required_attribute?('done_ratio'), :no_label => true},
:onchange => "PrecentChange(this.value)", :onchange => "PrecentChange(this.value)",
:class => "w150" %> :class => "w150" %>
<% end %> <% end %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>

View File

@ -0,0 +1,52 @@
<!--属性-->
<div class="pro_info_box mb10">
<%= issue_fields_rows do |rows| %>
<ul class="fl" >
<li><p class="label03" >&nbsp;状态&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p"><%= @issue.status.name %></p>
</li>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('assigned_to_id') %>
<li><p class="label03" >&nbsp;指派给&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p"><%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<ul class="fl" >
<li><p class="label03" >&nbsp;优先级&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:50px;"><%= @issue.priority.name %></span>
</li>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('done_ratio') %>
<li><p class="label03" >&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:50px;"><%= @issue.done_ratio %>%</span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<ul class="fl " >
<% unless @issue.disabled_core_fields.include?('start_date') %>
<li><p class="label03" style="width:50px;" >&nbsp;开始&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p"><%= format_date(@issue.start_date) %></p>
</li>
<% end %>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
<li><p class="label03" style="width:50px;">&nbsp;周期&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<ul class="fl " >
<% unless @issue.disabled_core_fields.include?('due_date') %>
<li><p class="label03" >&nbsp;计划完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:120px;"><%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %></span>
</li>
<% end %>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
<li><p class="label03" >&nbsp;目标版本&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<% end %><!--pro_info_box end-->
<%#= render_custom_fields_rows(@issue) %>
<%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
</div>
<!--pro_info_box 属性 end-->

View File

@ -14,7 +14,9 @@
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %> <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
</div> </div>
<% end %> <% end %>
<div id="journal_issue_note" class="wiki"></div> <div id="journal_issue_note" class="wiki">
</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.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>

View File

@ -28,11 +28,7 @@
<li> <li>
<% if @issue.safe_attribute? 'subject' %> <% if @issue.safe_attribute? 'subject' %>
<label class="label"><span class="c_red f12">*</span>&nbsp;主题&nbsp;&nbsp;:&nbsp;</label> <label class="label"><span class="c_red f12">*</span>&nbsp;主题&nbsp;&nbsp;:&nbsp;</label>
<%= f.text_field :subject, <%= f.text_field :subject, :class => "w576", :maxlength => 255, :style => "font-size:small", :no_label => true %>
:class => "w576",
:maxlength => 255,
:style => "font-size:small",
:no_label => true %>
<!--Added by young--> <!--Added by young-->
<%= javascript_tag do %> <%= javascript_tag do %>
observeAutocompleteField('issue_subject', observeAutocompleteField('issue_subject',
@ -53,13 +49,7 @@
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %> <%= 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? %> <%#= 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 %> <%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
<%= f.kindeditor :description,:editor_id => "issue_desc_editor", <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'87%', :resizeType => 0, :no_label => true %>
# :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
# :accesskey => accesskey(:edit),
# :class => "w583",
:width=>'87%',
:resizeType => 0,
:no_label => true %>
<%# end %> <%# end %>
<%#= wikitoolbar_for 'issue_description' %> <%#= wikitoolbar_for 'issue_description' %>
<% end %> <% end %>
@ -68,13 +58,13 @@
</ul> </ul>
</div> </div>
<li> <li>
<% if @copy_from && @copy_from.attachments.any? %> <%# if @copy_from && @copy_from.attachments.any? %>
<p> <!--<p>-->
<!-- 去除附件复制功能 --> <!-- 去除附件复制功能 -->
<!-- <label for="copy_attachments"><#%= l(:label_copy_attachments) %></label> <!-- <label for="copy_attachments"><#%= l(:label_copy_attachments) %></label>
<#%= check_box_tag 'copy_attachments', '1', @copy_attachments %> --> <#%= check_box_tag 'copy_attachments', '1', @copy_attachments %> -->
</p> <!--</p>-->
<% end %> <%# end %>
<% if @copy_from && !@copy_from.leaf? %> <% if @copy_from && !@copy_from.leaf? %>
<p> <p>
<label for="copy_subtasks"><%= l(:label_copy_subtasks) %></label> <label for="copy_subtasks"><%= l(:label_copy_subtasks) %></label>

View File

@ -1,13 +1,13 @@
<div class="splitcontent"> <div class="splitcontent">
<div class="splitcontentleft"> <div class="splitcontentleft">
<% i = 0 %> <% i = 0 %>
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %> <% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
<% @issue.editable_custom_field_values.each do |value| %> <% @issue.editable_custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p> <p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
<% if i == split_on -%> <% if i == split_on -%>
</div><div class="splitcontentright"> </div><div class="splitcontentright">
<% end -%> <% end -%>
<% i += 1 -%> <% i += 1 -%>
<% end -%> <% end -%>
</div> </div>
</div> </div>

View File

@ -12,6 +12,7 @@
<div class="ping_dispic"> <div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %> <%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
</div> </div>
<div class="talk_txt fl"> <div class="talk_txt fl">
<p class="pro_page_tit" style="word-break:break-all;"> <p class="pro_page_tit" style="word-break:break-all;">
<span class='<%= "#{get_issue_type(@issue.tracker_id)[0]} fl" %>' title="<%= get_issue_type(@issue.tracker_id)[1] %>"></span> <span class='<%= "#{get_issue_type(@issue.tracker_id)[0]} fl" %>' title="<%= get_issue_type(@issue.tracker_id)[1] %>"></span>
@ -20,104 +21,53 @@
</p><br/> </p><br/>
<div class="cl"></div> <div class="cl"></div>
<p>由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a> 由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
<%# if @issue.created_on != @issue.updated_on %>
添加于 <%= format_time(@issue.created_on).html_safe %>
<%# else %>
<%#= format_time(@issue.updated_on).html_safe %>
<%# end %>
</div> </div>
<!--talk_txt end--> <!--talk_txt end-->
<a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a> <a href="javascript:void(0)" class="talk_edit fr"<%= render :partial => 'action_menu' %></a>
<div class="cl"></div> <div class="cl"></div>
<div class="talk_info mb10" style="word-break:break-all;"> <% if @issue.description? || @issue.attachments.any? -%>
<% if @issue.description? || @issue.attachments.any? -%> <div class="talk_info mb10" style="word-break:break-all;">
<% if @issue.description? %> <% if @issue.description? %>
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> <%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %> <%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
<% end %> <% end %>
</div> </div>
<div class="pro_pic_box mb10"> <% end -%>
<a href="javascript:void(0)" class="link_img fl">
<!--显示附件、图片--> <div class="pro_pic_box mb10">
<%= link_to_attachment_project @issue, :thumbnails => true %></a><br/> <a href="javascript:void(0)" class="link_img fl">
<% end -%> <!--显示附件、图片-->
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> <%= link_to_attachment_project @issue, :thumbnails => true %></a><br/>
</div><!--pro_pic_box end--> <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
<div class="cl"></div> </div><!--pro_pic_box end-->
<!--属性--> <div class="cl"></div>
<div class="pro_info_box mb10">
<%= issue_fields_rows do |rows| %> <!--属性-->
<ul class="fl" > <%= render :partial => 'attributes_show' %>
<li><p class="label03" >&nbsp;状态&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p"><%= @issue.status.name %></p> <!--pro_info_box 属性 end-->
</li>
<div class="cl"></div> <%# 该应用是对issue主题内容的引用对应:to => 'journals#new %>
<% unless @issue.disabled_core_fields.include?('assigned_to_id') %> <!--<div class="cl"></div>-->
<li><p class="label03" >&nbsp;指派给&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p"><%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %></span> <!--<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>-->
</li> <div class="cl"></div>
<% end %> </div>
<div class="cl"></div>
</ul>
<ul class="fl" >
<li><p class="label03" >&nbsp;优先级&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:50px;"><%= @issue.priority.name %></span>
</li>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('done_ratio') %>
<li><p class="label03" >&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:50px;"><%= @issue.done_ratio %>%</span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<ul class="fl " >
<% unless @issue.disabled_core_fields.include?('start_date') %>
<li><p class="label03" style="width:50px;" >&nbsp;开始&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p"><%= format_date(@issue.start_date) %></p>
</li>
<% end %>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
<li><p class="label03" style="width:50px;">&nbsp;周期&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<ul class="fl " >
<% unless @issue.disabled_core_fields.include?('due_date') %>
<li><p class="label03" >&nbsp;计划完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:120px;"><%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %></span>
</li>
<% end %>
<div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
<li><p class="label03" >&nbsp;目标版本&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
</li>
<% end %>
<div class="cl"></div>
</ul>
<% end %><!--pro_info_box end-->
<%#= render_custom_fields_rows(@issue) %>
<%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
</div>
<!--pro_info_box 属性 end-->
<div class="cl"></div>
<%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %></a>
<div class="cl"></div>
</div>
<!--problem_main end--> <!--problem_main end-->
<div style="clear: both;"></div> <div style="clear: both;"></div>
<!--留言--> <!--留言-->
<% if @issue.editable? %> <% if @issue.editable? %>
<div id="update"> <div id="update">
<%= render :partial => 'edit' %> <%= render :partial => 'edit' %>
</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-form').submit();">
<%= l(:button_submit) %> <%= l(:button_submit) %>
</a> </a>
<% end %> <% end %>
<%#= submit_tag l(:button_submit) %> <%#= submit_tag l(:button_submit) %>
<%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%> <%#= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' ,'preview',{:class => "blue_btn fr mr10"}%>
</div> </div>
@ -128,6 +78,7 @@
<%= render :partial => 'changesets', :locals => {:changesets => @changesets} %> <%= render :partial => 'changesets', :locals => {:changesets => @changesets} %>
</div> </div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<% other_formats_links do |f| %> <% other_formats_links do |f| %>
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>

View File

@ -5,6 +5,7 @@ $('#issue_notes').val("<%= raw escape_javascript(@content) %>");
%> %>
$('#issue_private_notes').attr('checked', true); $('#issue_private_notes').attr('checked', true);
<% end %> <% end %>
//quote_issue_journal()
showAndScrollTo("update", "notes"); showAndScrollTo("update", "notes");
$('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight; $('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight;

View File

@ -369,6 +369,9 @@ $(document).ready(function () {
$('html, body').animate({scrollTop: $('#' + id).offset().top}, 400); $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400);
} }
function quote_issue_journal(){
document.getElementById("#issue_notes").focus();
}
/*缺陷完成度决定缺陷状态*/ /*缺陷完成度决定缺陷状态*/
function PrecentChange(obj) { function PrecentChange(obj) {