caboose-cms 0.5.111 → 0.5.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2E3NTQ0YTk2ZTM3YmEzMjllYzk0N2U3Y2FlMzBkYWE5MGQ2YTVlZQ==
4
+ MzNkMThkYWRmNGE4MDhjMDdlZjBjM2EyMGIzNGEyYjM3Y2M5MjcxMQ==
5
5
  data.tar.gz: !binary |-
6
- ZjViMjY5YWU2MTE3MGE4MzdiMDM1MzM4ODZhOTM5YzBiOTlhYWQ3Zg==
6
+ MzI5ODQ2ODVjNjNmYTYyMDE5NGY2OTlmMjE1ZmFiMmRkOWM4NzUyMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjI4OGM4ODFkYTU3Y2U5MGU4ZjJjZDNiMWY5ZjUzZGIzNWMzMDljM2Y2MTMy
10
- ZjRjNjMwNDc1YTYzMDk0OWRjMWE5Y2NmNzE2NTMwMDlmZDBkYjI5NjU3MWM1
11
- YTRjNmM3ODJjYTIwMTZhOTkwYWE3NGJhNjFmYzEyNjAzODNkY2E=
9
+ ZmViYzYxMDVkMzc1Y2RmMGIzMjhkMDYyZDY0OTcyZTk0ZGE5NTgxZDY4OWJk
10
+ MDQ1ZWFjZTA0NzdiOTM1ZjkzMTU5YTc1ZWVkZGQwMjcwNGExZWZiNmM4M2Fm
11
+ MWY0YTA4YWMzNDIwMjFjNWJiY2E5MzQxNTVmYmEyMzRhNmExYTA=
12
12
  data.tar.gz: !binary |-
13
- OWEyOTMwMmJkZmQxMTUzN2VhYzhjYTA4ODU1YTk0MDA5MGUzZDk3NzEyN2Iw
14
- NTliZDAxYTQyMDIwYWJhMjBkMjIxYjE3NTAwNWFiNjQ3NTkyMzkxYTUzOTg1
15
- ZWU3NWI3OWJiMThiOTk2NDg5MjA3NTA0MDZhOGE2Zjg0YmVjNzE=
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
 
@@ -26,6 +26,7 @@ class Caboose::Block < ActiveRecord::Base
26
26
  :parent_id,
27
27
  :block_type_id,
28
28
  :sort_order,
29
+ :constrain,
29
30
  :name,
30
31
  :value
31
32
 
@@ -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
  });
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.111'
2
+ VERSION = '0.5.112'
3
3
  end
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.111
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-20 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg