artfully_ose 1.2.0.pre.27 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +4 -6
  3. data/app/assets/javascripts/application.js +39 -0
  4. data/app/assets/javascripts/boxoffice.js +558 -0
  5. data/app/assets/javascripts/custom/kits-config.js +33 -0
  6. data/app/assets/javascripts/sales-console.js +29 -24
  7. data/app/assets/javascripts/store/store.js +11 -0
  8. data/app/assets/stylesheets/application.sass +66 -52
  9. data/app/assets/stylesheets/bootstrap-overrides.css +1 -1
  10. data/app/assets/stylesheets/boxoffice.css.scss +258 -0
  11. data/app/assets/stylesheets/pages/bootstrap-responsive.css +1109 -0
  12. data/app/assets/stylesheets/sass/store.sass +52 -62
  13. data/app/assets/stylesheets/storefront.css +1 -1
  14. data/app/concerns/itemable.rb +1 -1
  15. data/app/concerns/pdf_generation.rb +1 -11
  16. data/app/concerns/search_by_dates.rb +20 -0
  17. data/app/controllers/events_controller.rb +1 -0
  18. data/app/controllers/export_controller.rb +11 -1
  19. data/app/controllers/imports_controller.rb +2 -3
  20. data/app/controllers/member_cards_controller.rb +2 -3
  21. data/app/controllers/orders_controller.rb +42 -0
  22. data/app/controllers/organizations_controller.rb +1 -0
  23. data/app/controllers/passes_reports_controller.rb +21 -1
  24. data/app/controllers/regular_donation_kits_controller.rb +32 -0
  25. data/app/controllers/store/donations_controller.rb +19 -1
  26. data/app/controllers/store/orders_controller.rb +15 -5
  27. data/app/helpers/artfully_ose_helper.rb +28 -18
  28. data/app/models/database_views/item_view.rb +41 -0
  29. data/app/models/event.rb +10 -2
  30. data/app/models/ext/integrations.rb +5 -0
  31. data/app/models/fee_strategy.rb +47 -1
  32. data/app/models/imports/events_import.rb +6 -7
  33. data/app/models/item.rb +4 -3
  34. data/app/models/job/order_processor.rb +4 -3
  35. data/app/models/kit.rb +18 -0
  36. data/app/models/kits/regular_donation_kit.rb +51 -9
  37. data/app/models/member.rb +4 -3
  38. data/app/models/membership.rb +1 -2
  39. data/app/models/membership_sale_search.rb +2 -20
  40. data/app/models/membership_type.rb +1 -2
  41. data/app/models/order.rb +29 -1
  42. data/app/models/order_handler.rb +4 -3
  43. data/app/models/organization.rb +17 -9
  44. data/app/models/pass.rb +18 -17
  45. data/app/models/pass_sale_search.rb +18 -0
  46. data/app/models/pass_type.rb +7 -2
  47. data/app/models/passes_report.rb +117 -0
  48. data/app/models/sale_search.rb +3 -21
  49. data/app/models/user.rb +1 -2
  50. data/app/serializers/show_serializer.rb +15 -0
  51. data/app/views/contributions/index.html.haml +2 -2
  52. data/app/views/events/_header.html.haml +1 -0
  53. data/app/views/events/_ticket_type_fields.html.haml +31 -15
  54. data/app/views/events/edit.html.haml +6 -1
  55. data/app/views/imports/_export_links.html.haml +3 -0
  56. data/app/views/imports/donations/_pending.html.haml +24 -6
  57. data/app/views/imports/events/_pending.html.haml +16 -5
  58. data/app/views/imports/index.html.haml +6 -4
  59. data/app/views/imports/people/_pending.html.haml +20 -25
  60. data/app/views/layouts/storefront.html.haml +9 -5
  61. data/app/views/order_mailer/confirmation_for.html.haml +11 -5
  62. data/app/views/order_mailer/confirmation_for_refund.html.haml +6 -2
  63. data/app/views/order_mailer/confirmation_for_refund.text.haml +4 -3
  64. data/app/views/orders/membership.html.haml +15 -19
  65. data/app/views/orders/passes.html.haml +97 -0
  66. data/app/views/orders/sales.html.haml +2 -2
  67. data/app/views/organizations/_form.html.haml +4 -37
  68. data/app/views/pass_types/index.html.haml +1 -1
  69. data/app/views/passes_reports/index.html.haml +79 -1
  70. data/app/views/people/show.html.haml +16 -15
  71. data/app/views/regular_donation_kits/edit.html.haml +140 -0
  72. data/app/views/store/checkouts/thanks.html.haml +14 -6
  73. data/app/views/store/donations/index.html.haml +19 -2
  74. data/app/views/store/events/calendar.html.haml +1 -0
  75. data/app/views/store/events/index.html.haml +1 -0
  76. data/app/views/store/events/show.html.haml +1 -0
  77. data/app/views/store/events/single_show.html.haml +2 -0
  78. data/app/views/store/orders/show.html.haml +10 -10
  79. data/app/views/store/passes/index.html.haml +2 -2
  80. data/app/views/store/shared/_donate_form.html.haml +31 -12
  81. data/app/views/store/shared/_small_donate_form.html.haml +22 -0
  82. data/app/views/users/invitations/edit.html.haml +3 -42
  83. data/config/locales/en.yml +3 -1
  84. data/config/routes.rb +4 -1
  85. data/db/migrate/20140603200735_add_subtitle_to_events.rb +5 -0
  86. data/lib/artfully_ose/version.rb +1 -1
  87. data/spec/factories/kit_factories.rb +5 -4
  88. metadata +25 -13
  89. data/app/assets/javascripts/box-office.js +0 -262
@@ -0,0 +1,33 @@
1
+ $(function() {
2
+ var rootContainer = null;
3
+
4
+ // donation kit configuration below
5
+
6
+ if ((rootContainer = $('#edit-donation-kit')).length) {
7
+ var nodeHtml = $('<div>').append($('.new-suggested-gift-container', rootContainer).clone()).html(),
8
+ nodeIdx = parseInt(nodeHtml.match(/\[(\d+)\]/) ? RegExp.$1 : 0);
9
+
10
+ $(document).on('click', '#edit-donation-kit .suggested-gift-remove', function() {
11
+ if (confirm('Are you sure you want to remove this gift level?')) {
12
+ $(this).parents('.suggested-gift-container').first().remove();
13
+ }
14
+ });
15
+
16
+ $(document).on('click', '#edit-donation-kit .suggested-gift-add', function() {
17
+ var lastNode = $('.new-suggested-gift-container').last(),
18
+ amount = parseFloat($('input', lastNode).last().val()) || 0;
19
+
20
+ console.log(lastNode, amount);
21
+
22
+ if (amount) {
23
+ nodeIdx += 1;
24
+
25
+ setTimeout(function() {
26
+ $('a', lastNode).html('Remove').removeClass('suggested-gift-add').addClass('suggested-gift-remove');
27
+ var newHtml = nodeHtml.replace(/\[\d+]/g, '[' + nodeIdx + ']').replace(/_\d+_/g, '_' + nodeIdx + '_');
28
+ lastNode.after(newHtml);
29
+ }, 50);
30
+ }
31
+ })
32
+ }
33
+ });
@@ -12,34 +12,39 @@ $("document").ready(function() {
12
12
  person_query_string = "?person_id=" + person_id
13
13
  }
14
14
 
15
- $('#show-select-container').show()
16
- $('#show-select-controls').addClass("loading")
17
- $('#show_selector').prop("disabled", true)
18
- $('#ticket-list').html("&nbsp;");
19
- jQuery.getJSON("/console_sales/events/" + event_id + person_query_string, function(data){
20
- })
21
- .done(function(data) {
22
- $('#show_selector')
23
- .find('option')
24
- .remove()
25
-
26
- $('#show-select-controls').removeClass("loading")
15
+ if( event_id ) {
27
16
  $('#show-select-container').show()
17
+ $('#show-select-controls').addClass("loading")
18
+ $('#show_selector').prop("disabled", true)
19
+ $('#ticket-list').html("&nbsp;");
28
20
 
29
- $('#show_selector').append($("<option></option>"))
30
-
31
- $.each(data, function(index, el) {
32
- $('#show_selector')
33
- .append($("<option></option>")
34
- .attr("value",el.id)
35
- .text(el.show_time));
21
+ jQuery.getJSON("/console_sales/events/" + event_id + person_query_string, function(data){
36
22
  })
23
+ .done(function(data) {
24
+ $('#show_selector')
25
+ .find('option')
26
+ .remove()
27
+
28
+ $('#show-select-controls').removeClass("loading")
29
+ $('#show-select-container').show()
30
+
31
+ $('#show_selector').append($("<option></option>"))
37
32
 
38
- $('#show_selector').prop("disabled", false)
39
- })
40
- .fail(function() {
41
- //TODO
42
- })
33
+ $.each(data, function(index, el) {
34
+ $('#show_selector')
35
+ .append($("<option></option>")
36
+ .attr("value",el.id)
37
+ .text(el.show_time));
38
+ })
39
+
40
+ $('#show_selector').prop("disabled", false)
41
+ })
42
+ .fail(function() {
43
+ //TODO
44
+ })
45
+ } else {
46
+ $('#show-select-container').hide()
47
+ }
43
48
  })
44
49
 
45
50
  $('#show-select-container').change(function () {
@@ -155,3 +155,14 @@ function hookupToggle() {
155
155
  $(this).parents('.toggle-truncated').find('.truncated, .not-truncated').toggle();
156
156
  });
157
157
  }
158
+
159
+ $('.preset_radio').click(function() {
160
+ $('#donation_amount_fixed').val($(this).val());
161
+ $('#donation_amount').val(null);
162
+ });
163
+
164
+ $('#donation_amount').focus(function() {
165
+ if($('#suggested_gift_42')) {
166
+ $( '#suggested_gift_42' ).prop( "checked", true );
167
+ }
168
+ });
@@ -10,24 +10,24 @@
10
10
 
11
11
  .left
12
12
  float: left
13
-
13
+
14
14
  .clear
15
15
  clear: both
16
16
 
17
17
  ul
18
18
  list-style: none
19
19
  margin-left: 0px
20
-
20
+
21
21
  h1
22
22
  font-size: 2.5em
23
23
  h2
24
24
  margin-bottom: 10px
25
25
  font-size: 2.0em
26
-
26
+
27
27
  h3
28
28
  margin-bottom: 10px
29
29
  font-size: 1.6em
30
-
30
+
31
31
  h4.event-link
32
32
  margin: 0px 0px 2px 0px
33
33
 
@@ -36,10 +36,10 @@ a
36
36
 
37
37
  a.weak
38
38
  font-weight: normal
39
-
39
+
40
40
  #organization-details
41
41
  margin-top: 50px
42
-
42
+
43
43
  #kit-table
44
44
  td.status
45
45
  width: 60px
@@ -51,8 +51,8 @@ a.weak
51
51
  vertical-align: top
52
52
  .kit-type
53
53
  font-weight: bold
54
-
55
- ul#memberships
54
+
55
+ ul#memberships
56
56
  li
57
57
  margin: 0 10px 10px 0px
58
58
  .email
@@ -63,7 +63,7 @@ ul#memberships
63
63
  text-align: center
64
64
  border-radius: 5px
65
65
  moz-border-radius: 5px
66
-
66
+
67
67
  .nav-grav
68
68
  padding-top: 3px
69
69
  border-radius: 5px
@@ -85,7 +85,7 @@ ul#memberships
85
85
  height: 130px
86
86
  width: 130px
87
87
  padding: 2px
88
-
88
+
89
89
  .no-image
90
90
  border-radius: 10px
91
91
  moz-border-radius: 10px
@@ -102,25 +102,31 @@ ul#memberships
102
102
  cursor: pointer
103
103
  p
104
104
  color: #999
105
-
105
+
106
106
  .full
107
107
  width: 100%
108
-
108
+
109
109
  #add-a-description
110
110
  width: 100%
111
111
  height: 150px
112
112
  margin-bottom: 9px
113
113
  #text
114
114
  padding-top: 50px
115
-
115
+
116
116
  #add-a-venue
117
117
  width: 100%
118
118
  height: 150px
119
119
  #text
120
120
  padding-top: 50px
121
121
 
122
- #add-a-pass-type
122
+ #no-pass-sales
123
123
  text-align: center
124
+ width: 100%
125
+ height: 100px
126
+ #text
127
+ padding-top: 25px
128
+
129
+ #add-a-pass-type
124
130
  width: 75%
125
131
  height: 150px
126
132
  #text
@@ -149,15 +155,15 @@ ul#memberships
149
155
  ul#event-list
150
156
  li.event-list-item
151
157
  margin-bottom: 20px
152
-
158
+
153
159
  ul.mini-stats
154
160
  li
155
161
  line-height: 20px
156
-
162
+
157
163
  ul.kv
158
164
  li
159
165
  margin-bottom: 10px
160
-
166
+
161
167
  ul#recent-list
162
168
  li
163
169
  margin-bottom: 10px
@@ -165,7 +171,7 @@ ul#recent-list
165
171
  .recent-activity-text
166
172
  font-size: 14px
167
173
  line-height: 18px
168
-
174
+
169
175
  .quiz-form
170
176
  label.control-label
171
177
  font-size: 1.8em
@@ -174,7 +180,7 @@ ul#recent-list
174
180
  margin-left: 250px
175
181
  .form-actions
176
182
  padding-left: 250px
177
-
183
+
178
184
  .modal
179
185
  display: none
180
186
 
@@ -184,36 +190,39 @@ ul#recent-list
184
190
  .modal-footer form
185
191
  display: inline-block
186
192
  margin: 0
187
-
193
+
194
+ .event-subtitle
195
+ font-weight: normal
196
+
188
197
  #event-header-logo-container
189
198
  text-align: right
190
-
199
+
191
200
  #event-header-logo
192
201
  border-radius: 5px
193
202
  moz-border-radius: 5px
194
-
203
+
195
204
  #storefront-link
196
205
  font-size: 1.5em
197
-
206
+
198
207
  #storefront-text
199
208
  margin-top: 40px
200
209
  font-size: 1.3em
201
-
210
+
202
211
  .section-fields
203
212
  margin-bottom: 40px
204
213
  &.discount-tickets
205
214
  margin-bottom: 50px
206
-
215
+
207
216
  #show-headline
208
217
  background-color: #eee
209
218
  padding: 15px
210
219
  margin-bottom: 15px
211
-
220
+
212
221
  .merge-confirm-block
213
222
  background-color: #eee
214
223
  padding: 15px
215
224
  margin-bottom: 15px
216
-
225
+
217
226
  #merge-arrow
218
227
  text-align: center
219
228
  margin-bottom: 15px
@@ -221,35 +230,35 @@ ul#recent-list
221
230
  #admin #heading
222
231
  h1
223
232
  margin-bottom: 25px
224
-
233
+
225
234
  form.sprited, li.sprited
226
235
  display: none
227
236
 
228
- tr.published form.published,
229
- tr.unpublished form.unpublished,
230
- tr.built form.built,
231
- tr.pending form.pending,
237
+ tr.published form.published,
238
+ tr.unpublished form.unpublished,
239
+ tr.built form.built,
240
+ tr.pending form.pending,
232
241
  tr.destroyable form.destroyable,
233
- ul.published li.published,
234
- ul.unpublished li.unpublished,
235
- ul.built li.built,
236
- ul.pending li.pending,
242
+ ul.published li.published,
243
+ ul.unpublished li.unpublished,
244
+ ul.built li.built,
245
+ ul.pending li.pending,
237
246
  ul.destroyable li.destroyable
238
247
  display: inline
239
248
 
240
249
  tr.unpublished
241
250
  background-color: #EEE
242
-
251
+
243
252
  tr.valign
244
253
  td
245
254
  vertical-align: middle
246
255
 
247
256
  .dialog
248
257
  display: none
249
-
258
+
250
259
  .hidden
251
260
  display: none !important
252
-
261
+
253
262
  #contact-information
254
263
  #image
255
264
  margin-right: 10px
@@ -272,21 +281,21 @@ ul.report
272
281
  tr.returned, tr.refunded, tr.exchanged
273
282
  td.item-description, td.price
274
283
  text-decoration: line-through
275
-
284
+
276
285
  .in-table
277
286
  margin-bottom: 0px
278
287
 
279
288
  table.example-contact
280
289
  .field
281
290
  font-weight: bold
282
-
291
+
283
292
  tr.no-border
284
293
  td
285
294
  border-top: 0px
286
295
 
287
296
  .label.hidden
288
297
  display: none
289
-
298
+
290
299
  .invisible
291
300
  visibility: hidden
292
301
 
@@ -314,7 +323,7 @@ span.help
314
323
 
315
324
  .tight
316
325
  margin-left: 0px !important
317
-
326
+
318
327
  input.datepicker, input.datetimepicker
319
328
  cursor: pointer
320
329
 
@@ -354,16 +363,16 @@ a.red
354
363
  a.red:hover
355
364
  color: red
356
365
  text-decoration: underline
357
-
366
+
358
367
  .event-icon-container
359
368
  height: 80px
360
-
369
+
361
370
  .bottom-room
362
371
  margin-bottom: 15px
363
-
372
+
364
373
  .btn3
365
374
  width: 150px
366
-
375
+
367
376
  table.docs
368
377
  td.field
369
378
  width: 200px
@@ -380,7 +389,7 @@ table.docs
380
389
  text-align: center !important
381
390
  .right
382
391
  text-align: right !important
383
-
392
+
384
393
  .headline-caption
385
394
  font-size: 12px
386
395
  color: #999
@@ -389,7 +398,7 @@ table.docs
389
398
  .headline-stat
390
399
  font-size: 2em
391
400
  font-weight: bold
392
-
401
+
393
402
  // Datepicker Icons
394
403
  .ui-datepicker
395
404
  z-index: 1050 !important
@@ -435,7 +444,7 @@ table.docs
435
444
  color: black
436
445
  p
437
446
  color: black
438
- a
447
+ a
439
448
  color: black
440
449
 
441
450
  .popover.right .popover-content, .popover.right .popover-title
@@ -443,7 +452,7 @@ table.docs
443
452
 
444
453
  .badge-big
445
454
  font-size: 30px
446
-
455
+
447
456
  a.artfully-tooltip, a.artfully-tooltip:hover
448
457
  text-decoration: none
449
458
 
@@ -734,10 +743,11 @@ p.alternate_form_link
734
743
  margin-bottom: .5em
735
744
  color: #9d2235
736
745
 
737
- #edit-membership-kit
746
+ #edit-membership-kit, #edit-donation-kit
738
747
  label
739
748
  font-weight: bold
740
749
 
750
+
741
751
  .bordered-section
742
752
  border-bottom: 1px solid #ACACAE
743
753
 
@@ -747,6 +757,10 @@ p.alternate_form_link
747
757
  margin-bottom: 5px
748
758
  padding-top: 5px
749
759
 
760
+ .btn-add-preset-amount
761
+ margin-top: -10px
762
+ margin-left: 9px
763
+
750
764
  .flat-button
751
765
  background-image: none
752
766