caboose-cms 0.8.46 → 0.8.47
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/pages_controller.rb +1 -1
- data/app/models/caboose/page.rb +2 -0
- data/app/models/caboose/schema.rb +2 -0
- data/app/views/caboose/pages/admin_edit_css.html.erb +6 -1
- data/app/views/caboose/pages/admin_edit_js.html.erb +6 -1
- data/app/views/layouts/caboose/application.html.erb +6 -0
- data/lib/caboose/engine.rb +1 -1
- data/lib/caboose/version.rb +1 -1
- metadata +2 -3
- data/app/assets/javascripts/caboose/block_modal_controllers/#Untitled-1# +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f920fab1834790a362b160a140c8448ac5448be
|
4
|
+
data.tar.gz: 535fa4f54964d526d706bbf642c1cb96f8871216
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb8ff41a4f2f43a42e2a0c179cf1edae14152eb187fd27e66a0ebeaccbc25c26e1b99bf2b3cb74c9156128290fdc3e6bc24f46889ecb11330d4b283cb3ad84ea
|
7
|
+
data.tar.gz: 7b00612ffe51ab6cfeec1f4a09bd6ab0126c907904410d4dcc70c43cc5b480d02c39f9e6d008dac1e86fa04733e732c1888977385708146bdafa886dadd91b5c
|
@@ -435,7 +435,7 @@ module Caboose
|
|
435
435
|
resp.attributes['parent_id'] = { 'text' => page.parent.title }
|
436
436
|
end
|
437
437
|
|
438
|
-
when 'custom_css', 'custom_js'
|
438
|
+
when 'custom_css', 'custom_css_files', 'custom_js', 'custom_js_files'
|
439
439
|
value.strip!
|
440
440
|
page[name.to_sym] = value
|
441
441
|
|
data/app/models/caboose/page.rb
CHANGED
@@ -479,7 +479,9 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
479
479
|
[ :hide , :boolean , { :default => false }],
|
480
480
|
[ :content_format , :integer , { :default => Caboose::Page::CONTENT_FORMAT_HTML }],
|
481
481
|
[ :custom_css , :text ],
|
482
|
+
[ :custom_css_files , :text ],
|
482
483
|
[ :custom_js , :text ],
|
484
|
+
[ :custom_js_files , :text ],
|
483
485
|
[ :linked_resources , :text ],
|
484
486
|
[ :layout , :string ],
|
485
487
|
[ :sort_order , :integer , { :default => 0 }],
|
@@ -1,6 +1,10 @@
|
|
1
1
|
|
2
2
|
<%= render :partial => 'caboose/pages/admin_header' %>
|
3
3
|
|
4
|
+
<h2>Custom CSS URLs</h2>
|
5
|
+
<p>One URL per line</p>
|
6
|
+
<p><div id='page_<%= @page.id %>_custom_css_files'></div></p>
|
7
|
+
<h2>Custom CSS</h2>
|
4
8
|
<p><div id='page_<%= @page.id %>_custom_css'></div></p>
|
5
9
|
|
6
10
|
<%= render :partial => 'caboose/pages/admin_footer' %>
|
@@ -19,7 +23,8 @@ $(document).ready(function() {
|
|
19
23
|
update_url: '/admin/pages/<%= @page.id %>',
|
20
24
|
authenticity_token: '<%= form_authenticity_token %>',
|
21
25
|
attributes: [
|
22
|
-
{ name: '
|
26
|
+
{ name: 'custom_css_files' , nice_name: 'Custom CSS URLs' , type: 'textarea', value: <%= raw Caboose.json(@page.custom_css_files ) %>, width: 800, height: 200, fixed_placeholder: false },
|
27
|
+
{ name: 'custom_css' , nice_name: 'Custom CSS' , type: 'textarea', value: <%= raw Caboose.json(@page.custom_css ) %>, width: 800, height: 400, fixed_placeholder: false }
|
23
28
|
]
|
24
29
|
});
|
25
30
|
});
|
@@ -1,6 +1,10 @@
|
|
1
1
|
|
2
2
|
<%= render :partial => 'caboose/pages/admin_header' %>
|
3
3
|
|
4
|
+
<h2>Custom Javascript URLs</h2>
|
5
|
+
<p>One URL per line</p>
|
6
|
+
<p><div id='page_<%= @page.id %>_custom_js_files'></div></p>
|
7
|
+
<h2>Custom Javascript</h2>
|
4
8
|
<p><div id='page_<%= @page.id %>_custom_js'></div></p>
|
5
9
|
|
6
10
|
<%= render :partial => 'caboose/pages/admin_footer' %>
|
@@ -19,7 +23,8 @@ $(document).ready(function() {
|
|
19
23
|
update_url: '/admin/pages/<%= @page.id %>',
|
20
24
|
authenticity_token: '<%= form_authenticity_token %>',
|
21
25
|
attributes: [
|
22
|
-
{ name: '
|
26
|
+
{ name: 'custom_js_files', nice_name: 'Custom Javascript URLs' , type: 'textarea', value: <%= raw Caboose.json(@page.custom_js_files ) %>, width: 800, height: 200, fixed_placeholder: false },
|
27
|
+
{ name: 'custom_js' , nice_name: 'Custom Javascript' , type: 'textarea', value: <%= raw Caboose.json(@page.custom_js ) %>, width: 800, height: 400, fixed_placeholder: false }
|
23
28
|
]
|
24
29
|
});
|
25
30
|
});
|
@@ -6,6 +6,9 @@
|
|
6
6
|
<% Caboose::javascripts.each do |js| %><%= javascript_include_tag(js) %><% end %>
|
7
7
|
<% @page.linked_resources_map[:js].each do |r| %><%= gzip_javascript_include_tag r %><% end %>
|
8
8
|
<% if @site.date_js_updated %><script type='text/javascript' src="<%= raw @site.custom_js_url %>"></script><% end %>
|
9
|
+
<% if @page.custom_js_files && @page.custom_js_files.strip.length > 0 %>
|
10
|
+
<% @page.custom_js_files.split("\n").each do |url| %><script type='text/javascript' src="<%= raw url %>"></script><% end %>
|
11
|
+
<% end %>
|
9
12
|
<% if @page.custom_js && @page.custom_js.strip.length > 0 %><script type='text/javascript'><%= raw @page.custom_js %></script><% end %>
|
10
13
|
<%= yield :caboose_js %>
|
11
14
|
<% end %>
|
@@ -15,6 +18,9 @@
|
|
15
18
|
<% Caboose::stylesheets.each do |css| %><%= gzip_stylesheet_link_tag(css) %><% end %>
|
16
19
|
<% @page.linked_resources_map[:css].each do |r| %><%= gzip_stylesheet_link_tag r %><% end %>
|
17
20
|
<% if @site.date_css_updated %><link rel='stylesheet' type='text/css' url="<%= raw @site.custom_css_url %>" /><% end %>
|
21
|
+
<% if @page.custom_css_files && @page.custom_css_files.strip.length > 0 %>
|
22
|
+
<% @page.custom_css_files.split("\n").each do |url| %><link rel="stylesheet" type='text/css' href="<%= raw url %>" /><% end %>
|
23
|
+
<% end %>
|
18
24
|
<% if @page.custom_css && @page.custom_css.strip.length > 0 %><style><%= raw @page.custom_css %></style><% end %>
|
19
25
|
<%= yield :caboose_css %>
|
20
26
|
<% end %>
|
data/lib/caboose/engine.rb
CHANGED
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.8.
|
4
|
+
version: 0.8.47
|
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-08-
|
11
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -524,7 +524,6 @@ files:
|
|
524
524
|
- app/assets/javascripts/caboose/application.js
|
525
525
|
- app/assets/javascripts/caboose/authorize.net.js
|
526
526
|
- app/assets/javascripts/caboose/block_media_controller.js
|
527
|
-
- app/assets/javascripts/caboose/block_modal_controllers/#Untitled-1#
|
528
527
|
- app/assets/javascripts/caboose/block_modal_controllers/block_modal_controller.js
|
529
528
|
- app/assets/javascripts/caboose/block_modal_controllers/button_modal_controller.js
|
530
529
|
- app/assets/javascripts/caboose/block_modal_controllers/default_block_modal_controller.js
|