tb_events 1.1.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +13 -1
  3. data/Rakefile +2 -2
  4. data/app/assets/javascripts/admin/events/application.js +16 -0
  5. data/app/assets/javascripts/{calendar_events.js → admin/events/calendar_events.js} +0 -0
  6. data/app/assets/javascripts/{spud/admin → admin/events}/calendars.js +0 -0
  7. data/app/assets/stylesheets/admin/events/application.css +4 -0
  8. data/app/assets/{javascripts/spud/events.js → stylesheets/admin/events/calendar_events.css} +0 -0
  9. data/app/assets/stylesheets/{spud → admin/events}/calendars.css +23 -28
  10. data/app/controllers/admin/calendar_events_controller.rb +13 -15
  11. data/app/controllers/admin/calendars_controller.rb +9 -11
  12. data/app/controllers/calendar_events_controller.rb +12 -6
  13. data/app/controllers/calendars_controller.rb +18 -18
  14. data/app/helpers/admin/calendars_helper.rb +6 -8
  15. data/app/helpers/calendars_helper.rb +66 -35
  16. data/app/models/spud_calendar.rb +30 -2
  17. data/app/models/spud_calendar_event.rb +1 -18
  18. data/app/models/spud_events/calendar_event_model.rb +31 -0
  19. data/app/views/admin/calendar_events/_calendar.html.erb +16 -11
  20. data/app/views/admin/calendar_events/_form.html.erb +16 -98
  21. data/app/views/admin/calendar_events/index.html.erb +24 -16
  22. data/app/views/admin/calendars/_calendar_legend.html.erb +5 -4
  23. data/app/views/admin/calendars/_form.html.erb +4 -19
  24. data/app/views/calendar_events/index.html.erb +22 -0
  25. data/app/views/calendar_events/show.html.erb +3 -1
  26. data/app/views/calendars/show.html.erb +18 -15
  27. data/config/locales/en.yml +9 -0
  28. data/config/routes.rb +7 -10
  29. data/db/migrate/20120216191833_create_spud_calendars.rb +3 -3
  30. data/db/migrate/20120216192531_create_spud_calendar_events.rb +1 -1
  31. data/db/migrate/20130214131628_add_location_to_spud_calendar_event.rb +1 -1
  32. data/db/migrate/20140723203144_add_identifier_to_spud_calendars.rb +6 -0
  33. data/db/migrate/20140730182213_remove_color_from_spud_calendars.rb +9 -0
  34. data/lib/spud_events/calendar_builder.rb +53 -0
  35. data/lib/spud_events/configuration.rb +6 -0
  36. data/lib/spud_events/engine.rb +25 -0
  37. data/lib/spud_events/version.rb +3 -0
  38. data/lib/tb_events.rb +4 -4
  39. metadata +62 -110
  40. data/app/assets/javascripts/calendars.js +0 -2
  41. data/app/assets/javascripts/spud/admin/calendar_events.js +0 -2
  42. data/app/assets/javascripts/spud/admin/events.js +0 -51
  43. data/app/assets/lib/colorpicker/colorpicker.css +0 -164
  44. data/app/assets/lib/colorpicker/colorpicker.js +0 -484
  45. data/app/assets/lib/colorpicker/images/blank.gif +0 -0
  46. data/app/assets/lib/colorpicker/images/colorpicker_background.png +0 -0
  47. data/app/assets/lib/colorpicker/images/colorpicker_hex.png +0 -0
  48. data/app/assets/lib/colorpicker/images/colorpicker_hsb_b.png +0 -0
  49. data/app/assets/lib/colorpicker/images/colorpicker_hsb_h.png +0 -0
  50. data/app/assets/lib/colorpicker/images/colorpicker_hsb_s.png +0 -0
  51. data/app/assets/lib/colorpicker/images/colorpicker_indic.gif +0 -0
  52. data/app/assets/lib/colorpicker/images/colorpicker_overlay.png +0 -0
  53. data/app/assets/lib/colorpicker/images/colorpicker_rgb_b.png +0 -0
  54. data/app/assets/lib/colorpicker/images/colorpicker_rgb_g.png +0 -0
  55. data/app/assets/lib/colorpicker/images/colorpicker_rgb_r.png +0 -0
  56. data/app/assets/lib/colorpicker/images/colorpicker_select.gif +0 -0
  57. data/app/assets/lib/colorpicker/images/colorpicker_submit.png +0 -0
  58. data/app/assets/lib/colorpicker/images/custom_background.png +0 -0
  59. data/app/assets/lib/colorpicker/images/custom_hex.png +0 -0
  60. data/app/assets/lib/colorpicker/images/custom_hsb_b.png +0 -0
  61. data/app/assets/lib/colorpicker/images/custom_hsb_h.png +0 -0
  62. data/app/assets/lib/colorpicker/images/custom_hsb_s.png +0 -0
  63. data/app/assets/lib/colorpicker/images/custom_indic.gif +0 -0
  64. data/app/assets/lib/colorpicker/images/custom_rgb_b.png +0 -0
  65. data/app/assets/lib/colorpicker/images/custom_rgb_g.png +0 -0
  66. data/app/assets/lib/colorpicker/images/custom_rgb_r.png +0 -0
  67. data/app/assets/lib/colorpicker/images/custom_submit.png +0 -0
  68. data/app/assets/lib/colorpicker/images/select.png +0 -0
  69. data/app/assets/lib/colorpicker/images/select2.png +0 -0
  70. data/app/assets/lib/colorpicker/images/slider.png +0 -0
  71. data/app/assets/stylesheets/spud/admin/events.css +0 -16
  72. data/app/assets/stylesheets/spud/calendar_events.css +0 -18
  73. data/app/assets/stylesheets/spud/events.css +0 -4
  74. data/app/views/calendars/_calendar.html.erb +0 -26
  75. data/app/views/calendars/_calendar_options.html.erb +0 -4
  76. data/config/application.rb +0 -50
  77. data/config/boot.rb +0 -6
  78. data/lib/spud/events/calendar.rb +0 -85
  79. data/lib/spud/events/calendar_builder.rb +0 -58
  80. data/lib/spud/events/configuration.rb +0 -8
  81. data/lib/spud/events/engine.rb +0 -26
  82. data/lib/spud/events/table_builder.rb +0 -88
  83. data/lib/spud/events/version.rb +0 -5
