clndr-rails 1.4.7.1 → 1.4.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clndr-rails/version.rb +1 -1
- data/lib/generators/clndr/clndr_initializer.rb +75 -0
- data/lib/generators/clndr/install_generator.rb +10 -0
- metadata +42 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af6243a86d630a0ab7b92b2ff9c083a65ec3cb31
|
4
|
+
data.tar.gz: 8dbe162c1156d87c0da134dd62c61a1702b3a281
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b47eb639877c517a368f7e2388bc356d9ac7112cf0e2000a402265b45ef273cb07d0c51a64a24ad7d28496e070624808fa5a53f4b15ab04aa9375be1db3cb7d9
|
7
|
+
data.tar.gz: 5ce3d25f6b7f20d87a5c3956f183bfb2db6bd5ed3702fe636aef4133a57a2f9122c58d74900dc03d1621300757e583b4f6536719431db7836b8841c1ea70a5a9
|
data/lib/clndr-rails/version.rb
CHANGED
@@ -0,0 +1,75 @@
|
|
1
|
+
Clndr.configure do |config|
|
2
|
+
|
3
|
+
# you can configure default template, jast use Clndr::Template::<template_name or from_html(selector)>
|
4
|
+
config.template = Clndr::Template::FULL
|
5
|
+
|
6
|
+
# start the week off on Sunday (true), Monday (false)
|
7
|
+
# If you are changing the value ensure you are changing the abbreviation below
|
8
|
+
config.week_offset = true
|
9
|
+
|
10
|
+
# An array of day abbreviation labels for the days
|
11
|
+
config.days_of_the_week =['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
|
12
|
+
|
13
|
+
# determines which month to start with using either a date string in format `YYYY-MM-DD`, instance of `Time` class or `nil` (if use nil Clndr will use current month)
|
14
|
+
config.start_with_month = Time.now
|
15
|
+
|
16
|
+
# Configure callbacks. Get argument string of js function
|
17
|
+
config.click_events do |event|
|
18
|
+
|
19
|
+
# returns a 'target' object containing the DOM element, any events, and the date as a moment.js object.
|
20
|
+
event[:click] = 'function(target){}'
|
21
|
+
|
22
|
+
# fired when a user goes forward a month. returns a moment.js object set to the correct month.
|
23
|
+
event[:nextMonth]= 'function(mont){}'
|
24
|
+
|
25
|
+
# fired when a user goes back a month. returns a moment.js object set to the correct month.
|
26
|
+
event[:previousMonth]= 'function(month){}'
|
27
|
+
|
28
|
+
# fired when a user goes back OR forward a month. returns a moment.js object set to the correct month.
|
29
|
+
event[:onMonthChange]= 'function(month){}'
|
30
|
+
|
31
|
+
# fired when a user goes to the current month/year. returns a moment.js object set to the correct month.
|
32
|
+
event[:today]= 'function(month){}'
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
# the target classnames that CLNDR will look for to bind events. these are the defaults.
|
37
|
+
config.targets do |target|
|
38
|
+
target[:nextButton]='clndr-next-button'
|
39
|
+
target[:previousButton]= 'clndr-previous-button'
|
40
|
+
target[:todayButton]= 'clndr-today-button'
|
41
|
+
target[:day]= 'day'
|
42
|
+
target[:empty]='empty'
|
43
|
+
end
|
44
|
+
|
45
|
+
# show the numbers of days in months adjacent to the current month (and populate them with their events)
|
46
|
+
config.show_adjacent_months= true
|
47
|
+
|
48
|
+
# when days from adjacent months are clicked, switch the current month.
|
49
|
+
# fires nextMonth/previousMonth/onMonthChange click callbacks
|
50
|
+
config.adjacent_days_change_month= true
|
51
|
+
|
52
|
+
# a callback when the calendar is done rendering. This is a good place to bind custom event handlers.
|
53
|
+
config.done_rendering='function(){}' # or nil
|
54
|
+
|
55
|
+
# Set range of dates for calendar
|
56
|
+
# By default dont used
|
57
|
+
|
58
|
+
#config.constraints_start= Time.now
|
59
|
+
#config.constraints_end= Time.now
|
60
|
+
|
61
|
+
# fixed count of calendar rows
|
62
|
+
config.force_six_rows = false
|
63
|
+
|
64
|
+
# setup custom css classes for some calendar elements like day, event etc.
|
65
|
+
# by default empty and use default CLNDR css classes
|
66
|
+
config.classes do |custom_class|
|
67
|
+
custom_class[:today] = "my-today"
|
68
|
+
custom_class[:event] = "my-event"
|
69
|
+
custom_class[:past]= "my-past"
|
70
|
+
custom_class[:lastMonth] = "my-last-month"
|
71
|
+
custom_class[:nextMonth] = "my-next-month"
|
72
|
+
custom_class[:adjacentMonth] = "my-adjacent-month"
|
73
|
+
custom_class[:inactive] = "my-inactive"
|
74
|
+
end
|
75
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clndr-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.7.
|
4
|
+
version: 1.4.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Navin Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -122,6 +122,8 @@ files:
|
|
122
122
|
- lib/clndr-rails/helpers.rb
|
123
123
|
- lib/clndr-rails/templates.rb
|
124
124
|
- lib/clndr-rails/version.rb
|
125
|
+
- lib/generators/clndr/clndr_initializer.rb
|
126
|
+
- lib/generators/clndr/install_generator.rb
|
125
127
|
- test/dummy/README.rdoc
|
126
128
|
- test/dummy/Rakefile
|
127
129
|
- test/dummy/app/assets/javascripts/application.js
|
@@ -198,61 +200,61 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
200
|
version: '0'
|
199
201
|
requirements: []
|
200
202
|
rubyforge_project:
|
201
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.5.1
|
202
204
|
signing_key:
|
203
205
|
specification_version: 4
|
204
206
|
summary: Asset gem for CLNDR.js
|
205
207
|
test_files:
|
206
|
-
- test/
|
207
|
-
- test/
|
208
|
-
- test/
|
209
|
-
- test/
|
210
|
-
- test/
|
211
|
-
- test/
|
212
|
-
- test/
|
213
|
-
- test/dummy/app/helpers/base_helper.rb
|
214
|
-
- test/dummy/app/views/base/index.html.erb
|
215
|
-
- test/dummy/app/views/layouts/application.html.erb
|
216
|
-
- test/dummy/bin/bundle
|
208
|
+
- test/spec/templates_spec.rb
|
209
|
+
- test/spec/spec_helper.rb
|
210
|
+
- test/spec/html_spec.rb
|
211
|
+
- test/spec/configuration_spec.rb
|
212
|
+
- test/spec/clndr-rails_spec.rb
|
213
|
+
- test/spec/rails_helper.rb
|
214
|
+
- test/spec/events_spec.rb
|
217
215
|
- test/dummy/bin/rails
|
218
216
|
- test/dummy/bin/rake
|
219
|
-
- test/dummy/
|
220
|
-
- test/dummy/
|
221
|
-
- test/dummy/
|
222
|
-
- test/dummy/
|
217
|
+
- test/dummy/bin/bundle
|
218
|
+
- test/dummy/spec/spec_helper.rb
|
219
|
+
- test/dummy/spec/controllers/base_controller_spec.rb
|
220
|
+
- test/dummy/spec/rails_helper.rb
|
221
|
+
- test/dummy/spec/helpers/base_helper_spec.rb
|
222
|
+
- test/dummy/spec/views/base/index.html.erb_spec.rb
|
223
|
+
- test/dummy/config/environments/test.rb
|
223
224
|
- test/dummy/config/environments/development.rb
|
224
225
|
- test/dummy/config/environments/production.rb
|
225
|
-
- test/dummy/config/
|
226
|
-
- test/dummy/config/initializers/assets.rb
|
226
|
+
- test/dummy/config/secrets.yml
|
227
227
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
228
|
-
- test/dummy/config/initializers/
|
229
|
-
- test/dummy/config/initializers/cookies_serializer.rb
|
228
|
+
- test/dummy/config/initializers/assets.rb
|
230
229
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
231
230
|
- test/dummy/config/initializers/inflections.rb
|
232
|
-
- test/dummy/config/initializers/
|
231
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
233
232
|
- test/dummy/config/initializers/session_store.rb
|
234
233
|
- test/dummy/config/initializers/wrap_parameters.rb
|
234
|
+
- test/dummy/config/initializers/clndr.rb
|
235
|
+
- test/dummy/config/initializers/mime_types.rb
|
235
236
|
- test/dummy/config/locales/en.yml
|
237
|
+
- test/dummy/config/database.yml
|
236
238
|
- test/dummy/config/routes.rb
|
237
|
-
- test/dummy/config/
|
239
|
+
- test/dummy/config/boot.rb
|
240
|
+
- test/dummy/config/environment.rb
|
241
|
+
- test/dummy/config/application.rb
|
238
242
|
- test/dummy/config.ru
|
243
|
+
- test/dummy/README.rdoc
|
244
|
+
- test/dummy/Rakefile
|
245
|
+
- test/dummy/public/favicon.ico
|
239
246
|
- test/dummy/public/404.html
|
240
|
-
- test/dummy/public/422.html
|
241
247
|
- test/dummy/public/500.html
|
242
|
-
- test/dummy/public/
|
243
|
-
- test/dummy/Rakefile
|
244
|
-
- test/dummy/README.rdoc
|
245
|
-
- test/dummy/spec/controllers/base_controller_spec.rb
|
246
|
-
- test/dummy/spec/helpers/base_helper_spec.rb
|
247
|
-
- test/dummy/spec/rails_helper.rb
|
248
|
-
- test/dummy/spec/spec_helper.rb
|
249
|
-
- test/dummy/spec/views/base/index.html.erb_spec.rb
|
248
|
+
- test/dummy/public/422.html
|
250
249
|
- test/dummy/test/controllers/base_controller_test.rb
|
251
250
|
- test/dummy/test/helpers/base_helper_test.rb
|
252
|
-
- test/
|
253
|
-
- test/
|
254
|
-
- test/
|
255
|
-
- test/
|
256
|
-
- test/
|
257
|
-
- test/
|
258
|
-
- test/
|
251
|
+
- test/dummy/app/assets/stylesheets/base.css
|
252
|
+
- test/dummy/app/assets/stylesheets/application.css
|
253
|
+
- test/dummy/app/assets/javascripts/base.js
|
254
|
+
- test/dummy/app/assets/javascripts/application.js
|
255
|
+
- test/dummy/app/controllers/base_controller.rb
|
256
|
+
- test/dummy/app/controllers/application_controller.rb
|
257
|
+
- test/dummy/app/helpers/application_helper.rb
|
258
|
+
- test/dummy/app/helpers/base_helper.rb
|
259
|
+
- test/dummy/app/views/layouts/application.html.erb
|
260
|
+
- test/dummy/app/views/base/index.html.erb
|