recurring_select 1.2.3 → 1.2.4

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: 2d6811c1d970a7347d2b3db5490ef4a776771766
4
- data.tar.gz: ac3c1d777659f05c4e2fcc3131db38bbfb89096a
3
+ metadata.gz: fab37d1e22d29ea0e11bf7cd8fa8029c0d82ffae
4
+ data.tar.gz: 91ffdeb1a1501631d6c59a722e8716921b15c980
5
5
  SHA512:
6
- metadata.gz: 84a850889df14f127ad26cf13b03ea290ff550a8014dba97e92ad284e12fd513eb79dfebc3364e737fb9b068820724a1f900ca7ef3edbca4b3137deea15a2f06
7
- data.tar.gz: fe19f108eac6441f5f32ce48a61eb27c060db90f633c990876a5480426e43d8daef9a84ae04132fb4387833446453bae272059f37ebca5fcb69212e666b40051
6
+ metadata.gz: a4a0c849ab6538a1b6ca9f23170b9796b73b7cfeca34b7d1785a417d536cf457d35752c716e81ea720d8e63a9e7946acff14494bf40c78efc084ac184d878f29
7
+ data.tar.gz: 810ed71fa996b7c149e0f3842daa4cda8c2f7ac5d055224ea862bb5f755a4d083107084131a75afb849ada57fa6a03b94dc746cf39922b4d7ab57145d8690a69
data/README.md CHANGED
@@ -99,7 +99,7 @@ You have to translate JavaScript texts too by including the locale file in your
99
99
 
100
100
  For other languages include a JavaScript file like this:
101
101
 
102
- ```javascript
102
+ ```coffeescript
103
103
  $.fn.recurring_select.texts = {
104
104
  repeat: "Repeat"
105
105
  frequency: "Frequency"
@@ -117,8 +117,18 @@ $.fn.recurring_select.texts = {
117
117
  day_of_week: "Day of week"
118
118
  cancel: "Cancel"
119
119
  ok: "OK"
120
- days_first_letter: ["S", "M", "T", "W", "T", "F", "S" ]
121
- order: ["1st", "2nd", "3rd", "4th"]
120
+ days_first_letter: ["S", "M", "T", "W", "T", "F", "S"]
121
+ order: ["1st", "2nd", "3rd", "4th", "5th", "Last"]
122
+ }
123
+ ```
124
+
125
+ Options include:
126
+
127
+ ```coffeescript
128
+ $.fn.recurring_select.options = {
129
+ monthly: {
130
+ show_week: [true, true, true, true, false, false] //display week 1, 2 .... Last
131
+ }
122
132
  }
123
133
  ```
124
134
 
@@ -143,8 +153,8 @@ love to get Jasmine running also, but haven't had time yet.
143
153
  Tests can be ran against different versions of Rails like so:
144
154
 
145
155
  ```
146
- BUNDLE_GEMFILE=spec/gemfiles/Gemfile.rails-3.2.x bundle install
147
- BUNDLE_GEMFILE=spec/gemfiles/Gemfile.rails-3.2.x bundle exec rspec spec
156
+ BUNDLE_GEMFILE=spec/gemfiles/Gemfile.rails-4.0.x bundle install
157
+ BUNDLE_GEMFILE=spec/gemfiles/Gemfile.rails-4.0.x bundle exec rspec spec
148
158
  ```
149
159
 
150
160
  Feel free to open issues or send pull requests.
@@ -73,6 +73,12 @@ $.fn.recurring_select = (method) ->
73
73
  else
74
74
  $.error( "Method #{method} does not exist on jQuery.recurring_select" );
75
75
 
76
+ $.fn.recurring_select.options = {
77
+ monthly: {
78
+ show_week: [true, true, true, true, false, false]
79
+ }
80
+ }
81
+
76
82
  $.fn.recurring_select.texts = {
77
83
  repeat: "Repeat"
78
84
  last_day: "Last Day"
@@ -93,5 +99,6 @@ $.fn.recurring_select.texts = {
93
99
  summary: "Summary"
94
100
  first_day_of_week: 0
95
101
  days_first_letter: ["S", "M", "T", "W", "T", "F", "S" ]
96
- order: ["1st", "2nd", "3rd", "4th"]
102
+ order: ["1st", "2nd", "3rd", "4th", "5th", "Last"]
103
+ show_week: [true, true, true, true, false, false]
97
104
  }
@@ -19,5 +19,6 @@ $.fn.recurring_select.texts = {
19
19
  summary: "Résumé"
20
20
  first_day_of_week: 1
21
21
  days_first_letter: ["D", "L", "M", "M", "J", "V", "S" ]
22
- order: ["1er", "2ème", "3ème", "4ème"]
22
+ order: ["1er", "2ème", "3ème", "4ème", "5ème", "Dernier"]
23
+ show_week: [true, true, true, true, false, false]
23
24
  }
@@ -193,15 +193,17 @@ window.RecurringSelectDialog =
193
193
  monthly_calendar = section.find(".rs_calendar_week")
194
194
  monthly_calendar.html ""
195
195
  row_labels = $.fn.recurring_select.texts["order"]
196
+ show_row = $.fn.recurring_select.options["monthly"]["show_week"]
196
197
  cell_str = $.fn.recurring_select.texts["days_first_letter"]
197
198
 
198
- for num in [1..4]
199
- monthly_calendar.append "<span>#{row_labels[num - 1]}</span>"
200
- for day_of_week in [0..6]
201
- day_link = $("<a>", {text: cell_str[day_of_week]})
202
- day_link.attr("day", day_of_week)
203
- day_link.attr("instance", num)
204
- monthly_calendar.append day_link
199
+ for num, index in [1, 2, 3, 4, 5, -1]
200
+ if show_row[index]
201
+ monthly_calendar.append "<span>#{row_labels[index]}</span>"
202
+ for day_of_week in [0..6]
203
+ day_link = $("<a>", {text: cell_str[day_of_week]})
204
+ day_link.attr("day", day_of_week)
205
+ day_link.attr("instance", num)
206
+ monthly_calendar.append day_link
205
207
  $.each @current_rule.hash.validations.day_of_week, (key, value) ->
206
208
  $.each value, (index, instance) ->
207
209
  section.find("a[day='#{key}'][instance='#{instance}']").addClass("selected")
@@ -1,3 +1,3 @@
1
1
  module RecurringSelect
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurring_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jobber
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-10-01 00:00:00.000000000 Z
13
+ date: 2014-10-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails