caboose-cms 0.8.65 → 0.8.66

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.
@@ -77,6 +77,7 @@ module Caboose
77
77
  blocks = []
78
78
  if params[:id]
79
79
  b = Block.find(params[:id])
80
+ b.create_children
80
81
  bt = b.block_type
81
82
  blocks << {
82
83
  'id' => b.id,
@@ -378,13 +378,14 @@ module Caboose
378
378
  page.parent_id = parent_id
379
379
  page.hide = true
380
380
  page.content_format = Caboose::Page::CONTENT_FORMAT_HTML
381
+ page.save
381
382
 
382
383
  i = 0
383
384
  begin
384
385
  page.slug = Page.slug(page.title + (i > 0 ? " #{i}" : ""))
385
386
  page.uri = parent.parent_id == -1 ? page.slug : "#{parent.uri}/#{page.slug}"
386
387
  i = i+1
387
- end while (Page.where(:uri => page.uri).count > 0 && i < 10)
388
+ end while (Page.where(:uri => page.uri, :site_id => page.site_id).count > 0 && i < 10)
388
389
 
389
390
  page.save
390
391
 
@@ -527,6 +527,7 @@ module Caboose
527
527
  # Option methods
528
528
  #===========================================================================
529
529
 
530
+ # @route_priority 1
530
531
  # @route GET /admin/variants/status-options
531
532
  def admin_status_options
532
533
  arr = ['Active', 'Inactive', 'Deleted']
@@ -12,7 +12,7 @@ end
12
12
 
13
13
  if editing
14
14
  if url.nil? || url.starts_with?('http://placehold.it') || url.include?('missing')
15
- %><div id='block_<%= block.id %>'><p>Please upload a file.</p></div><%
15
+ %><div id='block_<%= block.id %>'><p>Empty file: <%= block.name %></p></div><%
16
16
  else
17
17
  %><div id='block_<%= block.id %>'><p><a href="/admin/<%= block.page_id ? "pages/#{block.page_id}" : "posts/#{block.post_id}" %>/blocks/<%= block.id %>/edit"><%= name %></a></p></div><%
18
18
  end
@@ -1,6 +1,6 @@
1
1
  <h1>Media</h1>
2
2
 
3
- <div id='left_content'>
3
+ <div id='left_content' class='hide-products'>
4
4
  <div id='categories'></div>
5
5
  <div id='controls'></div>
6
6
  </div>
@@ -34,10 +34,10 @@
34
34
  .move_up_handle { display: none; }
35
35
  .move_down_handle { display: none; }
36
36
  .delete_handle { display: none; }
37
- .block_over > .select_handle { display: block; position: relative; }
38
- .block_over > .move_up_handle { display: block; position: relative; }
39
- .block_over > .move_down_handle { display: block; position: relative; }
40
- .block_over > .delete_handle { display: block; position: relative; }
37
+ .block_over > .select_handle { display: block; position: relative; z-index: 3; }
38
+ .block_over > .move_up_handle { display: block; position: relative; z-index: 3; }
39
+ .block_over > .move_down_handle { display: block; position: relative; z-index: 3; }
40
+ .block_over > .delete_handle { display: block; position: relative; z-index: 3; }
41
41
  .block_over > .select_handle span { position: absolute; top: 0; right: 54px; width: 18px; height: 18px; background-color: #fff; border: #ccc 1px solid; }
42
42
  .block_over > .move_up_handle span { position: absolute; top: 0; right: 36px; width: 18px; height: 18px; background-color: #fff; border: #ccc 1px solid; }
43
43
  .block_over > .move_down_handle span { position: absolute; top: 0; right: 18px; width: 18px; height: 18px; background-color: #fff; border: #ccc 1px solid; }
@@ -75,7 +75,7 @@ $(document).ready(function() {
75
75
  <% if p.option1 %>{ show: true , name: 'option1' , nice_name: <%= raw Caboose.json(p.option1) %> , sort: 'option1' , type: 'text' , value: function(v) { return v.option1 }, width: 75, align: 'left' , bulk_edit: true },<% end %>
76
76
  <% if p.option2 %>{ show: true , name: 'option2' , nice_name: <%= raw Caboose.json(p.option2) %> , sort: 'option2' , type: 'text' , value: function(v) { return v.option2 }, width: 75, align: 'left' , bulk_edit: true },<% end %>
77
77
  <% if p.option3 %>{ show: true , name: 'option3' , nice_name: <%= raw Caboose.json(p.option3) %> , sort: 'option3' , type: 'text' , value: function(v) { return v.option3 }, width: 75, align: 'left' , bulk_edit: true },<% end %>
78
- { show: true , name: 'status' , nice_name: 'Status' , sort: 'status' , type: 'text' , value: function(v) { return v.status }, width: 75, align: 'left' , bulk_edit: true },
78
+ { show: true , name: 'status' , nice_name: 'Status' , sort: 'status' , type: 'select' , options_url: '/admin/variants/status-options', value: function(v) { return v.status }, width: 75, align: 'left' , bulk_edit: true },
79
79
  { show: true , name: 'alternate_id' , nice_name: 'Alternate ID' , sort: 'alternate_id' , type: 'text' , value: function(v) { return v.alternate_id }, width: 75, align: 'left' , bulk_edit: true },
80
80
  { show: true , name: 'sku' , nice_name: 'SKU' , sort: 'sku' , type: 'text' , value: function(v) { return v.sku }, width: 75, align: 'left' , bulk_edit: true },
81
81
  { show: false , name: 'barcode' , nice_name: 'Barcode' , sort: 'barcode' , type: 'text' , value: function(v) { return v.barcode }, width: 75, align: 'left' , bulk_edit: true },
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.8.65'
2
+ VERSION = '0.8.66'
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.8.65
4
+ version: 0.8.66
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-09-13 00:00:00.000000000 Z
11
+ date: 2016-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -499,6 +499,7 @@ files:
499
499
  - app/assets/images/caboose/file_types/xls.png
500
500
  - app/assets/images/caboose/file_types/xlsx.png
501
501
  - app/assets/images/caboose/file_types/zip.png
502
+ - app/assets/images/caboose/grid.png
502
503
  - app/assets/images/caboose/loading_black_on_white.gif
503
504
  - app/assets/images/caboose/loading_black_on_yellow.gif
504
505
  - app/assets/images/caboose/loading_green.gif