Merged r10368 to r10373 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10374 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-09-11 19:40:59 +00:00
parent 0ad5dfaba0
commit b369f82d15
4 changed files with 31 additions and 12 deletions
+7 -1
View File
@@ -1095,8 +1095,14 @@ module ApplicationHelper
unless @calendar_headers_tags_included
@calendar_headers_tags_included = true
content_for :header_tags do
start_of_week = Setting.start_of_week
start_of_week = l(:general_first_day_of_week, :default => '1') if start_of_week.blank?
# 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(
"var datepickerOptions={dateFormat: 'yy-mm-dd', " +
"var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
path_to_image('/images/calendar.png') +
"', showButtonPanel: true};")