@@ -1,4 +1,4 @@
1
- class AddLocationToSpudCalendarEvent < ActiveRecord::Migration
1
+ class AddLocationToSpudCalendarEvent < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :spud_calendar_events, :location, :string
4
4
  add_column :spud_calendar_events, :address, :string
@@ -0,0 +1,6 @@
1
+ class AddIdentifierToSpudCalendars < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :spud_calendars, :identifier, :string
4
+ add_index :spud_calendars, :identifier
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ class RemoveColorFromSpudCalendars < ActiveRecord::Migration[4.2]
2
+ def up
3
+ remove_column :spud_calendars, :color
4
+ end
5
+
6
+ def down
7
+ add_column :spud_calendars, :color, 'binary(6)'
8
+ end
9
+ end
@@ -0,0 +1,53 @@
1
+ class SpudEvents::CalendarBuilder
2
+ DEFAULT_HEADERS = %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)
3
+ START_DAY = :sunday
4
+
5
+ delegate :content_tag, to: :view
6
+ attr_accessor :view, :date, :callback
7
+
8
+ def initialize(view, date, opts)
9
+ @view = view
10
+ @date = date
11
+ @headers = opts.delete(:headers) || DEFAULT_HEADERS
12
+ end
13
+
14
+ def table(&block)
15
+ @callback = block
16
+ content_tag :table, class: 'calendar' do
17
+ header + week_rows
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ def header
24
+ content_tag :tr do
25
+ @headers.map { |day| content_tag :th, day, class: 'day-header' }.join.html_safe
26
+ end
27
+ end
28
+
29
+ def week_rows
30
+ weeks.map do |week|
31
+ content_tag :tr do
32
+ week.map { |day| day_cell(day) }.join.html_safe
33
+ end
34
+ end.join.html_safe
35
+ end
36
+
37
+ def day_cell(day)
38
+ content_tag :td, view.capture(day, &callback), :class => day_classes(day), 'data-date' => day.strftime('%F')
39
+ end
40
+
41
+ def day_classes(day)
42
+ classes = ['day-cell']
43
+ classes << 'today' if day == Date.today
44
+ classes << 'not-month' if day.month != date.month
45
+ classes.empty? ? nil : classes.join(' ')
46
+ end
47
+
48
+ def weeks
49
+ first = date.beginning_of_month.beginning_of_week(START_DAY)
50
+ last = date.end_of_month.end_of_week(START_DAY)
51
+ (first..last).to_a.in_groups_of(7)
52
+ end
53
+ end
@@ -0,0 +1,6 @@
1
+ module SpudEvents
2
+ include ActiveSupport::Configurable
3
+ config_accessor :content_for, :calendar_layout
4
+ self.content_for = nil
5
+ self.calendar_layout = nil
6
+ end
@@ -0,0 +1,25 @@
1
+ require 'tb_core'
2
+
3
+ module SpudEvents
4
+ class Engine < Rails::Engine
5
+ require "#{root}/lib/spud_events/calendar_builder"
6
+
7
+ engine_name :tb_events
8
+ config.autoload_paths << "#{root}/lib"
9
+
10
+ initializer :admin do
11
+ TbCore.configure do |config|
12
+ config.admin_applications += [{ name: 'Events', thumbnail: 'spud/admin/events_thumb.png', url: '/admin/events', order: 10 }]
13
+ end
14
+ end
15
+
16
+ initializer :assets do |_config|
17
+ TbCore.append_admin_stylesheets('admin/events/application')
18
+ TbCore.append_admin_javascripts('admin/events/application')
19
+ end
20
+
21
+ initializer 'tb_events.assets' do
22
+ Rails.application.config.assets.precompile += ['spud/admin/events_thumb.png']
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,3 @@
1
+ module SpudEvents
2
+ VERSION = '1.3.1'
3
+ end
@@ -1,6 +1,6 @@
1
1
  module Spud
