caboose-cms 0.9.228 → 0.9.229
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/caboose/admin.js +1 -1
- data/app/assets/javascripts/caboose/admin_main.js +1 -13
- data/app/assets/javascripts/caboose/admin_media_index.js +161 -158
- data/app/assets/javascripts/caboose/application.js +8 -7
- data/app/assets/javascripts/caboose/block_content_controller_dragdrop.js +60 -4
- data/app/assets/javascripts/caboose/block_modal_controllers/block_dd_modal_controller.js +3 -2
- data/app/assets/javascripts/caboose/block_modal_controllers/media_modal_controller.js +17 -6
- data/app/assets/javascripts/caboose/model/all.js +5 -1
- data/app/assets/stylesheets/caboose/admin_block_edit_image.css.scss +2 -1
- data/app/assets/stylesheets/caboose/admin_edit_page_content_dragdrop.scss +71 -15
- data/app/assets/stylesheets/caboose/admin_main.css.scss +25 -29
- data/app/assets/stylesheets/caboose/admin_media_index.css.scss +26 -5
- data/app/assets/stylesheets/caboose/application.css +11 -5
- data/app/assets/stylesheets/caboose/login.scss +1 -0
- data/app/assets/stylesheets/caboose/model_binder.css +13 -4
- data/app/assets/stylesheets/caboose/page_bar_generator.css +2 -1
- data/app/controllers/caboose/admin_controller.rb +3 -4
- data/app/controllers/caboose/application_controller.rb +16 -19
- data/app/controllers/caboose/block_types_controller.rb +8 -6
- data/app/controllers/caboose/cart_controller.rb +2 -2
- data/app/controllers/caboose/change_logs_controller.rb +13 -0
- data/app/controllers/caboose/fonts_controller.rb +139 -2
- data/app/controllers/caboose/invoices_controller.rb +5 -4
- data/app/controllers/caboose/login_logs_controller.rb +5 -7
- data/app/controllers/caboose/media_categories_controller.rb +16 -2
- data/app/controllers/caboose/media_controller.rb +14 -11
- data/app/controllers/caboose/pages_controller.rb +104 -42
- data/app/controllers/caboose/posts_controller.rb +53 -7
- data/app/controllers/caboose/products_controller.rb +1 -1
- data/app/controllers/caboose/sites_controller.rb +25 -6
- data/app/controllers/caboose/sns_controller.rb +3 -3
- data/app/controllers/caboose/themes_controller.rb +30 -0
- data/app/controllers/caboose/users_controller.rb +17 -10
- data/app/controllers/caboose/variants_controller.rb +9 -9
- data/app/models/caboose/block.rb +98 -22
- data/app/models/caboose/block_type.rb +2 -1
- data/app/models/caboose/block_type_parser.rb +1 -1
- data/app/models/caboose/calendar_event_group.rb +2 -2
- data/app/models/caboose/change_log.rb +97 -0
- data/app/models/caboose/core_plugin.rb +4 -3
- data/app/models/caboose/font.rb +7 -2
- data/app/models/caboose/font_variant.rb +12 -0
- data/app/models/caboose/media.rb +15 -4
- data/app/models/caboose/media_category.rb +2 -4
- data/app/models/caboose/page.rb +316 -45
- data/app/models/caboose/page_bar_generator.rb +20 -10
- data/app/models/caboose/post.rb +108 -8
- data/app/models/caboose/product.rb +1 -1
- data/app/models/caboose/role.rb +2 -2
- data/app/models/caboose/schema.rb +73 -72
- data/app/models/caboose/site.rb +203 -1
- data/app/models/caboose/theme.rb +70 -5
- data/app/views/caboose/block_types/admin_edit.html.erb +6 -8
- data/app/views/caboose/blocks/_cached_block.html.erb +28 -0
- data/app/views/caboose/blocks/_file.html.erb +2 -2
- data/app/views/caboose/blocks/_ga.html.erb +1 -2
- data/app/views/caboose/blocks/_image.html.erb +4 -0
- data/app/views/caboose/blocks/_render_function.html.erb +9 -4
- data/app/views/caboose/change_logs/admin_index.html.erb +65 -0
- data/app/views/caboose/fonts/admin_family_edit.html.erb +63 -0
- data/app/views/caboose/fonts/admin_family_index.html.erb +42 -0
- data/app/views/caboose/fonts/admin_index.html.erb +55 -10
- data/app/views/caboose/fonts/admin_variant_edit.html.erb +84 -0
- data/app/views/caboose/invoices_mailer/customer_status_updated.html.erb +5 -14
- data/app/views/caboose/login_logs/admin_index_for_user.html.erb +1 -1
- data/app/views/caboose/media/admin_index.html.erb +14 -24
- data/app/views/caboose/my_account/index.html.erb +1 -0
- data/app/views/caboose/pages/_admin_header.html.erb +5 -0
- data/app/views/caboose/pages/admin_change_logs.html.erb +56 -0
- data/app/views/caboose/pages/admin_edit_content.html.erb +6 -2
- data/app/views/caboose/pages/admin_edit_general.html.erb +32 -4
- data/app/views/caboose/pages/compiled_asset.css.erb +0 -0
- data/app/views/caboose/pages/compiled_asset.js.erb +0 -0
- data/app/views/caboose/posts/_admin_header.html.erb +5 -0
- data/app/views/caboose/posts/admin_change_logs.html.erb +56 -0
- data/app/views/caboose/posts/admin_delete_form.html.erb +1 -1
- data/app/views/caboose/posts/admin_edit_content.html.erb +6 -2
- data/app/views/caboose/products/admin_group_variants.html.erb +1 -1
- data/app/views/caboose/products/admin_sort.html copy.erb +1 -1
- data/app/views/caboose/sites/admin_edit.html.erb +21 -0
- data/app/views/caboose/sites/compiled_asset.css.erb +0 -0
- data/app/views/caboose/sites/compiled_asset.js.erb +0 -0
- data/app/views/caboose/themes/admin_edit.html.erb +7 -3
- data/app/views/caboose/themes/admin_error_log.html.erb +9 -0
- data/app/views/caboose/themes/admin_js.html.erb +131 -0
- data/app/views/caboose/users/_admin_header.html.erb +4 -0
- data/app/views/caboose/users/admin_change_logs.html.erb +63 -0
- data/app/views/caboose/users/admin_edit_roles.html.erb +1 -0
- data/app/views/caboose/variants/admin_group.html.erb +1 -1
- data/app/views/layouts/caboose/admin.html.erb +9 -2
- data/app/views/layouts/caboose/application.html.erb +62 -92
- data/app/views/layouts/caboose/css.css.erb +44 -0
- data/app/views/layouts/caboose/footer_css.css.erb +41 -0
- data/app/views/layouts/caboose/footer_js.js.erb +31 -0
- data/app/views/layouts/caboose/js.js.erb +34 -0
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +3 -14
- metadata +23 -27
- data/app/controllers/caboose/assets_controller.rb +0 -65
- data/app/models/caboose/asset.rb +0 -23
- data/app/models/caboose/asset_manifest.rb +0 -91
- data/app/models/caboose/block_cache.rb +0 -105
- data/app/models/caboose/block_cache_file.rb +0 -22
- data/app/models/caboose/block_cache_image.rb +0 -53
- data/app/models/caboose/page_cache.rb +0 -12
- data/app/models/caboose/page_cacher.rb +0 -137
- data/app/views/caboose/pages/admin_new_old.html.erb +0 -46
- data/app/views/caboose/pages/test.html.erb +0 -64
@@ -11,7 +11,7 @@ $(document).ready(function() {
|
|
11
11
|
var table = new IndexTable({
|
12
12
|
form_authenticity_token: '<%= form_authenticity_token %>',
|
13
13
|
container: 'login_logs',
|
14
|
-
base_url: '/admin/login-logs',
|
14
|
+
base_url: '/admin/login-logs?user_id=<%= @edituser.id %>',
|
15
15
|
allow_add: false,
|
16
16
|
allow_bulk_import: false,
|
17
17
|
allow_bulk_edit: false,
|
@@ -18,33 +18,23 @@
|
|
18
18
|
<%= javascript_include_tag 'caboose/model/all' %>
|
19
19
|
<%= javascript_include_tag 'caboose/admin_media_index.js' %>
|
20
20
|
<%= javascript_include_tag 'caboose/jquery-ui.drag-multiple.min.js' %>
|
21
|
-
|
22
21
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/plupload/2.1.3/plupload.full.min.js"></script>
|
23
22
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/plupload/2.1.3/jquery.ui.plupload/jquery.ui.plupload.min.js"></script>
|
24
23
|
|
25
|
-
<script type="text/javascript" src="http://feather.aviary.com/imaging/v2/editor.js"></script>
|
26
24
|
<script type="text/javascript">
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
25
|
+
var controller = false;
|
26
|
+
$(document).ready(function() {
|
27
|
+
controller = new MediaController({
|
28
|
+
top_cat_id: <%= raw Caboose.json(@media_category ? @top_media_category.id : false) %>,
|
29
|
+
cat_id: <%= raw Caboose.json(@media_category ? @media_category.id : false) %>,
|
30
|
+
s3_upload_url: '<%= raw @s3_upload_url %>',
|
31
|
+
aws_access_key_id: '<%= raw @aws_access_key_id %>',
|
32
|
+
policy: '<%= raw @policy %>',
|
33
|
+
signature: '<%= raw @signature %>',
|
34
|
+
refresh_unprocessed_images: true,
|
35
|
+
allow_edit: false,
|
36
|
+
assets_path: "<%= Rails.env.production? ? ('https://' + Caboose::cdn_domain + '/assets/') : '/assets/' %>"
|
37
|
+
});
|
40
38
|
});
|
41
|
-
});
|
42
|
-
|
43
39
|
</script>
|
44
|
-
<% end %>
|
45
|
-
|
46
|
-
<%
|
47
|
-
# Adobe Image Editor SDK Credentials
|
48
|
-
# CLIENT SECRETf42be039-1af0-41d8-89bb-fdebdb557d3d
|
49
|
-
# CLIENT ID (DEVELOPMENT MODE)*933414ee42934e8b81d8cd2226a5a13b
|
50
|
-
%>
|
40
|
+
<% end %>
|
@@ -250,5 +250,6 @@ function reset_user_password(pass1, pass2)
|
|
250
250
|
</script>
|
251
251
|
<% end %>
|
252
252
|
<%= content_for :caboose_css do %>
|
253
|
+
<%= stylesheet_link_tag "caboose/model_binder", :media => "all" %>
|
253
254
|
<%= stylesheet_link_tag "caboose/my_account", :media => "all" %>
|
254
255
|
<% end %>
|
@@ -49,6 +49,11 @@ tabs = {
|
|
49
49
|
'Delete Page' => "/admin/pages/#{@page.id}/delete"
|
50
50
|
}
|
51
51
|
|
52
|
+
if @site.use_change_logs && Caboose::ChangeLog.where(:page_id => @page.id).exists? && @logged_in_user.is_allowed('logs','view')
|
53
|
+
arr = tabs.to_a.insert(8, ['Change Logs', "/admin/pages/#{@page.id}/logs"])
|
54
|
+
tabs = Hash[arr]
|
55
|
+
end
|
56
|
+
|
52
57
|
%>
|
53
58
|
<% tabs.each do |text, href| %>
|
54
59
|
<li<%= raw request.fullpath == href ? " class='selected'" : '' %>><a href='<%= href %>'><%= raw text %></a></li>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<%= render :partial => 'caboose/pages/admin_header' %>
|
2
|
+
|
3
|
+
<div style="padding-right:30px;">
|
4
|
+
<table cellpadding="0" cellspacing="0">
|
5
|
+
<thead>
|
6
|
+
<tr>
|
7
|
+
<th>User</th>
|
8
|
+
<th>Date</th>
|
9
|
+
<th>Action</th>
|
10
|
+
<th>Field</th>
|
11
|
+
<th>Old Value</th>
|
12
|
+
<th>New Value</th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<% @logs.each do |log| %>
|
16
|
+
<tr>
|
17
|
+
<td><%= log.user.username %></td>
|
18
|
+
<td><%= log.timestamp.in_time_zone('Central Time (US & Canada)').strftime('%-m/%-d/%y, %l:%M%P') %></td>
|
19
|
+
<td><%= log.describe_action %></td>
|
20
|
+
<td><%= log.description %></td>
|
21
|
+
<td><%== (!log.description.blank? && log.description.include?('Custom Css') || log.description.include?('Custom Js')) || (!log.describe_old.blank? && log.describe_old.include?('</')) ? "<pre>" : "" %><%= log.describe_old %><%== (!log.description.blank? && log.description.include?('Custom Css') || log.description.include?('Custom Js')) || (!log.describe_old.blank? && log.describe_old.include?('</')) ? "</pre>" : "" %></td>
|
22
|
+
<td><%== (!log.description.blank? && log.description.include?('Custom Css') || log.description.include?('Custom Js')) || (!log.describe_new.blank? && log.describe_new.include?('</')) ? "<pre>" : "" %><%= log.describe_new %><%== (!log.description.blank? && log.description.include?('Custom Css') || log.description.include?('Custom Js')) || (!log.describe_new.blank? && log.describe_new.include?('</')) ? "</pre>" : "" %></td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</table>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
|
29
|
+
<% content_for :caboose_css do %>
|
30
|
+
<style>
|
31
|
+
table {
|
32
|
+
width: 100%;
|
33
|
+
}
|
34
|
+
table tr {
|
35
|
+
|
36
|
+
}
|
37
|
+
table td, table th {
|
38
|
+
font-family: "Roboto";
|
39
|
+
font-weight: 300;
|
40
|
+
font-size: 13px;
|
41
|
+
padding: 6px 8px 6px 4px;
|
42
|
+
text-align: left;
|
43
|
+
max-width: 200px;
|
44
|
+
border-bottom: 1px solid #eaeaea;
|
45
|
+
}
|
46
|
+
td pre {
|
47
|
+
overflow: hidden;
|
48
|
+
white-space: pre-line;
|
49
|
+
font-size: 12px;
|
50
|
+
font-family: monospace;
|
51
|
+
}
|
52
|
+
table th {
|
53
|
+
font-weight: bold;
|
54
|
+
}
|
55
|
+
</style>
|
56
|
+
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<% content_for :caboose_css do %>
|
2
2
|
<%= stylesheet_link_tag 'jquery-ui' %>
|
3
3
|
<%= stylesheet_link_tag 'caboose/admin_block_edit_image' %>
|
4
|
+
<%= stylesheet_link_tag "colorbox-rails" %>
|
5
|
+
<%= stylesheet_link_tag 'caboose/model_binder' %>
|
4
6
|
<% if @site && @site.use_dragdrop %>
|
5
7
|
<%= stylesheet_link_tag 'caboose/admin_edit_page_content_dragdrop' %>
|
6
8
|
<% else %>
|
@@ -11,9 +13,11 @@
|
|
11
13
|
<% end %>
|
12
14
|
<% content_for :caboose_js do %>
|
13
15
|
<%= javascript_include_tag 'jquery-ui' %>
|
16
|
+
<%= javascript_include_tag 'colorbox-rails' %>
|
17
|
+
<%= javascript_include_tag 'caboose/modal_integration' %>
|
14
18
|
<%= javascript_include_tag 'caboose/model/all' %>
|
15
19
|
<%= javascript_include_tag 'caboose/jquery-ui.drag-multiple.min.js' %>
|
16
|
-
|
20
|
+
<%# javascript_include_tag "caboose/clipboard" %>
|
17
21
|
<%= javascript_include_tag "caboose/class" %>
|
18
22
|
<%= javascript_include_tag "caboose/modal_controller" %>
|
19
23
|
<% if @site && @site.use_dragdrop %>
|
@@ -46,7 +50,7 @@ $(document).ready(function() {
|
|
46
50
|
.append($('<a/>').attr('href', '/admin/pages').html("< Back"))
|
47
51
|
.append($('<a/>').attr('href', '/admin/pages/<%= @page.id %>/revert').html("Revert"))
|
48
52
|
.append($('<a/>').attr('href', '/pages/preview/<%= @page.id %>').attr('target','_blank').html("Preview"))
|
49
|
-
.append($('<a/>').attr('href', '
|
53
|
+
.append($('<a/>').attr('href', '#').attr('onclick','controller.publish_page();return false;').html("Publish").addClass('pub'))
|
50
54
|
<% if @page.page_custom_field_values.count > 0 %>
|
51
55
|
.append($('<a/>').attr('href', '#').html('Custom Fields').click(function(e) { e.preventDefault(); caboose_modal_url('/admin/pages/<%= @page.id %>/custom-fields'); }))
|
52
56
|
<% end %>
|
@@ -22,18 +22,25 @@
|
|
22
22
|
</div>
|
23
23
|
<% end %>
|
24
24
|
|
25
|
+
<% if @site.use_caching %>
|
26
|
+
<div class='field_with_explanation'>
|
27
|
+
<a href="#" onclick="refresh_cache(<%= @page.id %>, false);return false;" id="refresh">Refresh cache for this page</a>
|
28
|
+
<div id="cmessage"></div>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
|
25
32
|
<%= render :partial => 'caboose/pages/admin_footer' %>
|
26
33
|
|
27
34
|
<% content_for :caboose_css do %>
|
28
35
|
<style>
|
29
|
-
a#promote {
|
36
|
+
a#promote, a#refresh {
|
30
37
|
color: #565daa;
|
31
38
|
font-size: 13px;
|
32
39
|
text-decoration: none;
|
33
40
|
display: inline-block;
|
34
41
|
margin-bottom: 7px;
|
35
42
|
}
|
36
|
-
a#promote:hover {
|
43
|
+
a#promote:hover, a#refresh:hover {
|
37
44
|
text-decoration: underline;
|
38
45
|
}
|
39
46
|
</style>
|
@@ -86,13 +93,13 @@ function promote_page(page_id, confirm)
|
|
86
93
|
if (!confirm)
|
87
94
|
{
|
88
95
|
var p = $('<p/>').addClass('note warning')
|
89
|
-
.append("Are you sure you want to do this? This page will replace the existing homepage. The existing homepage will be hidden but not deleted.")
|
96
|
+
.append("Are you sure you want to do this? This page will replace the existing homepage. The existing homepage will be hidden but not deleted. ")
|
90
97
|
.append($('<input/>').attr('type','button').val('Yes').click(function() { promote_page(page_id, true); })).append(' ')
|
91
98
|
.append($('<input/>').attr('type','button').val('No').click(function() { $('#pmessage').empty(); }));
|
92
99
|
$('#pmessage').empty().append(p);
|
93
100
|
return;
|
94
101
|
}
|
95
|
-
$('#pmessage').empty().html($('<p/>').addClass('loading').html("Promoting page..."));
|
102
|
+
$('#pmessage').empty().html($('<p/>').addClass('note loading').html("Promoting page..."));
|
96
103
|
$.ajax({
|
97
104
|
url: '/admin/pages/' + page_id + '/promote',
|
98
105
|
type: 'put',
|
@@ -103,5 +110,26 @@ function promote_page(page_id, confirm)
|
|
103
110
|
});
|
104
111
|
}
|
105
112
|
|
113
|
+
function refresh_cache(page_id, confirm)
|
114
|
+
{
|
115
|
+
if (!confirm)
|
116
|
+
{
|
117
|
+
var p = $('<p/>').addClass('note warning')
|
118
|
+
.append("Are you sure? ")
|
119
|
+
.append($('<input/>').attr('type','button').val('Yes').click(function() { refresh_cache(page_id, true); })).append(' ')
|
120
|
+
.append($('<input/>').attr('type','button').val('No').click(function() { $('#cmessage').empty(); }));
|
121
|
+
$('#cmessage').empty().append(p);
|
122
|
+
return;
|
123
|
+
}
|
124
|
+
$('#cmessage').empty().html($('<p/>').addClass('note loading').html("Finding blocks to cache..."));
|
125
|
+
$.ajax({
|
126
|
+
url: '/api/pages/' + page_id + '/refresh-cache',
|
127
|
+
type: 'get',
|
128
|
+
success: function(resp) {
|
129
|
+
if (resp.success) $('#cmessage').html("<p class='note success'>Page cache will be refreshed.</p>");
|
130
|
+
}
|
131
|
+
});
|
132
|
+
}
|
133
|
+
|
106
134
|
</script>
|
107
135
|
<% end %>
|
File without changes
|
File without changes
|
@@ -15,6 +15,11 @@ tabs = {
|
|
15
15
|
"/admin/posts/#{@post.id}/delete" => 'Delete Post'
|
16
16
|
}
|
17
17
|
|
18
|
+
if @site.use_change_logs && Caboose::ChangeLog.where(:post_id => @post.id).exists? && @logged_in_user.is_allowed('logs','view')
|
19
|
+
arr = tabs.to_a.insert(4, ["/admin/posts/#{@post.id}/logs", "Change Logs"])
|
20
|
+
tabs = Hash[arr]
|
21
|
+
end
|
22
|
+
|
18
23
|
%>
|
19
24
|
<% tabs.each do |href,text| %>
|
20
25
|
<li<%= raw request.fullpath == href ? " class='selected'" : '' %>><a href='<%= href %>'><%= raw text %></a></li>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<%= render :partial => 'caboose/posts/admin_header' %>
|
2
|
+
|
3
|
+
<div style="padding-right:30px;">
|
4
|
+
<table cellpadding="0" cellspacing="0">
|
5
|
+
<thead>
|
6
|
+
<tr>
|
7
|
+
<th>User</th>
|
8
|
+
<th>Date</th>
|
9
|
+
<th>Action</th>
|
10
|
+
<th>Field</th>
|
11
|
+
<th>Old Value</th>
|
12
|
+
<th>New Value</th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<% @logs.each do |log| %>
|
16
|
+
<tr>
|
17
|
+
<td><%= log.user.username %></td>
|
18
|
+
<td><%= log.timestamp.in_time_zone('Central Time (US & Canada)').strftime('%-m/%-d/%y, %l:%M%P') %></td>
|
19
|
+
<td><%= log.describe_action %></td>
|
20
|
+
<td><%= log.description %></td>
|
21
|
+
<td><%== !log.describe_old.blank? && log.describe_old.include?('</') ? "<pre>" : "" %><%= log.describe_old %><%== !log.describe_old.blank? && log.describe_old.include?('</') ? "</pre>" : "" %></td>
|
22
|
+
<td><%== !log.describe_new.blank? && log.describe_new.include?('</') ? "<pre>" : "" %><%= log.describe_new %><%== !log.describe_new.blank? && log.describe_new.include?('</') ? "</pre>" : "" %></td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</table>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
|
29
|
+
<% content_for :caboose_css do %>
|
30
|
+
<style>
|
31
|
+
table {
|
32
|
+
width: 100%;
|
33
|
+
}
|
34
|
+
table tr {
|
35
|
+
|
36
|
+
}
|
37
|
+
table td, table th {
|
38
|
+
font-family: "Roboto";
|
39
|
+
font-weight: 300;
|
40
|
+
font-size: 13px;
|
41
|
+
padding: 6px 8px 6px 4px;
|
42
|
+
text-align: left;
|
43
|
+
max-width: 200px;
|
44
|
+
border-bottom: 1px solid #eaeaea;
|
45
|
+
}
|
46
|
+
td pre {
|
47
|
+
overflow: hidden;
|
48
|
+
white-space: pre-line;
|
49
|
+
font-size: 12px;
|
50
|
+
font-family: monospace;
|
51
|
+
}
|
52
|
+
table th {
|
53
|
+
font-weight: bold;
|
54
|
+
}
|
55
|
+
</style>
|
56
|
+
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<% content_for :caboose_css do %>
|
2
2
|
<%= stylesheet_link_tag 'jquery-ui' %>
|
3
3
|
<%= stylesheet_link_tag 'caboose/admin_block_edit_image' %>
|
4
|
+
<%= stylesheet_link_tag "colorbox-rails" %>
|
5
|
+
<%= stylesheet_link_tag 'caboose/model_binder' %>
|
4
6
|
<% if @site && @site.use_dragdrop %>
|
5
7
|
<%= stylesheet_link_tag 'caboose/admin_edit_page_content_dragdrop' %>
|
6
8
|
<% else %>
|
@@ -11,9 +13,11 @@
|
|
11
13
|
<% end %>
|
12
14
|
<% content_for :caboose_js do %>
|
13
15
|
<%= javascript_include_tag 'jquery-ui' %>
|
16
|
+
<%= javascript_include_tag 'colorbox-rails' %>
|
17
|
+
<%= javascript_include_tag 'caboose/modal_integration' %>
|
14
18
|
<%= javascript_include_tag 'caboose/model/all' %>
|
15
19
|
<%= javascript_include_tag 'caboose/jquery-ui.drag-multiple.min.js' %>
|
16
|
-
|
20
|
+
<%# javascript_include_tag "caboose/clipboard" %>
|
17
21
|
<%= javascript_include_tag "caboose/class" %>
|
18
22
|
<%= javascript_include_tag "caboose/modal_controller" %>
|
19
23
|
<% if @site && @site.use_dragdrop %>
|
@@ -46,7 +50,7 @@ $(document).ready(function() {
|
|
46
50
|
.append($('<a/>').attr('href', '/admin/posts').html("< Back"))
|
47
51
|
.append($('<a/>').attr('href', '/admin/posts/<%= @post.id %>/revert').html("Revert"))
|
48
52
|
.append($('<a/>').attr('href', '/admin/posts/<%= @post.id %>/preview-post').attr('target','_blank').html("Preview"))
|
49
|
-
.append($('<a/>').attr('href', '
|
53
|
+
.append($('<a/>').attr('href', '#').attr('onclick','controller.publish_page();return false;').html("Publish").addClass('pub'))
|
50
54
|
.append($('<a/>').attr('href', '/admin/posts/<%= @post.id %>').html("Post Settings"))
|
51
55
|
.append($('<a/>').attr('href', '<%= @post.uri %>').attr('target','_blank').text("View Post"))
|
52
56
|
);
|
@@ -199,7 +199,7 @@
|
|
199
199
|
<%= render partial: 'caboose/products/admin_footer' %>
|
200
200
|
|
201
201
|
<% content_for :caboose_js do %>
|
202
|
-
<%= javascript_include_tag 'underscore' %>
|
202
|
+
<%= javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js' %>
|
203
203
|
|
204
204
|
<script>
|
205
205
|
window.count = <%= @variants.count %>;
|
@@ -33,7 +33,7 @@
|
|
33
33
|
</section>
|
34
34
|
|
35
35
|
<% content_for :caboose_js do %>
|
36
|
-
<%= javascript_include_tag('underscore') %>
|
36
|
+
<%= javascript_include_tag('https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js') %>
|
37
37
|
<%= javascript_include_tag('caboose/jquery-ui') %>
|
38
38
|
<%= javascript_include_tag('caboose/jquery-ui-multisortable') %>
|
39
39
|
|
@@ -13,14 +13,21 @@ user_ids = [] if user_ids.nil?
|
|
13
13
|
</p>
|
14
14
|
<p><div id='site_<%= @site.id %>_description' ></div></p>
|
15
15
|
<p><div id='site_<%= @site.id %>_under_construction_html' ></div></p>
|
16
|
+
<p><div id='site_<%= @site.id %>_use_change_logs' ></div></p>
|
16
17
|
<p><div id='site_<%= @site.id %>_use_store' ></div></p>
|
17
18
|
<p><div id='site_<%= @site.id %>_use_fonts' ></div></p>
|
18
19
|
<p><div id='site_<%= @site.id %>_use_dragdrop' ></div></p>
|
20
|
+
<p><div id='site_<%= @site.id %>_use_caching' ></div></p>
|
21
|
+
<% if @site.use_caching %>
|
22
|
+
<div class="cache"><a style="font-size:13px;color:#7373c3;text-decoration:none;" href="#" onclick="refresh_cache(<%= @site.id %>);return false;">Refresh all page caches</a></div>
|
23
|
+
<div id="c-message"></div>
|
24
|
+
<% end %>
|
19
25
|
<p><div id='site_<%= @site.id %>_allow_self_registration' ></div></p>
|
20
26
|
<% if @site.theme.nil? %>
|
21
27
|
<p><div id='site_<%= @site.id %>_theme_color' ></div></p>
|
22
28
|
<% end %>
|
23
29
|
<p><div id='site_<%= @site.id %>_assets_url' ></div></p>
|
30
|
+
<p><div id='site_<%= @site.id %>_google_api_key' ></div></p>
|
24
31
|
<p><div id='site_<%= @site.id %>_default_layout_id' ></div></p>
|
25
32
|
<p><div id='site_<%= @site.id %>_favicon' ></div></p>
|
26
33
|
<p><div id='site_<%= @site.id %>_recaptcha_threshold' ></div></p>
|
@@ -102,10 +109,13 @@ $(document).ready(function() {
|
|
102
109
|
{ name: 'description' , nice_name: 'Description' , type: 'text' , value: <%= raw Caboose.json(@site.description) %>, width: 600 },
|
103
110
|
{ name: 'theme_color' , nice_name: 'Theme Color' , type: 'text' , value: <%= raw Caboose.json(@site.theme_color) %>, width: 600 },
|
104
111
|
{ name: 'assets_url' , nice_name: 'Assets URL' , type: 'text' , value: <%= raw Caboose.json(@site.assets_url) %>, width: 600 },
|
112
|
+
{ name: 'google_api_key' , nice_name: 'Google Maps API Key' , type: 'text' , value: <%= raw Caboose.json(@site.google_api_key) %>, width: 600 },
|
105
113
|
{ name: 'under_construction_html' , nice_name: 'Under Construction HTML' , type: 'textarea' , value: <%= raw Caboose.json(@site.under_construction_html) %>, width: 600, height: 220 },
|
106
114
|
{ name: 'use_store' , nice_name: 'Enable Store' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_store ? true : false) %>, width: 400 },
|
115
|
+
{ name: 'use_change_logs' , nice_name: 'Enable Logs' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_change_logs ? true : false) %>, width: 400 },
|
107
116
|
{ name: 'use_fonts' , nice_name: 'Enable Fonts' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_fonts ? true : false) %>, width: 400 },
|
108
117
|
{ name: 'use_dragdrop' , nice_name: 'Enable Drag & Drop' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_dragdrop ? true : false) %>, width: 400 },
|
118
|
+
{ name: 'use_caching' , nice_name: 'Enable Caching' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_caching ? true : false) %>, width: 400 },
|
109
119
|
{ name: 'allow_self_registration' , nice_name: 'Allow Self Registration' , type: 'checkbox' , value: <%= raw Caboose.json(@site.allow_self_registration ? true : false) %>, width: 400 },
|
110
120
|
{ name: 'default_layout_id' , nice_name: 'Default Layout' , type: 'select' , value: <%= raw Caboose.json(@site.default_layout_id) %>, width: 600, options_url: "/admin/sites/<%= @site.id %>/default-layout-options" },
|
111
121
|
{ name: 'recaptcha_threshold' , nice_name: 'Recaptcha Threshold' , type: 'text' , value: <%= raw Caboose.json(@site.recaptcha_threshold) %>, width: 250 }
|
@@ -113,6 +123,17 @@ $(document).ready(function() {
|
|
113
123
|
});
|
114
124
|
});
|
115
125
|
|
126
|
+
function refresh_cache(site_id) {
|
127
|
+
$(".cache").hide();
|
128
|
+
$.ajax({
|
129
|
+
url: '/admin/sites/' + site_id + '/refresh-cache',
|
130
|
+
type: 'put',
|
131
|
+
success: function(resp) {
|
132
|
+
$("#c-message").html("<p class='note success'>Page caches are being refreshed now.</p>");
|
133
|
+
}
|
134
|
+
});
|
135
|
+
}
|
136
|
+
|
116
137
|
function set_under_construction(site_id, domain_id, checked)
|
117
138
|
{
|
118
139
|
$.ajax({
|
File without changes
|
File without changes
|
@@ -10,10 +10,14 @@ position = header.child('position') if header
|
|
10
10
|
<div class="admin-theme grid-row">
|
11
11
|
<div class="unit1of2 left">
|
12
12
|
<section>
|
13
|
-
<h5>
|
13
|
+
<h5>
|
14
|
+
Compile
|
15
|
+
<a href="/admin/theme/errors" style="display:inline-block;font-size:12px;margin-left:15px;text-decoration:none;color:gray;" id="error">Error Log</a>
|
16
|
+
</h5>
|
14
17
|
<div class="buttons">
|
15
|
-
<a style="margin-right:
|
16
|
-
<a href="/admin/theme/sass" class="caboose-btn">Edit
|
18
|
+
<a style="margin-right:3px;" href="#" id="compile-btn" class="caboose-btn">Compile Theme</a>
|
19
|
+
<a style="margin-right:3px;" href="/admin/theme/sass" class="caboose-btn">Edit SCSS</a>
|
20
|
+
<a href="/admin/theme/js" class="caboose-btn">Edit Javascript</a>
|
17
21
|
</div>
|
18
22
|
|
19
23
|
<div style="margin-top:20px;" id='message'></div>
|