clndr-rails 1.2.5.1 → 1.2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +11 -2
- data/lib/clndr-rails.rb +196 -171
- data/lib/clndr-rails/config.rb +48 -34
- data/lib/clndr-rails/engine.rb +1 -0
- data/lib/clndr-rails/errors.rb +1 -0
- data/lib/clndr-rails/helpers.rb +13 -13
- data/lib/clndr-rails/templates.rb +46 -43
- data/lib/clndr-rails/version.rb +1 -1
- data/test/dummy/app/controllers/base_controller.rb +5 -5
- data/test/dummy/app/views/base/index.html.erb +5 -1
- data/test/dummy/config/initializers/clndr.rb +23 -25
- data/test/dummy/log/development (/320/232/320/276/320/275/321/204/320/273/320/270/320/272/321/202/321/203/321/216/321/211/320/260/321/217 /320/272/320/276/320/277/320/270/321/217 /321/201 /320/272/320/276/320/274/320/277/321/214/321/216/321/202/320/265/321/200/320/260 DELTAPC2 2014-12-25).log" +19726 -0
- data/test/dummy/log/development.log +236 -0
- data/test/dummy/log/test.log +12484 -0
- data/test/dummy/spec/rails_helper.rb +2 -2
- data/test/dummy/spec/views/base/index.html.erb_spec.rb +4 -4
- data/test/dummy/test/helpers/base_helper_test.rb +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/003c68cd1f3ba2d6344147bb52d8fd1a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/08b993c8e83ad57a4ecb8d753b4620d5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1d658adc7cb09c209c423c9138dbacee +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/28cfd59c37a42a9ea808d622b0177c86 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4ad6cd41e5b645f9ceef10b1e3baea77 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6c33e774b86f9ef5ba24ffbe52bed674 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7b51783beb0f6f17617f87ef5d2688e3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9334f44096c23e8904784b524e6ae750 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/954c1c7328e5b9c43abd84f4981286c7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9bd8392ddf2b52be4b455e52a628d169 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9c89c900cca1bf92a5f29c304d323256 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9e158358644b7e1cbee43defd7d7b449 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a086b63b827c2bdef684cc4985c925fc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a62be18dea33018456ea9b72b4a9e10b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ad861213dbd41ab02600f740c9bb1dee +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ae0ae68c837285b67a4fc1df4dddb939 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c744c093e347d6c90bc75206f502a48e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cc517e4ba5ef452b08d1ab48925b952d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dc767a0bb27fb390899cd7e6ff34b310 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e59e1f3e795e9486fffbc3b4ad0baaca +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e7296c70ca399cdcc73806b4a9481fde +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -1
- data/test/spec/clnd-rails_spec.rb +29 -0
- data/test/spec/configuration_spec.rb +123 -0
- data/test/spec/events_spec.rb +63 -0
- data/test/spec/html_spec.rb +200 -0
- data/test/spec/rails_helper.rb +0 -0
- data/test/spec/spec_helper.rb +16 -0
- data/test/spec/templates_spec.rb +71 -0
- metadata +54 -3
- data/config/routes.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcfb9af88681840cc8a39d9d5f58419cc23c3cb7
|
4
|
+
data.tar.gz: 6d3638267750032a543e264c8a92f82692007fa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e119b9ce2449950f9ca131068d076a9070db30459a99ca5ffd5efe73dbe58ee22a394f5faf9068c879bb8951722f4deedaad06c67d3a6798bda9d0b504e638be
|
7
|
+
data.tar.gz: 906b7581355652dbcf9b1e38c20cee95969a09bb659076e51992485811030cd0b4275f6d5ae87a06864d3f6294d30b073fa4db6318706305fb62d8a9354140fa
|
data/Rakefile
CHANGED
@@ -1,2 +1,11 @@
|
|
1
|
-
require
|
2
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
|
3
|
+
require 'rake'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
7
|
+
t.pattern = Dir.glob('test/spec/**/*_spec.rb')
|
8
|
+
t.rspec_opts = '--format documentation --color'
|
9
|
+
|
10
|
+
end
|
11
|
+
task :default => :spec
|
data/lib/clndr-rails.rb
CHANGED
@@ -1,171 +1,196 @@
|
|
1
|
-
require 'clndr-rails/engine'
|
2
|
-
require
|
3
|
-
require 'clndr-rails/errors'
|
4
|
-
|
5
|
-
|
6
|
-
require 'momentjs-rails'
|
7
|
-
require 'jquery-rails'
|
8
|
-
require 'underscore-rails'
|
9
|
-
|
10
|
-
class Clndr
|
11
|
-
|
12
|
-
autoload :Helpers, 'clndr-rails/helpers'
|
13
|
-
autoload :Template, 'clndr-rails/templates'
|
14
|
-
require 'clndr-rails/config'
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
include ActionView::
|
19
|
-
include
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
# return calendar from calendars bean
|
27
|
-
def get_calendar(calendar)
|
28
|
-
clndr = @@
|
29
|
-
if clndr.class == Clndr
|
30
|
-
clndr
|
31
|
-
else
|
32
|
-
raise Clndr::Error::CalendarNotFound, "
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
attr_accessor :template, :
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
@
|
46
|
-
@
|
47
|
-
@
|
48
|
-
@
|
49
|
-
@
|
50
|
-
@
|
51
|
-
@
|
52
|
-
@
|
53
|
-
@
|
54
|
-
@
|
55
|
-
@
|
56
|
-
@
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
#{'
|
80
|
-
#{'
|
81
|
-
#{'
|
82
|
-
#{
|
83
|
-
|
84
|
-
|
85
|
-
#{
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
end
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
@
|
132
|
-
end
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
def
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
def
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
1
|
+
require 'clndr-rails/engine'
|
2
|
+
require 'clndr-rails/version'
|
3
|
+
require 'clndr-rails/errors'
|
4
|
+
|
5
|
+
|
6
|
+
require 'momentjs-rails'
|
7
|
+
require 'jquery-rails'
|
8
|
+
require 'underscore-rails'
|
9
|
+
|
10
|
+
class Clndr
|
11
|
+
|
12
|
+
autoload :Helpers, 'clndr-rails/helpers'
|
13
|
+
autoload :Template, 'clndr-rails/templates'
|
14
|
+
require 'clndr-rails/config'
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
include ActionView::Helpers
|
19
|
+
include ActionView::Context
|
20
|
+
include ActiveSupport::Inflector
|
21
|
+
@@calendar_basket = {}
|
22
|
+
cattr_reader :calendar_basket
|
23
|
+
|
24
|
+
class << self
|
25
|
+
|
26
|
+
# return calendar from calendars bean
|
27
|
+
def get_calendar(calendar)
|
28
|
+
clndr = @@calendar_basket[calendar.to_sym]
|
29
|
+
if clndr.class == Clndr
|
30
|
+
clndr
|
31
|
+
else
|
32
|
+
raise Clndr::Error::CalendarNotFound, "Calendar with name #{calendar} not found. Use Clndr.new(:#{calendar}) to create them"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
attr_accessor :template, :week_offset, :days_of_the_week,
|
38
|
+
:show_adjacent_months, :adjacent_days_change_month,
|
39
|
+
:done_rendering, :force_six_rows, :start_with_month
|
40
|
+
attr_reader :name, :events
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
def initialize(name)
|
45
|
+
@name = name.to_sym
|
46
|
+
@template = @@template
|
47
|
+
@week_offset = @@week_offset
|
48
|
+
@start_with_month =@@start_with_month
|
49
|
+
@days_of_the_week = @@days_of_the_week
|
50
|
+
@click_events = @@click_events.clone
|
51
|
+
@targets= @@targets.clone
|
52
|
+
@show_adjacent_months= @@show_adjacent_months
|
53
|
+
@adjacent_days_change_month = @@adjacent_days_change_month
|
54
|
+
@done_rendering = @@done_rendering
|
55
|
+
@constraints =@@constraints
|
56
|
+
@force_six_rows =@@force_six_rows
|
57
|
+
@has_multiday= false
|
58
|
+
@events =[]
|
59
|
+
@@calendar_basket.merge! Hash[@name,self]
|
60
|
+
end
|
61
|
+
|
62
|
+
# return html of calendar
|
63
|
+
def view(args=nil)
|
64
|
+
|
65
|
+
case @template
|
66
|
+
when Clndr::Template::FULL
|
67
|
+
css_class = 'full-clndr-template'
|
68
|
+
when Clndr::Template::MINI
|
69
|
+
css_class = 'mini-clndr-template'
|
70
|
+
when Clndr::Template::SIMPLE
|
71
|
+
css_class = 'simple-clndr-template'
|
72
|
+
else
|
73
|
+
css_class = 'blank-clndr-template'
|
74
|
+
end
|
75
|
+
|
76
|
+
content_tag(:div,nil,args)do
|
77
|
+
content_tag(:div,nil,id:"#{@name}-clndr",class:"clearfix #{css_class}")+
|
78
|
+
javascript_tag("var #{@name} = $('##{@name}-clndr').clndr({
|
79
|
+
#{'template:'+@template+',' unless @template.nil?}
|
80
|
+
#{'weekOffset:'+@week_offset.to_s+',' if @week_offset==1}
|
81
|
+
#{'startWithMonth:\''+@start_with_month.to_s+'\',' unless @start_with_month.nil?}
|
82
|
+
#{'daysOfTheWeek:'+@days_of_the_week.to_s+',' unless @days_of_the_week.nil?}
|
83
|
+
#{build_from_hash(@click_events,'clickEvents')}
|
84
|
+
#{build_from_hash(@targets,'targets',true)}
|
85
|
+
#{'showAdjacentMonths:'+@show_adjacent_months.to_s+',' unless @show_adjacent_months}
|
86
|
+
#{'adjacentDaysChangeMonth:'+@adjacent_days_change_month.to_s+',' if @adjacent_days_change_month}
|
87
|
+
#{'doneRendering:'+@done_rendering+',' unless @done_rendering.nil?}
|
88
|
+
#{'forceSixRows:'+@force_six_rows.to_s+',' if @force_six_rows}
|
89
|
+
#{ if @constraints.length >0
|
90
|
+
build_from_hash @constraints, 'constraints', true
|
91
|
+
end}
|
92
|
+
#{if @has_multiday
|
93
|
+
"multiDayEvents: {
|
94
|
+
startDate: 'startDate',
|
95
|
+
endDate: 'endDate'
|
96
|
+
},"
|
97
|
+
end}
|
98
|
+
#{if @events.length > 0
|
99
|
+
'events:['+build_events+']'
|
100
|
+
end}
|
101
|
+
});".gsub(/\n\s*\n/,"\n"))
|
102
|
+
|
103
|
+
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def week_offset=(boolean)
|
108
|
+
if boolean
|
109
|
+
@week_offset=1
|
110
|
+
else
|
111
|
+
@week_offset =0
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
# if date is instance of Time convert to "YYYY-MM-DD" format
|
116
|
+
def start_with_month=(date)
|
117
|
+
@start_with_month = Clndr.date_format date
|
118
|
+
end
|
119
|
+
|
120
|
+
# access to click_events hash
|
121
|
+
def click_event
|
122
|
+
@click_events
|
123
|
+
end
|
124
|
+
|
125
|
+
# access to targets hash
|
126
|
+
def target
|
127
|
+
@targets
|
128
|
+
end
|
129
|
+
|
130
|
+
def constraints_start
|
131
|
+
@constraints[:startDate]
|
132
|
+
end
|
133
|
+
|
134
|
+
def constraints_start=(date)
|
135
|
+
@constraints[:startDate] = Clndr.date_format date
|
136
|
+
end
|
137
|
+
|
138
|
+
def constraints_end
|
139
|
+
@constraints[:endDate]
|
140
|
+
end
|
141
|
+
|
142
|
+
def constraints_end=(date)
|
143
|
+
@constraints[:endDate] = Clndr.date_format date
|
144
|
+
end
|
145
|
+
|
146
|
+
# add event to events array
|
147
|
+
# *other_data some data for tour access in template
|
148
|
+
def add_event(date,title,*other_data)
|
149
|
+
date = Clndr.date_format date
|
150
|
+
event = {date: date,title:title}
|
151
|
+
event.merge! *other_data if other_data.length>0
|
152
|
+
@events.push event
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
# add multiday event
|
157
|
+
def add_multiday_event(start_date,end_date,title,*other_data)
|
158
|
+
start_date = Clndr.date_format start_date
|
159
|
+
end_date = Clndr.date_format end_date
|
160
|
+
event = {start_date:start_date,end_date:end_date,title:title}
|
161
|
+
event.merge! *other_data if other_data.length >0
|
162
|
+
@has_multiday ||= true
|
163
|
+
@events.push event
|
164
|
+
end
|
165
|
+
|
166
|
+
private
|
167
|
+
|
168
|
+
# build string from hash to parameter
|
169
|
+
# this unsafe method use only for function or true/false value
|
170
|
+
# if you need generate js string (eg param:'some value') use
|
171
|
+
# .build_from_hash_safety
|
172
|
+
def build_from_hash(hash, parameter,safety=false)
|
173
|
+
if hash.length > 0
|
174
|
+
"#{parameter}: {#{hash.map { |k, v| "#{k}:#{'\'' if safety}#{v}#{'\'' if safety}," }.join}},"
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
|
179
|
+
# generate events array from @event
|
180
|
+
def build_events
|
181
|
+
list_of_events=''
|
182
|
+
@events.delete_if do |event|
|
183
|
+
list_of_events +="{
|
184
|
+
#{'date:\''+event.delete(:date)+'\',' unless event[:date].nil?}
|
185
|
+
#{'startDate: \''+event.delete(:start_date)+'\','+
|
186
|
+
'endDate: \'' + event.delete(:end_date)+'\',' unless event[:start_date].nil?}
|
187
|
+
title: '#{event.delete(:title)}',
|
188
|
+
#{event.map{|k,v| "#{k}:'#{v}'"}.join(',')}},".gsub(/\n\s*\n/,"\n")
|
189
|
+
|
190
|
+
end
|
191
|
+
|
192
|
+
# return string with events
|
193
|
+
list_of_events
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
data/lib/clndr-rails/config.rb
CHANGED
@@ -1,8 +1,20 @@
|
|
1
1
|
class Clndr
|
2
2
|
|
3
|
+
# check date to available format
|
4
|
+
# if date is Time instance, convert to available string
|
5
|
+
def self.date_format(date)
|
6
|
+
if date.class == Time
|
7
|
+
date.strftime('%F')
|
8
|
+
elsif date.match(/\d{4}\-\d{2}\-\d{2}/)
|
9
|
+
date
|
10
|
+
else
|
11
|
+
raise Clndr::Error::WrongDateFormat
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
3
15
|
# default config
|
4
|
-
@@template = Clndr::Template::
|
5
|
-
@@
|
16
|
+
@@template = Clndr::Template::BLANK
|
17
|
+
@@week_offset = 1
|
6
18
|
@@start_with_month = nil
|
7
19
|
@@days_of_the_week = nil
|
8
20
|
@@click_events={}
|
@@ -13,9 +25,10 @@ class Clndr
|
|
13
25
|
@@constraints ={}
|
14
26
|
@@force_six_rows= true
|
15
27
|
|
16
|
-
|
17
|
-
|
18
|
-
|
28
|
+
# todo check days of week for 7 length
|
29
|
+
# todo check for available events and targets
|
30
|
+
# rails like config
|
31
|
+
def self.configure
|
19
32
|
yield self
|
20
33
|
end
|
21
34
|
|
@@ -23,36 +36,34 @@ class Clndr
|
|
23
36
|
@@template ||= template
|
24
37
|
end
|
25
38
|
|
26
|
-
def self.
|
39
|
+
def self.week_offset=(offset)
|
40
|
+
|
41
|
+
# convert offset to CLNDR format
|
27
42
|
if offset
|
28
|
-
@@
|
43
|
+
@@week_offset = 1
|
29
44
|
else
|
30
|
-
@@
|
45
|
+
@@week_offset = 0
|
31
46
|
end
|
32
47
|
end
|
33
48
|
|
34
49
|
def self.start_with_month=(date)
|
35
|
-
|
36
|
-
@@start_with_month=date.strftime("%F")
|
37
|
-
elsif date.match(/\d{4}\-\d{2}\-\d{2}/)
|
38
|
-
@@start_with_month = date
|
39
|
-
else
|
40
|
-
raise Clndr::Error::WrongDateFormat
|
41
|
-
end
|
50
|
+
@@start_with_month = date_format date
|
42
51
|
end
|
43
52
|
|
44
|
-
def self.
|
45
|
-
@@
|
53
|
+
def self.days_of_the_week=(array_of_days)
|
54
|
+
@@days_of_the_week=array_of_days
|
46
55
|
end
|
47
56
|
|
48
57
|
def self.show_adjacent_months=(boolean)
|
49
58
|
@@show_adjacent_months = boolean
|
50
59
|
end
|
51
60
|
|
61
|
+
# access to click_events hash
|
52
62
|
def self.click_events
|
53
63
|
yield @@click_events
|
54
64
|
end
|
55
65
|
|
66
|
+
# access to target hash
|
56
67
|
def self.targets
|
57
68
|
yield @@targets
|
58
69
|
end
|
@@ -61,32 +72,35 @@ class Clndr
|
|
61
72
|
@@adjacent_days_change_month= boolean
|
62
73
|
end
|
63
74
|
|
64
|
-
def self.done_rendering=(
|
65
|
-
@@done_rendering =
|
75
|
+
def self.done_rendering=(jsfunction)
|
76
|
+
@@done_rendering = jsfunction
|
66
77
|
end
|
67
78
|
|
68
79
|
def self.constraints_start=(date)
|
69
|
-
|
70
|
-
@@constraints[:startDate]=date.strftime("%F")
|
71
|
-
elsif date.match(/\d{4}\-\d{2}\-\d{2}/)
|
72
|
-
@@constraints[:startDate]=date
|
73
|
-
else
|
74
|
-
raise Clndr::Error::WrongDateFormat
|
75
|
-
end
|
80
|
+
@@constraints[:startDate]= date_format date
|
76
81
|
end
|
77
82
|
|
78
83
|
def self.constraints_end=(date)
|
79
|
-
|
80
|
-
@@constraints[:endDate]=date.strftime("%F")
|
81
|
-
elsif date.match(/\d{4}\-\d{2}\-\d{2}/)
|
82
|
-
@@constraints[:endDate]=date
|
83
|
-
else
|
84
|
-
raise Clndr::Error::WrongDateFormat
|
85
|
-
end
|
84
|
+
@@constraints[:endDate]= date_format date
|
86
85
|
end
|
87
86
|
|
88
|
-
def
|
87
|
+
def self.force_six_rows=(boolean)
|
89
88
|
@@force_six_rows= boolean
|
90
89
|
end
|
91
90
|
|
91
|
+
def self.default_settings
|
92
|
+
@@template = Clndr::Template::BLANK
|
93
|
+
@@week_offset = 1
|
94
|
+
@@start_with_month = nil
|
95
|
+
@@days_of_the_week = nil
|
96
|
+
@@click_events={}
|
97
|
+
@@targets={}
|
98
|
+
@@show_adjacent_months= true
|
99
|
+
@@adjacent_days_change_month=false
|
100
|
+
@@done_rendering=nil
|
101
|
+
@@constraints ={}
|
102
|
+
@@force_six_rows= true
|
103
|
+
self
|
104
|
+
end
|
105
|
+
|
92
106
|
end
|