2
- module Events
3
- require 'spud/events/configuration'
4
- require 'spud/events/engine' if defined?(Rails)
5
- end
2
+ module Events
3
+ require 'spud_events/configuration'
4
+ require 'spud_events/engine' if defined?(Rails)
5
+ end
6
6
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
- - Westlake Design
8
- autorequire:
7
+ - Moser Consulting
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-23 00:00:00.000000000 Z
11
+ date: 2021-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: 5.0.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: 5.0.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tb_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.2'
33
+ version: '1.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.2'
40
+ version: '1.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mysql2
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,107 +52,93 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '='
60
- - !ruby/object:Gem::Version
61
- version: 2.8.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '='
67
- - !ruby/object:Gem::Version
68
- version: 2.8.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rspec-rails
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - '='
59
+ - - ">="
74
60
  - !ruby/object:Gem::Version
75
- version: 2.8.1
61
+ version: '0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - '='
66
+ - - ">="
81
67
  - !ruby/object:Gem::Version
82
- version: 2.8.1
68
+ version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
- name: shoulda
70
+ name: rails-controller-testing
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - "~>"
73
+ - - ">="
88
74
  - !ruby/object:Gem::Version
89
- version: 3.0.1
75
+ version: '0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - "~>"
80
+ - - ">="
95
81
  - !ruby/object:Gem::Version
96
- version: 3.0.1
82
+ version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
- name: factory_girl
84
+ name: factory_bot_rails
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - '='
87
+ - - ">="
102
88
  - !ruby/object:Gem::Version
103
- version: 2.5.0
89
+ version: '0'
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - '='
94
+ - - ">="
109
95
  - !ruby/object:Gem::Version
110
- version: 2.5.0
96
+ version: '0'
111
97
  - !ruby/object:Gem::Dependency
112
- name: mocha
98
+ name: database_cleaner
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - '='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
- version: 0.10.3
103
+ version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - '='
108
+ - - ">="
123
109
  - !ruby/object:Gem::Version
124
- version: 0.10.3
110
+ version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
- name: database_cleaner
112
+ name: simplecov
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
- - - '='
115
+ - - ">="
130
116
  - !ruby/object:Gem::Version
131
- version: 1.0.0.RC1
117
+ version: '0'
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
- - - '='
122
+ - - ">="
137
123
  - !ruby/object:Gem::Version
138
- version: 1.0.0.RC1
124
+ version: '0'
139
125
  - !ruby/object:Gem::Dependency
140
- name: simplecov
126
+ name: rubocop
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - "~>"
129
+ - - ">="
144
130
  - !ruby/object:Gem::Version
