caboose-cms 0.5.111 → 0.5.112
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/caboose/block_types_controller.rb +1 -0
- data/app/controllers/caboose/blocks_controller.rb +1 -0
- data/app/models/caboose/block.rb +1 -0
- data/app/models/caboose/block_type.rb +2 -1
- data/app/models/caboose/schema.rb +2 -0
- data/app/views/caboose/block_types/admin_edit.html.erb +2 -0
- data/app/views/caboose/blocks/admin_edit_advanced.html.erb +11 -0
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzNkMThkYWRmNGE4MDhjMDdlZjBjM2EyMGIzNGEyYjM3Y2M5MjcxMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzI5ODQ2ODVjNjNmYTYyMDE5NGY2OTlmMjE1ZmFiMmRkOWM4NzUyMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmViYzYxMDVkMzc1Y2RmMGIzMjhkMDYyZDY0OTcyZTk0ZGE5NTgxZDY4OWJk
|
10
|
+
MDQ1ZWFjZTA0NzdiOTM1ZjkzMTU5YTc1ZWVkZGQwMjcwNGExZWZiNmM4M2Fm
|
11
|
+
MWY0YTA4YWMzNDIwMjFjNWJiY2E5MzQxNTVmYmEyMzRhNmExYTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2U4MjFkN2E1YWRkODU2YjA0MjhiZWY0MjVhMzczMTcyMTg5Nzk2NTE2NTI2
|
14
|
+
Yjk1YjAzZDgxYjZlZWFiZjk3MjZjMDliNmQ2OTdiNTFkZTk1Y2I0ZGQ3Yjdl
|
15
|
+
NGU2ZTRlN2ViOWFmOWQ1YmRhYTRkZDNiYzRjZGQ5ZWE2YWFiY2Y=
|
@@ -124,6 +124,7 @@ module Caboose
|
|
124
124
|
when 'options' then bt.options = v
|
125
125
|
when 'options_function' then bt.options_function = v
|
126
126
|
when 'options_url' then bt.options_url = v
|
127
|
+
when 'default_constrain' then bt.default_constrain = v
|
127
128
|
when 'site_id' then bt.toggle_site(v[0], v[1])
|
128
129
|
end
|
129
130
|
end
|
@@ -265,6 +265,7 @@ module Caboose
|
|
265
265
|
b.sort_order = Block.where(:parent_id => v).count
|
266
266
|
when 'block_type_id' then b.block_type_id = v
|
267
267
|
when 'sort_order' then b.sort_order = v
|
268
|
+
when 'constrain' then b.constrain = v
|
268
269
|
when 'name' then b.name = v
|
269
270
|
when 'value' then
|
270
271
|
|
data/app/models/caboose/block.rb
CHANGED
@@ -18,7 +18,7 @@ class Caboose::BlockType < ActiveRecord::Base
|
|
18
18
|
:use_render_function_for_layout,
|
19
19
|
:allow_child_blocks,
|
20
20
|
:default_child_block_type_id,
|
21
|
-
:render_function,
|
21
|
+
:render_function,
|
22
22
|
:field_type,
|
23
23
|
:default,
|
24
24
|
:width,
|
@@ -28,6 +28,7 @@ class Caboose::BlockType < ActiveRecord::Base
|
|
28
28
|
:options_function,
|
29
29
|
:options_url,
|
30
30
|
:icon,
|
31
|
+
:default_constrain,
|
31
32
|
:share, # Whether or not to share the block type in the existing block store.
|
32
33
|
:downloaded # Whether the full block type has been download or just the name and description.
|
33
34
|
|
@@ -144,6 +144,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
144
144
|
[ :parent_id , :integer ],
|
145
145
|
[ :block_type_id , :integer ],
|
146
146
|
[ :sort_order , :integer , { :default => 0 }],
|
147
|
+
[ :constrain , :boolean , { :default => false }],
|
147
148
|
[ :name , :string ],
|
148
149
|
[ :value , :text ],
|
149
150
|
[ :file , :attachment ],
|
@@ -169,6 +170,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
|
|
169
170
|
[ :options , :text ],
|
170
171
|
[ :options_function , :text ],
|
171
172
|
[ :options_url , :string ],
|
173
|
+
[ :default_constrain , :boolean , { :default => false }],
|
172
174
|
[ :share , :boolean , { :default => true }],
|
173
175
|
[ :downloaded , :boolean , { :default => false }]
|
174
176
|
],
|
@@ -30,6 +30,7 @@ bt = @block_type
|
|
30
30
|
<p><div id='blocktype_<%= bt.id %>_use_render_function_for_layout' ></div></p>
|
31
31
|
<p><div id='blocktype_<%= bt.id %>_allow_child_blocks' ></div></p>
|
32
32
|
<p><div id='blocktype_<%= bt.id %>_default_child_block_type_id' ></div></p>
|
33
|
+
<p><div id='blocktype_<%= bt.id %>_default_constrain' ></div></p>
|
33
34
|
<p><div id='blocktype_<%= bt.id %>_render_function' ></div></p>
|
34
35
|
<p><div id='blocktype_<%= bt.id %>_options_function' ></div></p>
|
35
36
|
|
@@ -101,6 +102,7 @@ $(document).ready(function() {
|
|
101
102
|
{ name: 'width' , sort: 'width' , show: false , bulk_edit: false, nice_name: 'Width' , type: 'text' , value: function(bt) { return bt.width; }, width: 400 },
|
102
103
|
{ name: 'height' , sort: 'height' , show: false , bulk_edit: false, nice_name: 'Height' , type: 'text' , value: function(bt) { return bt.height; }, width: 400 },
|
103
104
|
{ name: 'fixed_placeholder' , sort: 'fixed_placeholder' , show: false , bulk_edit: false, nice_name: 'Fixed placeholder' , type: 'checkbox' , value: function(bt) { return bt.fixed_placeholder; }, text: function(bt) { return bt.fixed_placeholder ? 'Yes' : 'No' }, width: 400 },
|
105
|
+
{ name: 'default_constrain' , sort: 'default_constrain' , show: false , bulk_edit: false, nice_name: 'Constrain by Default' , type: 'checkbox' , value: function(bt) { return bt.default_constrain; }, text: function(bt) { return bt.default_constrain ? 'Yes' : 'No' }, width: 400 },
|
104
106
|
{ name: 'options_url' , sort: 'options_url' , show: false , bulk_edit: false, nice_name: 'Options URL' , type: 'text' , value: function(bt) { return bt.options_url; }, width: 400 },
|
105
107
|
{ name: 'options_function' , sort: 'options_function' , show: false , bulk_edit: false, nice_name: 'Options Function' , type: 'textarea' , value: function(bt) { return bt.options_function; }, width: 400, height: 100 },
|
106
108
|
{ name: 'options' , sort: 'options' , show: false , bulk_edit: false, nice_name: 'Options' , type: 'textarea' , value: function(bt) { return bt.options; }, width: 400, height: 100 }
|
@@ -20,6 +20,7 @@ end
|
|
20
20
|
<div id='advanced'>
|
21
21
|
<p><div id='block_<%= @block.id %>_block_type_id' ></div></p>
|
22
22
|
<p><div id='block_<%= @block.id %>_parent_id' ></div></p>
|
23
|
+
<p><div id='block_<%= @block.id %>_constrain' ></div></p>
|
23
24
|
</div>
|
24
25
|
<div id='message'></div>
|
25
26
|
<p>
|
@@ -70,6 +71,16 @@ $(document).ready(function() {
|
|
70
71
|
after_update: function() { parent.controller.render_blocks(); },
|
71
72
|
after_cancel: function() { parent.controller.render_blocks(); },
|
72
73
|
on_load: function() { that.modal.autosize(); }
|
74
|
+
},{
|
75
|
+
name: 'constrain',
|
76
|
+
nice_name: 'Constrain',
|
77
|
+
type: 'checkbox',
|
78
|
+
value: <%= raw Caboose.json(b.constrain ? 1 : 0) %>,
|
79
|
+
width: 400,
|
80
|
+
fixed_placeholder: true,
|
81
|
+
after_update: function() { parent.controller.render_blocks(); },
|
82
|
+
after_cancel: function() { parent.controller.render_blocks(); },
|
83
|
+
on_load: function() { that.modal.autosize(); }
|
73
84
|
}]
|
74
85
|
});
|
75
86
|
});
|
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.5.
|
4
|
+
version: 0.5.112
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|