diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index ab5f0a308..f16573c16 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1482,7 +1482,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'
@@ -1504,7 +1504,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'
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb
index 6edb171c8..64e82a7e8 100644
--- a/app/helpers/watchers_helper.rb
+++ b/app/helpers/watchers_helper.rb
@@ -267,11 +267,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')
@@ -279,10 +291,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
diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb
index ce78274a3..cc3fbe1a1 100644
--- a/app/views/attachments/_form.html.erb
+++ b/app/views/attachments/_form.html.erb
@@ -1,11 +1,12 @@
+
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
- <%= 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;") %>
- <%= l(:field_is_public)%>:
- <%= 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;") %>
+ <%= l(:field_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?
#待补充代码
else
@@ -17,17 +18,17 @@
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
<% end %>
- <% container.saved_attachments.each_with_index do |attachment, i| %>
+ <% container.saved_attachments.each_with_index do |attachment, i| %>
- <%= 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;") %>
- <%= l(:field_is_public)%>:
- <%= 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;") %>
+ <%= l(:field_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?
- #待补充代码
- 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 %>
-
-<% project = project %>
-
+
+ <% project = project %>
+
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
- <%= 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)
+ } %>
- <%= l(:label_no_file_uploaded)%>
+ <%= l(:label_no_file_uploaded) %>
(<%= l(:label_max_size) %>:
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
-<% content_for :header_tags do %>
- <%= javascript_include_tag 'attachments' %>
-<% end %>
-
+ <% content_for :header_tags do %>
+ <%= javascript_include_tag 'attachments' %>
+ <% end %>
+
diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
index 177e5abf0..8819c1e49 100644
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -1,53 +1,53 @@
<%= labelled_fields_for :issue, @issue do |f| %>
-
-
+ 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");
+ }
+ }
+
-<% 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 %>
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index dfee1b1b4..022d77f28 100644
--- a/app/views/issues/_form.html.erb
+++ b/app/views/issues/_form.html.erb
@@ -1,80 +1,75 @@
-
-
-
-
- <%= labelled_fields_for :issue, @issue do |f| %>
- <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
-
- -
- <% if @issue.safe_attribute? 'tracker_id' %>
-
- <%= 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 %>
-
- -
- <% if @issue.safe_attribute? 'is_private' %>
- <%= f.check_box :is_private, :no_label => true ,:class=> "ml30"%>
- <% end %>
-
-
-
-
- <%#= 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}) %>
+
+
+ -
+ <% if @issue.safe_attribute? 'tracker_id' %>
+
+ <%= 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 %>
+
+ -
+ <% if @issue.safe_attribute? 'is_private' %>
+ <%= f.check_box :is_private, :no_label => true, :class => "ml30" %>
+
+ <% end %>
+
+
+
+
+ <%#= 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')}')" %>
-
-
- -
- <% if @issue.safe_attribute? 'subject' %>
-
- <%= f.text_field :subject,
- :class => "w583",
- :maxlength => 255,
- :required => true,
- :style => "font-size:small",
- :no_label => true
- %>
-
- <%= 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 %>
+
+
+
-
+ <% if @issue.safe_attribute? 'subject' %>
+
+ <%= f.text_field :subject,
+ :class => "w583",
+ :maxlength => 255,
+ :required => true,
+ :style => "font-size:small",
+ :no_label => true
+ %>
+
+ <%= 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 %>
-
-
+ <% end %>
+
+
- -
- <% if @issue.safe_attribute? 'description' %>
-
- <%= 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 %>
+
-
+ <% if @issue.safe_attribute? 'description' %>
+
+ <%= 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 %>
-
-
+ <%= wikitoolbar_for 'issue_description' %>
+ <% end %>
+
+
+
+
-
<% if @copy_from && @copy_from.attachments.any? %>
@@ -92,15 +87,14 @@
-
-
+
+
<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
- -
+
-
-
-
- <%= render :partial => 'issues/attributes' %>
-
-
-<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
-<% end %>
+
+
+ <%= render :partial => 'issues/attributes' %>
+
+ <%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb
index 3ae8cd368..6846e9e53 100644
--- a/app/views/issues/new.html.erb
+++ b/app/views/issues/new.html.erb
@@ -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] %>
-
+
<%= render :partial => 'issues/form', :locals => {:f => f} %>
<% if @issue.safe_attribute? 'watcher_user_ids' -%>
-
+
<%= link_to "",
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index 30dad5ff7..ac63fdaa8 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -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 %>
diff --git a/public/javascripts/project.js b/public/javascripts/project.js
index 424aeb7cc..1f3117a06 100644
--- a/public/javascripts/project.js
+++ b/public/javascripts/project.js
@@ -194,4 +194,11 @@ function refusal_applied_member()
function news_show_more_des(id)
{
$('#news_description_' + id).toggleClass("news_description_none");
-}
\ No newline at end of file
+}
+
+$(document).ready(function(){
+ $("#issue_project_id").css("width","100%");
+ $("#issue_project_id").css("overflow ","hidden");
+// $(".jstEditor").css("margin-left ","80px");
+ //issue_project_id
+});
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index e2859c9ae..3645269bc 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -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{ }