145
- version: 0.6.4
131
+ version: '0'
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - "~>"
136
+ - - ">="
151
137
  - !ruby/object:Gem::Version
152
- version: 0.6.4
153
- description:
138
+ version: '0'
139
+ description:
154
140
  email:
155
- - greg@westlakedesign.com
141
+ - greg.woods@moserit.com
156
142
  executables: []
157
143
  extensions: []
158
144
  extra_rdoc_files: []
@@ -160,44 +146,12 @@ files:
160
146
  - README.md
161
147
  - Rakefile
162
148
  - app/assets/images/spud/admin/events_thumb.png
163
- - app/assets/javascripts/calendar_events.js
164
- - app/assets/javascripts/calendars.js
165
- - app/assets/javascripts/spud/admin/calendar_events.js
166
- - app/assets/javascripts/spud/admin/calendars.js
167
- - app/assets/javascripts/spud/admin/events.js
168
- - app/assets/javascripts/spud/events.js
169
- - app/assets/lib/colorpicker/colorpicker.css
170
- - app/assets/lib/colorpicker/colorpicker.js
171
- - app/assets/lib/colorpicker/images/blank.gif
172
- - app/assets/lib/colorpicker/images/colorpicker_background.png
173
- - app/assets/lib/colorpicker/images/colorpicker_hex.png
174
- - app/assets/lib/colorpicker/images/colorpicker_hsb_b.png
175
- - app/assets/lib/colorpicker/images/colorpicker_hsb_h.png
176
- - app/assets/lib/colorpicker/images/colorpicker_hsb_s.png
177
- - app/assets/lib/colorpicker/images/colorpicker_indic.gif
178
- - app/assets/lib/colorpicker/images/colorpicker_overlay.png
179
- - app/assets/lib/colorpicker/images/colorpicker_rgb_b.png
180
- - app/assets/lib/colorpicker/images/colorpicker_rgb_g.png
181
- - app/assets/lib/colorpicker/images/colorpicker_rgb_r.png
182
- - app/assets/lib/colorpicker/images/colorpicker_select.gif
183
- - app/assets/lib/colorpicker/images/colorpicker_submit.png
184
- - app/assets/lib/colorpicker/images/custom_background.png
185
- - app/assets/lib/colorpicker/images/custom_hex.png
186
- - app/assets/lib/colorpicker/images/custom_hsb_b.png
187
- - app/assets/lib/colorpicker/images/custom_hsb_h.png
188
- - app/assets/lib/colorpicker/images/custom_hsb_s.png
189
- - app/assets/lib/colorpicker/images/custom_indic.gif
190
- - app/assets/lib/colorpicker/images/custom_rgb_b.png
191
- - app/assets/lib/colorpicker/images/custom_rgb_g.png
192
- - app/assets/lib/colorpicker/images/custom_rgb_r.png
193
- - app/assets/lib/colorpicker/images/custom_submit.png
194
- - app/assets/lib/colorpicker/images/select.png
195
- - app/assets/lib/colorpicker/images/select2.png
196
- - app/assets/lib/colorpicker/images/slider.png
197
- - app/assets/stylesheets/spud/admin/events.css
198
- - app/assets/stylesheets/spud/calendar_events.css
199
- - app/assets/stylesheets/spud/calendars.css
200
- - app/assets/stylesheets/spud/events.css
149
+ - app/assets/javascripts/admin/events/application.js
150
+ - app/assets/javascripts/admin/events/calendar_events.js
151
+ - app/assets/javascripts/admin/events/calendars.js
152
+ - app/assets/stylesheets/admin/events/application.css
153
+ - app/assets/stylesheets/admin/events/calendar_events.css
154
+ - app/assets/stylesheets/admin/events/calendars.css
201
155
  - app/controllers/admin/calendar_events_controller.rb
202
156
  - app/controllers/admin/calendars_controller.rb
203
157
  - app/controllers/calendar_events_controller.rb
@@ -207,6 +161,7 @@ files:
207
161
  - app/helpers/calendars_helper.rb
208
162
  - app/models/spud_calendar.rb
209
163
  - app/models/spud_calendar_event.rb
164
+ - app/models/spud_events/calendar_event_model.rb
210
165
  - app/views/admin/calendar_events/_calendar.html.erb
