Merge branch 'dev_newproject' into develop
This commit is contained in:
commit
fff56c08de
|
@ -235,7 +235,9 @@ class IssuesController < ApplicationController
|
||||||
# 给该issue在它所在的项目中所有的issues中所在的位置给一个序号
|
# 给该issue在它所在的项目中所有的issues中所在的位置给一个序号
|
||||||
@issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1
|
@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.fixed_version_id = nil if @issue.fixed_version_id == 0
|
||||||
|
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
|
||||||
if @issue.save
|
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])
|
senduser = User.find(params[:issue][:assigned_to_id])
|
||||||
issue_id = @issue.id
|
issue_id = @issue.id
|
||||||
issue_title = params[:issue][:subject]
|
issue_title = params[:issue][:subject]
|
||||||
|
@ -282,15 +284,18 @@ class IssuesController < ApplicationController
|
||||||
|
|
||||||
# 用户编辑更改issue
|
# 用户编辑更改issue
|
||||||
def update
|
def update
|
||||||
|
# params[:assigned_to_id] = nil if params[:assigned_to_id].to_i == 0
|
||||||
if params[:issue_detail]
|
if params[:issue_detail]
|
||||||
issue = Issue.find(params[:id])
|
issue = Issue.find(params[:id])
|
||||||
issue = update_user_issue_detail(issue, params)
|
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)
|
@saved = update_user_issue_detail(issue, params)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
# 修改实例变量的值
|
# 修改实例变量的值
|
||||||
return unless update_issue_from_params
|
return unless update_issue_from_params
|
||||||
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
||||||
|
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
|
||||||
saved = false
|
saved = false
|
||||||
begin
|
begin
|
||||||
@saved = @issue.save_issue_with_child_records(params, @time_entry)
|
@saved = @issue.save_issue_with_child_records(params, @time_entry)
|
||||||
|
|
|
@ -39,7 +39,7 @@ module MembersHelper
|
||||||
end
|
end
|
||||||
principals = paginateHelper scope,10
|
principals = paginateHelper scope,10
|
||||||
s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals')
|
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
|
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" )
|
s + content_tag('ul', links,:class => 'wlist', :id => "course_member_pagination_links" )
|
||||||
|
|
|
@ -12,8 +12,8 @@ $("#attachment_history_popub").html('<%= escape_javascript( render :partial => '
|
||||||
$("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub') %>');
|
$("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub') %>');
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if params[:attachment_id] %>
|
<% unless @attachment.container.nil? %>
|
||||||
$("#issue_upload_attachments").html('<%= escape_javascript( render :partial => 'attachments/form_attachments', :locals => { :container => @attachment.container }) %>');
|
$("#issue_upload_attachments").html('<%= escape_javascript( render :partial => 'attachments/form_attachments', :locals => { :container => @attachment.container }) %>');
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if @is_destroy%>
|
<% if @is_destroy%>
|
||||||
|
|
|
@ -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] %>');
|
var fileSpan = $('#attachments_<%= j params[:attachment_id] %>');
|
||||||
<% if(!@attachment.nil? && @attachment.new_record?) %>
|
<% if(!@attachment.nil? && @attachment.new_record?) %>
|
||||||
fileSpan.hide();
|
fileSpan.hide();
|
||||||
|
|
|
@ -62,7 +62,8 @@
|
||||||
<a href="javascript:void(0);" onclick="issueDetailShow();" class="sy_btn_grey mr5 fr" > 取消 </a>
|
<a href="javascript:void(0);" onclick="issueDetailShow();" class="sy_btn_grey mr5 fr" > 取消 </a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--<a href="javascript:void(0);" class="sy_btn_blue mr5 fr"> 保存并继续</a>-->
|
<!--<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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl pro_new_conbox_right ml10 mb10">
|
<ul class="fl pro_new_conbox_right ml10 mb10">
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<span class="pro_new_conbox_leftspan fl">指派给</span>
|
<span class="pro_new_conbox_leftspan fl">指派给</span>
|
||||||
<span class="pro_new_conbox_rightspan fl ml10">
|
<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>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
|
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
<% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first ||
|
<% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first ||
|
||||||
@project_attachments.first %>
|
@project_attachments.first %>
|
||||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||||
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_project_overview_new)%></h3>
|
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_project_overview_new) %></h3>
|
||||||
<% if !@issues.first.nil? || !@issues_journals.first.nil? %>
|
<% if !@issues.first.nil? || !@issues_journals.first.nil? %>
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="mb10 clear">
|
<li class="mb10 clear">
|
||||||
<label class=" fl ml5"> 日期 : </label>
|
<label class=" fl ml5"> 日期 : </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 %>
|
<%= 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') %>
|
<%#= calendar_for('version_index_create_name') %>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -67,9 +67,11 @@
|
||||||
<% @issues.each do |issue| %>
|
<% @issues.each do |issue| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>#<%= issue.id %></td>
|
<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> <%= 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><%= format_time issue.updated_on %></td>
|
||||||
<td><%= issue.status.name %></td>
|
<td><%= issue.status.name %></td>
|
||||||
<td><span class="<%= issue.done_ratio == 100 ? "c_green" : "c_red" %>" ><%= issue.done_ratio %>%</span></td>
|
<td><span class="<%= issue.done_ratio == 100 ? "c_green" : "c_red" %>" ><%= issue.done_ratio %>%</span></td>
|
||||||
|
|
|
@ -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
|
|
@ -91,6 +91,10 @@ function addFile_board(inputEl, file, eagerUpload, id,btnId) {
|
||||||
function addFile(inputEl, file, eagerUpload,btnId) {
|
function addFile(inputEl, file, eagerUpload,btnId) {
|
||||||
|
|
||||||
var attachments_frame = '#attachments_fields';
|
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) {
|
if (true) {
|
||||||
deleteallfiles = $(inputEl).data('deleteAllFiles');
|
deleteallfiles = $(inputEl).data('deleteAllFiles');
|
||||||
var attachmentId = addFile.nextAttachmentId++;
|
var attachmentId = addFile.nextAttachmentId++;
|
||||||
|
|
|
@ -704,6 +704,21 @@ a.sy_btn_blue{
|
||||||
-o-border-radius:3px;
|
-o-border-radius:3px;
|
||||||
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:hover.sy_btn_blue{ background: #2788d0;}
|
||||||
a.hw_btn_blue{
|
a.hw_btn_blue{
|
||||||
display: inline-block;
|
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{ 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 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_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;}
|
.pro_new_setting_leftnav{ width: 162px; border:1px solid #ddd; background-color:#fff; padding:3px; padding-bottom: 0;}
|
||||||
|
|
Loading…
Reference in New Issue