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

This commit is contained in:
huang 2015-04-15 16:38:58 +08:00
commit 3825252327
9 changed files with 267 additions and 232 deletions

View File

@ -1491,7 +1491,7 @@ module ApplicationHelper
tags = javascript_tag( tags = javascript_tag(
"var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " + "var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
"showOn: 'button', buttonImageOnly: true, buttonImage: '" + "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};") "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};")
jquery_locale = l('jquery.locale', :default => current_language.to_s) jquery_locale = l('jquery.locale', :default => current_language.to_s)
unless jquery_locale == 'en' unless jquery_locale == 'en'
@ -1513,7 +1513,7 @@ module ApplicationHelper
tags = javascript_tag( tags = javascript_tag(
"var datepickerOptions={dateFormat: 'yy-mm-dd',minDate: new Date(), firstDay: #{start_of_week}, " + "var datepickerOptions={dateFormat: 'yy-mm-dd',minDate: new Date(), firstDay: #{start_of_week}, " +
"showOn: 'button', buttonImageOnly: true, buttonImage: '" + "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);} };") "', 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) jquery_locale = l('jquery.locale', :default => current_language.to_s)
unless jquery_locale == 'en' unless jquery_locale == 'en'

View File

@ -288,11 +288,23 @@ module WatchersHelper
# 缺陷跟踪者列表复选框生成
def watchers_checkboxes(object, users, checked=nil) def watchers_checkboxes(object, users, checked=nil)
if users.nil? if users.nil?
else 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 # scope = users.sort
# watchers = paginateHelper scope,10 # watchers = paginateHelper scope,10
# s = content_tag('ul', issue_watcher_check_box_tags_ex('issue[watcher_user_ids][]', watchers), :class => 'mb10 ml80') # 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 # 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;") # 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
end end

View File

@ -1,11 +1,12 @@
<div class="fl">
<span id="attachments_fields" xmlns="http://www.w3.org/1999/html"> <span id="attachments_fields" xmlns="http://www.w3.org/1999/html">
<% if defined?(container) && container && container.saved_attachments %> <% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %> <% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment"> <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}][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;") %> <%= 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> <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')%> <%= 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? <%= if attachment.id.nil?
#待补充代码 #待补充代码
else else
@ -19,10 +20,10 @@
<% end %> <% 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"> <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}][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;") %> <%= 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> <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')%> <%= 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? <%= if attachment.id.nil?
#待补充代码 #待补充代码
else else
@ -36,19 +37,19 @@
<% end %> <% end %>
<% end %> <% end %>
</span> </span>
<script type='text/javascript'> <script type='text/javascript'>
// function CompatibleSend() // function CompatibleSend()
// { // {
// var obj=document.getElementById("_file"); // var obj=document.getElementById("_file");
// var file= $(obj).clone(); // var file= $(obj).clone();
// file.click(); // file.click();
// } // }
</script> </script>
<% project = project %> <% project = project %>
<span class="add_attachment" style="font-weight:normal;"> <span class="add_attachment" style="font-weight:normal;">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%--> <!--%= 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]', <%= file_field_tag 'attachments[dummy][file]',
:id => '_file', :id => '_file',
:class => 'file_selector', :class => 'file_selector',
@ -59,7 +60,7 @@
:max_file_size => Setting.attachment_max_size.to_i.kilobytes, :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_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, :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => uploads_path(:format => 'js',:project =>project), :upload_path => uploads_path(:format => 'js', :project => project),
:description_placeholder => l(:label_optional_description), :description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public), :field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure), :are_you_sure => l(:text_are_you_sure),
@ -67,14 +68,14 @@
:delete_all_files => l(:text_are_you_sure_all) :delete_all_files => l(:text_are_you_sure_all)
} %> } %>
<span id="upload_file_count"> <span id="upload_file_count">
<%= l(:label_no_file_uploaded)%> <%= l(:label_no_file_uploaded) %>
</span> </span>
(<%= l(:label_max_size) %>: (<%= l(:label_max_size) %>:
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span> </span>
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %> <%= javascript_include_tag 'attachments' %>
<% end %> <% end %>
</div>

View File

@ -1,14 +1,14 @@
<%= labelled_fields_for :issue, @issue do |f| %> <%= labelled_fields_for :issue, @issue do |f| %>
<div class="newpro_box"> <div class="newpro_box">
<fieldset class="collapsible" > <fieldset class="collapsible">
<legend onclick="toggleFieldset(this);" ><strong><%= l(:label_change_properties) %></strong></legend> <legend onclick="toggleFieldset(this);"><strong><%= l(:label_change_properties) %></strong></legend>
<ul class="fl" > <ul class="fl">
<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] }),
{ :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" , :no_label => true}, {:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :no_label => true},
:class => "w150" %> :class => "w150" %>
<% else %> <% else %>
<%= h(@issue.status.name) %> <%= h(@issue.status.name) %>
@ -16,10 +16,10 @@
</li> </li>
<div class="cl"></div> <div class="cl"></div>
<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 %>
@ -27,16 +27,16 @@
<div class="cl"></div> <div class="cl"></div>
<li> <li>
<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' %> <% 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>
<li> <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? %> <% 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), <%= 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},
@ -47,7 +47,7 @@
:method => 'get', :method => 'get',
:title => l(:label_version_new), :title => l(:label_version_new),
:tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %> :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 %> <% end %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
@ -55,43 +55,43 @@
</ul> </ul>
<ul class="fl ml90"> <ul class="fl ml90">
<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, :size => 22,
:disabled => !@issue.leaf?, :disabled => !@issue.leaf?,
:no_label=> true, :no_label => true,
:required => @issue.required_attribute?('start_date') %> :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>
<div class="cl"></div> <div class="cl"></div>
<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?, :disabled => !@issue.leaf?,
:no_label=> true, :no_label => true,
:required => @issue.required_attribute?('due_date') %> :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>
<div class="cl"></div> <div class="cl"></div>
<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?, :disabled => !@issue.leaf?,
:no_label=> true, :no_label => true,
:required => @issue.required_attribute?('estimated_hours') %> :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>
<div class="cl"></div> <div class="cl"></div>
<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 ,:onchange => "PrecentChange(this.value)"}, {:required => @issue.required_attribute?('done_ratio'), :no_label => true, :onchange => "PrecentChange(this.value)"},
:class => "w150" %> :class => "w150" %>
<% end %> <% end %>
</li> </li>
@ -101,27 +101,27 @@
</div><!--newpro_box end--> </div><!--newpro_box end-->
<script type="text/javascript"> <script type="text/javascript">
// window.onload=function(){ // window.onload=function(){
// var img=$("#issue_due_date").next("img"); // var img=$("#issue_due_date").next("img");
// img.attr("onclick","SetMinValue();"); // img.attr("onclick","SetMinValue();");
// } // }
function TimeClose(dateText, inst) { function TimeClose(dateText, inst) {
if(inst.id=="issue_start_date"){ if (inst.id == "issue_start_date") {
time=dateText; time = dateText;
} }
} }
var time=new Date(); var time = new Date();
function TimeBeforeShow(input){ function TimeBeforeShow(input) {
if(input.id=="issue_due_date"){ if (input.id == "issue_due_date") {
//var minDate = $(input).datepicker('option', 'minDate'); //var minDate = $(input).datepicker('option', 'minDate');
var tempdata=$("#issue_start_date").attr("value"); var tempdata = $("#issue_start_date").attr("value");
$(input).datepicker('option', 'minDate',new Date(tempdata.replace(/-/g, "/"))); $(input).datepicker('option', 'minDate', new Date(tempdata.replace(/-/g, "/")));
//$('.selector').datepicker('option', 'minDate', '12/25/2012'); //$('.selector').datepicker('option', 'minDate', '12/25/2012');
} }
} }
function SetMinValue(){ function SetMinValue() {
/// var tempdata=$("#issue_start_date").attr("value"); /// var tempdata=$("#issue_start_date").attr("value");
//$('.selector').datepicker('option', 'minDate', '12/25/2012'); //$('.selector').datepicker('option', 'minDate', '12/25/2012');
//alert(tempdata); //alert(tempdata);
@ -138,30 +138,27 @@
//) //)
//}); //});
} }
function PrecentChange(obj){ function PrecentChange(obj) {
var _v= obj; var _v = obj;
if(_v==100) if (_v == 100) {
{
//var select=$("select[id='issue_status_id']"); //var select=$("select[id='issue_status_id']");
$("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected"); $("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected");
} }
else if(_v==0) else if (_v == 0) {
{
//alert(1); //alert(1);
$("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected"); $("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected");
} }
else if(_v!=100&&_v!=0) else if (_v != 100 && _v != 0) {
{
// alert(2); // alert(2);
$("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected"); $("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected");
} }
} }
</script> </script>
<% if @issue.safe_attribute? 'custom_field_values' %> <% if @issue.safe_attribute? 'custom_field_values' %>
<%= render :partial => 'issues/form_custom_fields' %> <%= render :partial => 'issues/form_custom_fields' %>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -1,31 +1,22 @@
<script type="text/javascript"> <%= labelled_fields_for :issue, @issue do |f| %>
$(document).ready(function(){ <%= call_hook(:view_issues_form_details_top, {:issue => @issue, :form => f}) %>
$("#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"> <div class="newpro_box">
<%= labelled_fields_for :issue, @issue do |f| %>
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
<ul> <ul>
<li> <li>
<% if @issue.safe_attribute? 'tracker_id' %> <% if @issue.safe_attribute? 'tracker_id' %>
<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.select :tracker_id, <%= f.select :tracker_id,
@issue.project.trackers.collect {|t| [t.name, t.id]}, @issue.project.trackers.collect { |t| [t.name, t.id] },
{:required => true, :no_label => true}, {:required => true, :no_label => true},
: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"
%> %>
<% end %> <% end %>
</li> </li>
<li> <li>
<% if @issue.safe_attribute? 'is_private' %> <% 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> <%= 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 %> <% end %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
@ -47,7 +38,9 @@
%> %>
<!--Added by young--> <!--Added by young-->
<%= javascript_tag do %> <%= javascript_tag do %>
observeAutocompleteField('issue_subject', '<%= escape_javascript auto_complete_issues_path(:project_id => @project,:scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>', observeAutocompleteField('issue_subject',
'<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>
',
{ select: function(event, ui) { { select: function(event, ui) {
$('input#issue_subject').val(ui.item.value); $('input#issue_subject').val(ui.item.value);
} }
@ -61,7 +54,7 @@
<li> <li>
<% if @issue.safe_attribute? 'description' %> <% if @issue.safe_attribute? 'description' %>
<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.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", :style => (@issue.new_record? ? nil : 'display:none') do %> <%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
<%= f.text_area :description, <%= f.text_area :description,
@ -75,6 +68,8 @@
<% end %> <% end %>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
</ul>
</div>
<li> <li>
<% if @copy_from && @copy_from.attachments.any? %> <% if @copy_from && @copy_from.attachments.any? %>
<p> <p>
@ -92,15 +87,14 @@
</li> </li>
<div class="cl"></div> <div class="cl"></div>
<li> <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} %> <%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
<li> </li>
<div class="cl"></div> <div class="cl"></div>
</ul> <div class="cl"></div>
<div id="attributes">
<div id="attributes">
<%= render :partial => 'issues/attributes' %> <%= render :partial => 'issues/attributes' %>
</div> </div>
</div> <%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
<% end %> <% end %>

View File

@ -7,14 +7,14 @@
:html => {:id => 'issue-form', :multipart => true} do |f| %> :html => {:id => 'issue-form', :multipart => true} do |f| %>
<%= error_messages_for 'issue' %> <%= error_messages_for 'issue' %>
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %> <%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
<div class="newpro_box"> <div>
<%= render :partial => 'issues/form', :locals => {:f => f} %> <%= render :partial => 'issues/form', :locals => {:f => f} %>
</div> </div>
<div class="newpro_box02 "> <div class="newpro_box02 ">
<% if @issue.safe_attribute? 'watcher_user_ids' -%> <% if @issue.safe_attribute? 'watcher_user_ids' -%>
<div> <div>
<label class="label" > <%= l(:label_issue_watchers) %></label> <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"> <span class="search_for_watchers">
<%= link_to "", <%= link_to "",
{:controller => 'watchers', :action => 'new', :project_id => @issue.project}, {:controller => 'watchers', :action => 'new', :project_id => @issue.project},

View File

@ -12,7 +12,7 @@
<%= favicon %> <%= favicon %>
<%= javascript_heads %> <%= javascript_heads %>
<%= heads_for_theme %> <%= 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' %> <%= javascript_include_tag 'project', 'header' %>
<%= call_hook :view_layouts_base_html_head %> <%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags --> <!-- page specific tags -->

View File

@ -195,3 +195,10 @@ function news_show_more_des(id)
{ {
$('#news_description_' + id).toggleClass("news_description_none"); $('#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
});

View File

@ -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{ 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; } .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;} #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;} 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;} #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{ 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; } .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 { .ui-widget {
font-family: Verdana, sans-serif; font-family: Verdana, sans-serif;
font-size: 1.1em; 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{display:none; margin-top:20px;}
.pro_st_edit_ku ul li{margin-bottom:10px;} .pro_st_edit_ku ul li{margin-bottom:10px;}
/*end*/ /*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{ width:670px; height:173px; border-bottom:1px dashed #CCC; padding-top:10px;}
.msg_box h4{ } .msg_box h4{ }