211
166
  - app/views/admin/calendar_events/_form.html.erb
212
167
  - app/views/admin/calendar_events/edit.html.erb
@@ -216,27 +171,25 @@ files:
216
171
  - app/views/admin/calendars/_form.html.erb
217
172
  - app/views/admin/calendars/edit.html.erb
218
173
  - app/views/admin/calendars/new.html.erb
174
+ - app/views/calendar_events/index.html.erb
219
175
  - app/views/calendar_events/show.html.erb
220
- - app/views/calendars/_calendar.html.erb
221
- - app/views/calendars/_calendar_options.html.erb
222
176
  - app/views/calendars/show.html.erb
223
- - config/application.rb
224
- - config/boot.rb
177
+ - config/locales/en.yml
225
178
  - config/routes.rb
226
179
  - db/migrate/20120216191833_create_spud_calendars.rb
227
180
  - db/migrate/20120216192531_create_spud_calendar_events.rb
228
181
  - db/migrate/20130214131628_add_location_to_spud_calendar_event.rb
229
- - lib/spud/events/calendar.rb
230
- - lib/spud/events/calendar_builder.rb
231
- - lib/spud/events/configuration.rb
232
- - lib/spud/events/engine.rb
233
- - lib/spud/events/table_builder.rb
234
- - lib/spud/events/version.rb
182
+ - db/migrate/20140723203144_add_identifier_to_spud_calendars.rb
183
+ - db/migrate/20140730182213_remove_color_from_spud_calendars.rb
184
+ - lib/spud_events/calendar_builder.rb
185
+ - lib/spud_events/configuration.rb
186
+ - lib/spud_events/engine.rb
187
+ - lib/spud_events/version.rb
235
188
  - lib/tb_events.rb
236
- homepage:
189
+ homepage:
237
190
  licenses: []
238
191
  metadata: {}
239
- post_install_message:
192
+ post_install_message:
240
193
  rdoc_options: []
241
194
  require_paths:
242
195
  - lib
@@ -251,9 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
204
  - !ruby/object:Gem::Version
252
205
  version: '0'
253
206
  requirements: []
254
- rubyforge_project:
255
- rubygems_version: 2.2.1
256
- signing_key:
207
+ rubygems_version: 3.0.8
208
+ signing_key:
257
209
  specification_version: 4
258
210
  summary: Twice Baked Events engine
259
211
  test_files: []
@@ -1,2 +0,0 @@
1
- // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
@@ -1,2 +0,0 @@
1
- // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
@@ -1,51 +0,0 @@
1
- //= require colorpicker/colorpicker
2
- //= require_self
3
-
4
- var Spud = Spud || {};
5
- Spud.Admin = Spud.Admin || {};
6
-
7
- Spud.Admin.Events = new function(){
8
- var self = this;
9
-
10
- self.init = function(){
11
- // Wd.Admin.tinyMce();
12
- self.configureColorPicker();
13
- self.attachCalendarDeleteFX();
14
- };
15
-
16
- self.configureColorPicker = function(){
17
- var $colorPickers = $('.spud_events_admin_color_picker'),
18
- $calendarColor = $('#spud_calendar_color');
19
-
20
- if($colorPickers.size() > 0) {
21
- $colorPickers.css('backgroundColor', '#' + $calendarColor.val());
22
- $colorPickers.ColorPicker({
23
- color: $calendarColor.val(),
24
- onShow: function (colpkr) {
25
- $(colpkr).fadeIn(500);
26
- return false;
27
- },
28
- onHide: function (colpkr) {
29
- $(colpkr).fadeOut(500);
30
- return false;
31
- },
32
- onChange: function (hsb, hex, rgb) {
33
-
34
- $colorPickers.css('backgroundColor', '#' + hex);
35
- $calendarColor.attr('value', hex);
36
- }
37
- });
38
- }
39
- };
40
-
41
- self.attachCalendarDeleteFX = function() {
42
- $(document).on('ajax:succes','.js-spud-calendar-delete-action', function() {
43
- $(this).closest('.spud_events_admin_calendar_legend_item').fadeOut(500, function(){ $(this).remove(); });
44
- });
45
- };
46
- };
47
-
48
- $(function() {
49
- Spud.Admin.Events.init();
50
- });
51
-