summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-05-19 01:06:25 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-05-19 01:06:25 +0000
commit0e20ec697b828fd3fd2e1987fff66d28df134365 (patch)
tree6e0f912859333c986c1c051a4cc033fc3e9c3fad /app
parentcbb8b12ba44b39d42b1e2de3bfb415c7487c7b5b (diff)
downloadredmine-0e20ec697b828fd3fd2e1987fff66d28df134365.tar.gz
redmine-0e20ec697b828fd3fd2e1987fff66d28df134365.zip
set default issue start/due datepicker from due/start date (#14024)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11883 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 751550118..fbf14b3d1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1075,6 +1075,7 @@ module ApplicationHelper
def include_calendar_headers_tags
unless @calendar_headers_tags_included
+ tags = javascript_include_tag("datepicker")
@calendar_headers_tags_included = true
content_for :header_tags do
start_of_week = Setting.start_of_week
@@ -1082,12 +1083,13 @@ module ApplicationHelper
# Redmine uses 1..7 (monday..sunday) in settings and locales
# JQuery uses 0..6 (sunday..saturday), 7 needs to be changed to 0
start_of_week = start_of_week.to_i % 7
-
- tags = javascript_tag(
+ tags << javascript_tag(
"var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
path_to_image('/images/calendar.png') +
- "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true, changeMonth: true, changeYear: true};")
+ "', showButtonPanel: true, showWeek: true, showOtherMonths: true, " +
+ "selectOtherMonths: true, changeMonth: true, changeYear: true, " +
+ "beforeShow: beforeShowDatePicker};")
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")