From b9ee7fe00d25952e9898c78a925c3de9a6434710 Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Mon, 11 Aug 2014 16:39:18 +0800 Subject: [PATCH] =?UTF-8?q?1.#878=20=E7=BC=BA=E9=99=B7=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=AE=8C=E6=88=90=E6=97=B6=E9=97=B4=E5=B0=8F?= =?UTF-8?q?=E4=BA=8E=E5=BC=80=E5=A7=8B=E6=97=B6=E6=97=B6=E9=97=B4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=202.=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E6=9C=80=E5=B0=8F=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 +-- app/views/issues/_attributes.html.erb | 37 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9f8b8fff5..b1006d239 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1300,10 +1300,10 @@ module ApplicationHelper start_of_week = start_of_week.to_i % 7 tags = javascript_tag( - "var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " + + "var datepickerOptions={dateFormat: 'yy-mm-dd',minDate: new Date(), firstDay: #{start_of_week}, " + "showOn: 'button', buttonImageOnly: true, buttonImage: '" + path_to_image('/images/calendar.png') + - "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};") + "', 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' tags << javascript_include_tag("i18n/jquery.ui.datepicker-#{jquery_locale}.js") diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index b17283f3b..ebf6dbc91 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -46,6 +46,43 @@
<%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %>
<% end %>