Set the first day of week in the date picker according to settings (#11814).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10372 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a3d0e82552
commit
6d0aed1f44
|
@ -1095,8 +1095,12 @@ module ApplicationHelper
|
||||||
unless @calendar_headers_tags_included
|
unless @calendar_headers_tags_included
|
||||||
@calendar_headers_tags_included = true
|
@calendar_headers_tags_included = true
|
||||||
content_for :header_tags do
|
content_for :header_tags do
|
||||||
|
# Monday, Sunday, Saturday
|
||||||
|
start_of_week = {1 => 1, 7 => 0, 6 => 6}[Setting.start_of_week.to_i] ||
|
||||||
|
l(:general_first_day_of_week, :default => '1') # use language
|
||||||
|
|
||||||
tags = javascript_tag(
|
tags = javascript_tag(
|
||||||
"var datepickerOptions={dateFormat: 'yy-mm-dd', " +
|
"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/calendar.png') +
|
||||||
"', showButtonPanel: true};")
|
"', showButtonPanel: true};")
|
||||||
|
|
Loading…
Reference in New Issue