Merge branch 'dev_newproject' into develop

This commit is contained in:
daiao 2016-11-11 15:24:01 +08:00
commit fff56c08de
12 changed files with 48 additions and 10 deletions

View File

@ -235,7 +235,9 @@ class IssuesController < ApplicationController
# 给该issue在它所在的项目中所有的issues中所在的位置给一个序号
@issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1
@issue.fixed_version_id = nil if @issue.fixed_version_id == 0
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
if @issue.save
#params[:issue][:assigned_to_id] = nil if params[:issue][:assigned_to_id].to_i == 0
senduser = User.find(params[:issue][:assigned_to_id])
issue_id = @issue.id
issue_title = params[:issue][:subject]
@ -282,15 +284,18 @@ class IssuesController < ApplicationController
# 用户编辑更改issue
def update
# params[:assigned_to_id] = nil if params[:assigned_to_id].to_i == 0
if params[:issue_detail]
issue = Issue.find(params[:id])
issue = update_user_issue_detail(issue, params)
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
@saved = update_user_issue_detail(issue, params)
return
else
# 修改实例变量的值
return unless update_issue_from_params
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
saved = false
begin
@saved = @issue.save_issue_with_child_records(params, @time_entry)

View File

@ -39,7 +39,7 @@ module MembersHelper
end
principals = paginateHelper scope,10
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals')
links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true){|text, parameters, options|
links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options|
link_to text, autocomplete_project_memberships_path(project, parameters.merge(:q => params[:q],:flag => true, :format => 'js')), :remote => true
}
s + content_tag('ul', links,:class => 'wlist', :id => "course_member_pagination_links" )

View File

@ -12,7 +12,7 @@ $("#attachment_history_popub").html('<%= escape_javascript( render :partial => '
$("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub') %>');
<% end %>
<% if params[:attachment_id] %>
<% unless @attachment.container.nil? %>
$("#issue_upload_attachments").html('<%= escape_javascript( render :partial => 'attachments/form_attachments', :locals => { :container => @attachment.container }) %>');
<% end %>

View File

@ -1,3 +1,6 @@
$('#issue_confirm').removeAttr("disabled");
$('#issue_confirm').css('background-color', '#3b94d6');
$('#issue_confirm').css('cursor','pointer');
var fileSpan = $('#attachments_<%= j params[:attachment_id] %>');
<% if(!@attachment.nil? && @attachment.new_record?) %>
fileSpan.hide();

View File

@ -62,7 +62,8 @@
<a href="javascript:void(0);" onclick="issueDetailShow();" class="sy_btn_grey mr5 fr" > 取消 </a>
<% end %>
<!--<a href="javascript:void(0);" class="sy_btn_blue mr5 fr"> 保存并继续</a>-->
<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue mr5 fr" id="issue_confirm"> 保存</a>
<!--<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue mr5 fr" id="issue_confirm"> 保存</a>-->
<input onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue fr mr5" id="issue_confirm" style="width: 28px;color: #FFF" value="保存">
</li>
</ul>
<ul class="fl pro_new_conbox_right ml10 mb10">

View File

@ -61,7 +61,7 @@
<li class="clear">
<span class="pro_new_conbox_leftspan fl">指派给</span>
<span class="pro_new_conbox_rightspan fl ml10">
<a href="" class="c_blue" ><%= @issue.assigned_to ? @issue.assigned_to.show_name : "--" %></a></span>
<a href="<%= @issue.assigned_to_id.nil? ? "javascript:void(0)" : user_path(@issue.assigned_to_id) %>" class="c_blue" ><%= @issue.assigned_to ? @issue.assigned_to.show_name : "--" %></a></span>
</li>
<% end %>
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>

View File

@ -22,7 +22,7 @@
</li>
<li class="mb10 clear">
<label class=" fl ml5">&nbsp;日期&nbsp;&nbsp;:&nbsp;</label>
<label class=" fl" style="border:1px solid #c8c8c8;">
<label class="ml4 fl" style="border:1px solid #c8c8c8;">
<%= f.text_field :effective_date, :size => 10, :readonly => true, :class => "issues_calendar_input fl ml3", :id => "version_index_create_name", :placeholder=>"结束日期", :style=>"height:28px;border-left:none;border-top:none;border-bottom:none;", :no_label => true %>
<%#= calendar_for('version_index_create_name') %>
</label>

View File

@ -67,9 +67,11 @@
<% @issues.each do |issue| %>
<tr>
<td>#<%= issue.id %></td>
<td><p class="new_roadmap_info_title" title="<%= issue.subject %>"><%= issue.subject %></p> </td>
<td><a href="<%= issue_path(issue) %>" class="new_roadmap_info_title" title="<%= issue.subject %>" target="_blank"><%= issue.subject %></a> </td>
<td> <%= issue.tracker %> </td>
<td><p class="new_roadmap_info_name"><%= User.find(issue.try(:assigned_to_id)).show_name %></p></td>
<td><a href="<%= issue.assigned_to_id.nil? ? "" : user_path(issue.assigned_to_id) %>" class="new_roadmap_info_name" target="_blank">
<%= User.find(issue.try(:assigned_to_id)).nil? ? "" : User.find(issue.try(:assigned_to_id)).show_name %></a>
</td>
<td><%= format_time issue.updated_on %></td>
<td><%= issue.status.name %></td>
<td><span class="<%= issue.done_ratio == 100 ? "c_green" : "c_red" %>" ><%= issue.done_ratio %>%</span></td>

View File

@ -0,0 +1,8 @@
class UpdateFixedVersionId < ActiveRecord::Migration
def up
Issue.find_by_sql("update `issues` set fixed_version_id = null where fixed_version_id = 0;")
end
def down
end
end

View File

@ -91,6 +91,10 @@ function addFile_board(inputEl, file, eagerUpload, id,btnId) {
function addFile(inputEl, file, eagerUpload,btnId) {
var attachments_frame = '#attachments_fields';
// $("#issue_confirm").attr('href', '#');
$('#issue_confirm').attr("disabled",true);
$('#issue_confirm').css('background-color','#c1c1c1');
$('#issue_confirm').css('cursor','default');
if (true) {
deleteallfiles = $(inputEl).data('deleteAllFiles');
var attachmentId = addFile.nextAttachmentId++;

View File

@ -704,6 +704,21 @@ a.sy_btn_blue{
-o-border-radius:3px;
border-radius:3px;
}
input.sy_btn_blue{
display: inline-block;
color: #fff;
background: #3b94d6;
text-align: center;
font-size: 12px;
padding:0 15px;
height: 30px;
line-height: 30px;
-webkit-border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
border-radius:3px;
cursor:pointer;
}
a:hover.sy_btn_blue{ background: #2788d0;}
a.hw_btn_blue{
display: inline-block;
@ -880,7 +895,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
/*项目简介*/
.pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;}
.pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
.pro_new_info p{ padding:15px; color: #666;}
.pro_new_info p{ padding:5px; color: #666;}
.pro_new_info_weight{ font-size: 16px; font-weight: bold;}
/* 新版项目配置*/
.pro_new_setting_leftnav{ width: 162px; border:1px solid #ddd; background-color:#fff; padding:3px; padding-bottom: 0;}