Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
3825252327
|
@ -1491,7 +1491,7 @@ module ApplicationHelper
|
|||
tags = javascript_tag(
|
||||
"var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
|
||||
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
|
||||
path_to_image('/images/calendar.png') +
|
||||
path_to_image('/images/public_icon.png') +
|
||||
"', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};")
|
||||
jquery_locale = l('jquery.locale', :default => current_language.to_s)
|
||||
unless jquery_locale == 'en'
|
||||
|
@ -1513,7 +1513,7 @@ module ApplicationHelper
|
|||
tags = javascript_tag(
|
||||
"var datepickerOptions={dateFormat: 'yy-mm-dd',minDate: new Date(), firstDay: #{start_of_week}, " +
|
||||
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
|
||||
path_to_image('/images/calendar.png') +
|
||||
path_to_image('/images/public_icon.png') +
|
||||
"', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true, onClose: function(dateText, inst) {TimeClose(dateText,inst);}, beforeShow : function(input){TimeBeforeShow(input);} };")
|
||||
jquery_locale = l('jquery.locale', :default => current_language.to_s)
|
||||
unless jquery_locale == 'en'
|
||||
|
|
|
@ -288,11 +288,23 @@ module WatchersHelper
|
|||
|
||||
|
||||
|
||||
|
||||
# 缺陷跟踪者列表复选框生成
|
||||
def watchers_checkboxes(object, users, checked=nil)
|
||||
if users.nil?
|
||||
|
||||
else
|
||||
# tag = check_box_tag 'issue[watcher_user_ids][]', user.id, c, :id => nil
|
||||
# content_tag 'label', "#{tag} #{h(user)}".html_safe,
|
||||
# :id => "issue_watcher_user_ids_#{user.id}",
|
||||
# :class => "floating"
|
||||
users.map do |user|
|
||||
c = checked.nil? ? object.watched_by?(user) : checked
|
||||
s = content_tag(:ul,
|
||||
content_tag(:li, "#{check_box_tag 'issue[watcher_user_ids][]', user.id, c, :id => nil } #{h link_to user.userInfo, user_path( user.id)}".html_safe,
|
||||
:id=>"issue_watcher_user_ids_#{user.id}",:style=>"float: left;width: 270px;margin: 0px 20px 10px 0px; overflow: hidden; line-height:1.6em;" ),
|
||||
:class => "mb10 ml80")
|
||||
end.join.html_safe
|
||||
|
||||
# scope = users.sort
|
||||
# watchers = paginateHelper scope,10
|
||||
# s = content_tag('ul', issue_watcher_check_box_tags_ex('issue[watcher_user_ids][]', watchers), :class => 'mb10 ml80')
|
||||
|
@ -300,10 +312,6 @@ module WatchersHelper
|
|||
# link_to text, watchers_autocomplete_for_user_path(@users, parameters.merge(:q => params[:q],:format => 'js',:flag => 'ture')), :remote => true
|
||||
# }
|
||||
# s + content_tag('ul', links,:class => 'wlist', :style =>"float:left;margin-top:0px;")
|
||||
users.map do |user|
|
||||
c = checked.nil? ? object.watched_by?(user) : checked
|
||||
end.join.html_safe
|
||||
s = content_tag('ul', issue_watcher_check_box_tags_ex('issue[watcher_user_ids][]', users), :class => 'mb10 ml80')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<div class="fl">
|
||||
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
|
||||
<% if defined?(container) && container && container.saved_attachments %>
|
||||
<% container.attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||
<%= if attachment.id.nil?
|
||||
#待补充代码
|
||||
else
|
||||
|
@ -17,17 +18,17 @@
|
|||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="attachments_p<%= i %>" class="attachment">
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
|
||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly => 'readonly') %>
|
||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %>
|
||||
<span class="ispublic-label"><%= l(:field_is_public) %>:</span>
|
||||
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %>
|
||||
<%= if attachment.id.nil?
|
||||
#待补充代码
|
||||
else
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||
end
|
||||
#待补充代码
|
||||
else
|
||||
link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload')
|
||||
end
|
||||
%>
|
||||
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
|
||||
|
||||
|
@ -36,45 +37,45 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<script type='text/javascript'>
|
||||
// function CompatibleSend()
|
||||
// {
|
||||
// var obj=document.getElementById("_file");
|
||||
// var file= $(obj).clone();
|
||||
// file.click();
|
||||
// }
|
||||
</script>
|
||||
<% project = project %>
|
||||
<span class="add_attachment" style="font-weight:normal;">
|
||||
<script type='text/javascript'>
|
||||
// function CompatibleSend()
|
||||
// {
|
||||
// var obj=document.getElementById("_file");
|
||||
// var file= $(obj).clone();
|
||||
// file.click();
|
||||
// }
|
||||
</script>
|
||||
<% project = project %>
|
||||
<span class="add_attachment" style="font-weight:normal;">
|
||||
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
<%= button_tag "文件浏览",:class => 'sub_btn', :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()', :style => ie8? ? 'display:none' : '' %>
|
||||
<%= button_tag "文件浏览", :class => 'sub_btn', :type => "button", :onclick => "_file.click()", :onmouseover => 'this.focus()', :style => ie8? ? 'display:none' : '' %>
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js',:project =>project),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
:id => '_file',
|
||||
:class => 'file_selector',
|
||||
:multiple => true,
|
||||
:onchange => 'addInputFiles(this);',
|
||||
:style => ie8? ? '' : 'display:none',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:upload_path => uploads_path(:format => 'js', :project => project),
|
||||
:description_placeholder => l(:label_optional_description),
|
||||
:field_is_public => l(:field_is_public),
|
||||
:are_you_sure => l(:text_are_you_sure),
|
||||
:file_count => l(:label_file_count),
|
||||
:delete_all_files => l(:text_are_you_sure_all)
|
||||
} %>
|
||||
<span id="upload_file_count">
|
||||
<%= l(:label_no_file_uploaded)%>
|
||||
<%= l(:label_no_file_uploaded) %>
|
||||
</span>
|
||||
(<%= l(:label_max_size) %>:
|
||||
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
||||
</span>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,53 +1,53 @@
|
|||
<%= labelled_fields_for :issue, @issue do |f| %>
|
||||
<div class="newpro_box">
|
||||
<fieldset class="collapsible" >
|
||||
<legend onclick="toggleFieldset(this);" ><strong><%= l(:label_change_properties) %></strong></legend>
|
||||
<ul class="fl" >
|
||||
<fieldset class="collapsible">
|
||||
<legend onclick="toggleFieldset(this);"><strong><%= l(:label_change_properties) %></strong></legend>
|
||||
<ul class="fl">
|
||||
<li>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:field_status) %>:</label>
|
||||
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
|
||||
<%= f.select :status_id,
|
||||
(@allowed_statuses.collect {|p| [p.name, p.id]}),
|
||||
{ :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" , :no_label => true},
|
||||
:class => "w150" %>
|
||||
(@allowed_statuses.collect { |p| [p.name, p.id] }),
|
||||
{:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :no_label => true},
|
||||
:class => "w150" %>
|
||||
<% else %>
|
||||
<%= h(@issue.status.name) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<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' %>
|
||||
<%= f.select :priority_id,
|
||||
(@priorities.collect {|p| [p.name, p.id]}),
|
||||
{:required => true, :no_label => true}, :disabled => !@issue.leaf?,
|
||||
:class => "w150" %>
|
||||
(@priorities.collect { |p| [p.name, p.id] }),
|
||||
{:required => true, :no_label => true}, :disabled => !@issue.leaf?,
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<li>
|
||||
<label class="label" ><%= l(:field_assigned_to) %>:</label>
|
||||
<label class="label"><%= l(:field_assigned_to) %>:</label>
|
||||
<% if @issue.safe_attribute? 'assigned_to_id' %>
|
||||
<%= 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} ,
|
||||
:class => "w150" %>
|
||||
<%= 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},
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label" ><%= l(:field_fixed_version) %>:</label>
|
||||
<label class="label"><%= l(:field_fixed_version) %>:</label>
|
||||
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
|
||||
<%= 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},
|
||||
:class => "w150" %>
|
||||
<%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
|
||||
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
<%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
|
||||
new_project_version_path(@issue.project),
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:label_version_new),
|
||||
:tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
|
||||
<a href="javascript:viod(0)" class="pic_add mt5 ml5" ></a>
|
||||
<a href="javascript:viod(0)" class="pic_add mt5 ml5"></a>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -55,44 +55,44 @@
|
|||
</ul>
|
||||
<ul class="fl ml90">
|
||||
<li>
|
||||
<label class="label02" ><%= l(:field_start_date) %>:</label>
|
||||
<label class="label02"><%= l(:field_start_date) %>:</label>
|
||||
<% if @issue.safe_attribute? 'start_date' %>
|
||||
<%= f.text_field :start_date,
|
||||
:size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label=> true,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('start_date') %>
|
||||
<%= calendar_for('issue_start_date','start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label02" ><%= l(:field_due_date) %>:</label>
|
||||
<label class="label02"><%= l(:field_due_date) %>:</label>
|
||||
<% if @issue.safe_attribute? 'due_date' %>
|
||||
<%= f.text_field :due_date, :size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label=> true,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('due_date') %>
|
||||
<%= calendar_for('issue_due_date','start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label02" ><%= l(:field_estimated_hours) %>:</label>
|
||||
<label class="label02"><%= l(:field_estimated_hours) %>:</label>
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= f.text_field :estimated_hours, :size => 22,
|
||||
:disabled => !@issue.leaf?,
|
||||
:no_label=> true,
|
||||
:no_label => true,
|
||||
:required => @issue.required_attribute?('estimated_hours') %>
|
||||
<span class="mt3 ml5"><%= l(:field_hours) %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li><label class="label02" > % 完成 : </label>
|
||||
<li><label class="label02"> % 完成 : </label>
|
||||
<% 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] }),
|
||||
{:required => @issue.required_attribute?('done_ratio'), :no_label=> true ,:onchange => "PrecentChange(this.value)"},
|
||||
:class => "w150" %>
|
||||
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||
{:required => @issue.required_attribute?('done_ratio'), :no_label => true, :onchange => "PrecentChange(this.value)"},
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -100,68 +100,65 @@
|
|||
</fieldset>
|
||||
</div><!--newpro_box end-->
|
||||
|
||||
<script type="text/javascript">
|
||||
// window.onload=function(){
|
||||
// var img=$("#issue_due_date").next("img");
|
||||
// img.attr("onclick","SetMinValue();");
|
||||
// }
|
||||
function TimeClose(dateText, inst) {
|
||||
if(inst.id=="issue_start_date"){
|
||||
time=dateText;
|
||||
}
|
||||
}
|
||||
var time=new Date();
|
||||
function TimeBeforeShow(input){
|
||||
if(input.id=="issue_due_date"){
|
||||
//var minDate = $(input).datepicker('option', 'minDate');
|
||||
var tempdata=$("#issue_start_date").attr("value");
|
||||
<script type="text/javascript">
|
||||
// window.onload=function(){
|
||||
// var img=$("#issue_due_date").next("img");
|
||||
// img.attr("onclick","SetMinValue();");
|
||||
// }
|
||||
function TimeClose(dateText, inst) {
|
||||
if (inst.id == "issue_start_date") {
|
||||
time = dateText;
|
||||
}
|
||||
}
|
||||
var time = new Date();
|
||||
function TimeBeforeShow(input) {
|
||||
if (input.id == "issue_due_date") {
|
||||
//var minDate = $(input).datepicker('option', 'minDate');
|
||||
var tempdata = $("#issue_start_date").attr("value");
|
||||
|
||||
$(input).datepicker('option', 'minDate',new Date(tempdata.replace(/-/g, "/")));
|
||||
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
|
||||
}
|
||||
}
|
||||
$(input).datepicker('option', 'minDate', new Date(tempdata.replace(/-/g, "/")));
|
||||
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
|
||||
}
|
||||
}
|
||||
|
||||
function SetMinValue(){
|
||||
/// var tempdata=$("#issue_start_date").attr("value");
|
||||
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
|
||||
//alert(tempdata);
|
||||
//$("#issue_due_date").datepicker({
|
||||
// minDate: new Date(2014,08,23)
|
||||
//var datepickerOptions=
|
||||
//{dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};
|
||||
//alert( $('.issue_due_date').length);
|
||||
//$('.selector')[1].datepicker('option', 'minDate', new Date(2014, 0 - 8, 23));
|
||||
//$("#issue_due_date").datepicker(datepickerOptions);
|
||||
//$("##{issue_due_date}").datepicker(datepickerOptions);
|
||||
//$("#issue_due_date").datepicker(
|
||||
// {dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}
|
||||
//)
|
||||
//});
|
||||
}
|
||||
function PrecentChange(obj){
|
||||
var _v= obj;
|
||||
if(_v==100)
|
||||
{
|
||||
//var select=$("select[id='issue_status_id']");
|
||||
$("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected");
|
||||
}
|
||||
else if(_v==0)
|
||||
{
|
||||
//alert(1);
|
||||
$("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected");
|
||||
}
|
||||
else if(_v!=100&&_v!=0)
|
||||
{
|
||||
// alert(2);
|
||||
$("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
function SetMinValue() {
|
||||
/// var tempdata=$("#issue_start_date").attr("value");
|
||||
//$('.selector').datepicker('option', 'minDate', '12/25/2012');
|
||||
//alert(tempdata);
|
||||
//$("#issue_due_date").datepicker({
|
||||
// minDate: new Date(2014,08,23)
|
||||
//var datepickerOptions=
|
||||
//{dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};
|
||||
//alert( $('.issue_due_date').length);
|
||||
//$('.selector')[1].datepicker('option', 'minDate', new Date(2014, 0 - 8, 23));
|
||||
//$("#issue_due_date").datepicker(datepickerOptions);
|
||||
//$("##{issue_due_date}").datepicker(datepickerOptions);
|
||||
//$("#issue_due_date").datepicker(
|
||||
// {dateFormat: 'yy-mm-dd',minDate: new Date(2014,08,23), showOn: 'button', buttonImageOnly: true, buttonImage: "path_to_image('/images/calendar.png')", showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}
|
||||
//)
|
||||
//});
|
||||
}
|
||||
function PrecentChange(obj) {
|
||||
var _v = obj;
|
||||
if (_v == 100) {
|
||||
//var select=$("select[id='issue_status_id']");
|
||||
$("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected");
|
||||
}
|
||||
else if (_v == 0) {
|
||||
//alert(1);
|
||||
$("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected");
|
||||
}
|
||||
else if (_v != 100 && _v != 0) {
|
||||
// alert(2);
|
||||
$("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<% if @issue.safe_attribute? 'custom_field_values' %>
|
||||
<%= render :partial => 'issues/form_custom_fields' %>
|
||||
<% end %>
|
||||
<% if @issue.safe_attribute? 'custom_field_values' %>
|
||||
<%= render :partial => 'issues/form_custom_fields' %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,80 +1,75 @@
|
|||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#issue_project_id").css("width","100%");
|
||||
$("#issue_project_id").css("overflow ","hidden");
|
||||
// $(".jstEditor").css("margin-left ","80px");
|
||||
//issue_project_id
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<div class="newpro_box">
|
||||
<%= labelled_fields_for :issue, @issue do |f| %>
|
||||
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
|
||||
<ul>
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'tracker_id' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 跟踪 : </label>
|
||||
<%= f.select :tracker_id,
|
||||
@issue.project.trackers.collect {|t| [t.name, t.id]},
|
||||
{:required => true, :no_label => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class=> "w150"
|
||||
%>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'is_private' %>
|
||||
<%= f.check_box :is_private, :no_label => true ,:class=> "ml30"%><label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<!--<li>-->
|
||||
<!--<%# if @issue.safe_attribute? 'project_id' %>-->
|
||||
<%#= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true},
|
||||
<%= labelled_fields_for :issue, @issue do |f| %>
|
||||
<%= call_hook(:view_issues_form_details_top, {:issue => @issue, :form => f}) %>
|
||||
<div class="newpro_box">
|
||||
<ul>
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'tracker_id' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 跟踪 : </label>
|
||||
<%= f.select :tracker_id,
|
||||
@issue.project.trackers.collect { |t| [t.name, t.id] },
|
||||
{:required => true, :no_label => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w150"
|
||||
%>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'is_private' %>
|
||||
<%= f.check_box :is_private, :no_label => true, :class => "ml30" %>
|
||||
<label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<!--<li>-->
|
||||
<!--<%# if @issue.safe_attribute? 'project_id' %>-->
|
||||
<%#= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %>
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'subject' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 主题 : </label>
|
||||
<%= f.text_field :subject,
|
||||
:class => "w583",
|
||||
:maxlength => 255,
|
||||
:required => true,
|
||||
:style => "font-size:small",
|
||||
:no_label => true
|
||||
%>
|
||||
<!--Added by young-->
|
||||
<%= javascript_tag do %>
|
||||
observeAutocompleteField('issue_subject', '<%= escape_javascript auto_complete_issues_path(:project_id => @project,:scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>',
|
||||
{ select: function(event, ui) {
|
||||
$('input#issue_subject').val(ui.item.value);
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'subject' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 主题 : </label>
|
||||
<%= f.text_field :subject,
|
||||
:class => "w583",
|
||||
:maxlength => 255,
|
||||
:required => true,
|
||||
:style => "font-size:small",
|
||||
:no_label => true
|
||||
%>
|
||||
<!--Added by young-->
|
||||
<%= javascript_tag do %>
|
||||
observeAutocompleteField('issue_subject',
|
||||
'<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>
|
||||
',
|
||||
{ select: function(event, ui) {
|
||||
$('input#issue_subject').val(ui.item.value);
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'description' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 描述 : </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? %>
|
||||
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
|
||||
<%= f.text_area :description,
|
||||
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
|
||||
:accesskey => accesskey(:edit),
|
||||
:class => "w583",
|
||||
:no_label => true %>
|
||||
<% end %>
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'description' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 描述 : </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? %>
|
||||
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
|
||||
<%= f.text_area :description,
|
||||
:rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
|
||||
:accesskey => accesskey(:edit),
|
||||
:class => "w583",
|
||||
:no_label => true %>
|
||||
<% end %>
|
||||
|
||||
<%= wikitoolbar_for 'issue_description' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<%= wikitoolbar_for 'issue_description' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
</div>
|
||||
<li>
|
||||
<% if @copy_from && @copy_from.attachments.any? %>
|
||||
<p>
|
||||
|
@ -92,15 +87,14 @@
|
|||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label" ><span class="c_red f12">*</span><%= l(:label_attachment_plural) %>:</label>
|
||||
<br>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:label_attachment_plural) %>:</label>
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
|
||||
<li>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
||||
<div id="attributes">
|
||||
<%= render :partial => 'issues/attributes' %>
|
||||
</div>
|
||||
</div>
|
||||
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div id="attributes">
|
||||
<%= render :partial => 'issues/attributes' %>
|
||||
</div>
|
||||
<%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
|
||||
<% end %>
|
|
@ -7,14 +7,14 @@
|
|||
:html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||
<%= error_messages_for 'issue' %>
|
||||
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
|
||||
<div class="newpro_box">
|
||||
<div>
|
||||
<%= render :partial => 'issues/form', :locals => {:f => f} %>
|
||||
</div>
|
||||
<div class="newpro_box02 ">
|
||||
<% if @issue.safe_attribute? 'watcher_user_ids' -%>
|
||||
<div>
|
||||
<label class="label" > <%= l(:label_issue_watchers) %>:</label>
|
||||
<input id="" name="" size="22" class="fl mb10 h26" type="text" value="搜索添加跟踪者" >
|
||||
<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者" >
|
||||
<span class="search_for_watchers">
|
||||
<%= link_to "",
|
||||
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'public', 'pleft', 'project' %>
|
||||
<%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2' %>
|
||||
<%= javascript_include_tag 'project', 'header' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
|
|
|
@ -194,4 +194,11 @@ function refusal_applied_member()
|
|||
function news_show_more_des(id)
|
||||
{
|
||||
$('#news_description_' + id).toggleClass("news_description_none");
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#issue_project_id").css("width","100%");
|
||||
$("#issue_project_id").css("overflow ","hidden");
|
||||
// $(".jstEditor").css("margin-left ","80px");
|
||||
//issue_project_id
|
||||
});
|
||||
|
|
|
@ -226,7 +226,13 @@ blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;}
|
|||
.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;}
|
||||
.reply_btn:hover{ background:#999; color:#fff; }
|
||||
|
||||
#attachments_fields input.description {margin-left: 4px;width: 100px;}
|
||||
#attachments_fields input.description {margin-left:4px; width:100px; }
|
||||
#attachments_fields span .boldSpan{display:block; white-space:nowrap; font-family:'微软雅黑';}
|
||||
#attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
|
||||
a.remove-upload:hover {text-decoration:none !important;}
|
||||
#attachments_fields input.is_public_checkbox {width:20px;}
|
||||
|
||||
|
||||
#attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
|
||||
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
|
||||
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;}
|
||||
|
@ -238,7 +244,7 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;}
|
|||
.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;}
|
||||
.reply_btn:hover{ background:#999; color:#fff; }
|
||||
|
||||
#attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; }
|
||||
|
||||
.ui-widget {
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 1.1em;
|
||||
|
@ -401,6 +407,28 @@ a:hover.member_btn{ background:#329cbd;}
|
|||
.pro_st_edit_ku{display:none; margin-top:20px;}
|
||||
.pro_st_edit_ku ul li{margin-bottom:10px;}
|
||||
/*end*/
|
||||
|
||||
/*gcm upload file count and deleteall*/
|
||||
#upload_file_count #count {color:red; font-size:1.5em;}
|
||||
span.add_attachment .remove_all {background:none;background: url(../images/delete.png) no-repeat 1px 50%; width:1px; display:inline-block;right:10%;text-decoration:none;}
|
||||
span.add_attachment a {padding-left:16px; background: url(../images/bullet_add.png) no-repeat 0 50%; }
|
||||
|
||||
|
||||
/*日历选择图*/
|
||||
img.ui-datepicker-trigger {
|
||||
display:block;
|
||||
background:url(/images/public_icon.png) -31px 0 no-repeat;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
width:16px;
|
||||
height:15px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*用户反馈*/
|
||||
.msg_box{ width:670px; height:173px; border-bottom:1px dashed #CCC; padding-top:10px;}
|
||||
.msg_box h4{ }
|
||||
|
|
Loading…
Reference in New Issue