redmine_plugin_asset_pipeline 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a43c5073b98a04fe4405ad6b35403b5a83297571
4
- data.tar.gz: 93e13ad2791b3701e3163875866ba31e57f6e35d
3
+ metadata.gz: 6cb17e9448edb754b96d43ac51f481ea8ba157f6
4
+ data.tar.gz: b68d647995066dd64d164ba99b0274c0452ca8ab
5
5
  SHA512:
6
- metadata.gz: c53bfd7e7863d8dcf64967b680d2d7066306c89d62b525da2fbe6c9edb331b5fbcba75036c094084dfd2a57a040acf5906e2a239eb85ad5e6633ca441ebce088
7
- data.tar.gz: a5847c2616d705740565c9b31e4480f201fe5e7cfff1a7e08ab7a629f541867fa90171e3659e52abdf987ccfe209de7ff39033fcc699123f46dd98cf03d67720
6
+ metadata.gz: 5f9613d57ec59d45fd6bf841541949ceb69ff2260540e9d1601e1aa8b380b42027e482ccb1d2cb2dfce23d3dcd3f280e302218413f64f8f86011fcc8a289e55e
7
+ data.tar.gz: d317d455526a50f3ba33e0f32708a0c464f9a9f1090b81b03d7d9758ffb4bcd646bfa7e9950681e3dda3571637e264052583548cd6b7f1051906b52e74f38847
@@ -43,4 +43,28 @@ module ApplicationHelper
43
43
  end
44
44
  super source, options
45
45
  end
46
+
47
+ def include_calendar_headers_tags
48
+ unless @calendar_headers_tags_included
49
+ @calendar_headers_tags_included = true
50
+ content_for :header_tags do
51
+ start_of_week = Setting.start_of_week
52
+ start_of_week = l(:general_first_day_of_week, :default => '1') if start_of_week.blank?
53
+ # Redmine uses 1..7 (monday..sunday) in settings and locales
54
+ # JQuery uses 0..6 (sunday..saturday), 7 needs to be changed to 0
55
+ start_of_week = start_of_week.to_i % 7
56
+
57
+ tags = javascript_tag(
58
+ "var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
59
+ "showOn: 'button', buttonImageOnly: true, buttonImage: '" +
60
+ path_to_image('images/calendar.png') +
61
+ "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};")
62
+ jquery_locale = l('jquery.locale', :default => current_language.to_s)
63
+ unless jquery_locale == 'en'
64
+ tags << javascript_include_tag("i18n/jquery.ui.datepicker-#{jquery_locale}.js")
65
+ end
66
+ tags
67
+ end
68
+ end
69
+ end
46
70
  end
@@ -1,3 +1,3 @@
1
1
  module RedminePluginAssetPipeline
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_plugin_asset_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tab10id
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-07 00:00:00.000000000 Z
11
+ date: 2014-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler