caboose-cms 0.9.19 → 0.9.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/caboose/cart_controller.rb +1 -0
- data/app/controllers/caboose/event_groups_controller.rb +10 -1
- data/app/controllers/caboose/my_account_invoices_controller.rb +5 -3
- data/app/views/caboose/events/admin_edit.html.erb +25 -2
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d65662059d99a76d7ddcd7aec3b7103266bcd7b2
|
4
|
+
data.tar.gz: 5374e50d8d027c0fa0be6296efa79797e426cd03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9719d772e11d46e2de4f9b3cf7ace2d8818b1eb32cee6c7f5aebb2a503ec6029aab1f968d45d62dbea26b054831d17deb5d6d1edd5c79e9645a56480574963a
|
7
|
+
data.tar.gz: ec11cf49c859ea8886ec26afc0801c5873abebd44c2dc5d4f6e56c0eebdfde72319a40554fc8f96bc820a09da6aa32d76f4427a3613f4090ed128fd9b3ac30ee
|
@@ -35,7 +35,16 @@ module Caboose
|
|
35
35
|
resp.success = true
|
36
36
|
render :json => resp
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
|
+
# @route DELETE /admin/event-groups/:id
|
40
|
+
def admin_delete
|
41
|
+
return unless user_is_allowed('calendars', 'delete')
|
42
|
+
CalendarEvent.where(:calendar_event_group_id => params[:id]).destroy_all
|
43
|
+
CalendarEventGroup.find(params[:id]).destroy
|
44
|
+
resp = StdClass.new({ 'redirect' => "/admin/calendars" })
|
45
|
+
render :json => resp
|
46
|
+
end
|
47
|
+
|
39
48
|
# @route GET /admin/event-groups/period-options
|
40
49
|
def admin_period_options
|
41
50
|
render :json => [
|
@@ -176,9 +176,11 @@ module Caboose
|
|
176
176
|
return
|
177
177
|
end
|
178
178
|
|
179
|
-
pdf =
|
180
|
-
pdf
|
181
|
-
|
179
|
+
pdf = @site.store_config.custom_invoice_pdf
|
180
|
+
pdf = "InvoicePdf" if pdf.nil? || pdf.strip.length == 0
|
181
|
+
eval("pdf = #{pdf}.new")
|
182
|
+
pdf.invoice = Invoice.find(params[:id])
|
183
|
+
send_data pdf.to_pdf, :filename => "invoice_#{pdf.invoice.id}.pdf", :type => "application/pdf", :disposition => "inline"
|
182
184
|
end
|
183
185
|
|
184
186
|
# @route GET /my-account/invoices/authnet-relay
|
@@ -48,8 +48,9 @@ g = @event.calendar_event_group
|
|
48
48
|
|
49
49
|
<div id='message'></div>
|
50
50
|
<p>
|
51
|
-
<input type='button' value='Close'
|
52
|
-
<input type='button' value='Delete Event'
|
51
|
+
<input type='button' value='Close' onclick="modal.close();" />
|
52
|
+
<input type='button' value='Delete Event' onclick="delete_event(<%= @event.id %>);" />
|
53
|
+
<input type='button' value='Delete Event Group' onclick="delete_event_group(<%= @event.id %>);" />
|
53
54
|
</p>
|
54
55
|
|
55
56
|
<% content_for :caboose_js do %>
|
@@ -125,6 +126,28 @@ function delete_event(event_id, confirm)
|
|
125
126
|
});
|
126
127
|
}
|
127
128
|
|
129
|
+
function delete_event_group(event_id, confirm)
|
130
|
+
{
|
131
|
+
if (!confirm)
|
132
|
+
{
|
133
|
+
var p = $('<p/>').addClass('note confirm')
|
134
|
+
.append('Are you sure you want to delete the event group? ')
|
135
|
+
.append($('<input/>').attr('type','button').val('Yes').click(function() { delete_event_group(event_id, true); })).append(' ')
|
136
|
+
.append($('<input/>').attr('type','button').val('No').click(function() { $('#message').empty(); }));
|
137
|
+
modal.autosize(p);
|
138
|
+
return;
|
139
|
+
}
|
140
|
+
modal.autosize("<p class='loading'>Deleting event group...</p>");
|
141
|
+
$.ajax({
|
142
|
+
url: '/admin/event-groups/<%= g.id %>',
|
143
|
+
type: 'delete',
|
144
|
+
success: function(resp) {
|
145
|
+
if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>");
|
146
|
+
if (resp.redirect) modal.close();
|
147
|
+
}
|
148
|
+
});
|
149
|
+
}
|
150
|
+
|
128
151
|
function after_all_day_update()
|
129
152
|
{
|
130
153
|
var el = $('#datetime_container');
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|