caboose-cms 0.9.191 → 0.9.192

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fa5770805f90830e81dff80410e37b9e1a5dc64
4
- data.tar.gz: 2592eb9ace69d288395420b4462bcaafac49026c
3
+ metadata.gz: a2f210c34837b56153cad8ff9b6f4a2ca4983794
4
+ data.tar.gz: 39f7b86cad1ed518471ffd3e02bc86d5f760e9a5
5
5
  SHA512:
6
- metadata.gz: 16a284437d1add3322b15695d27ed450b8c4ec88677946a496d5ec89a386f7a163f46be0dbed4ab17b5671a27b75335bb463d872dea54c69b2e78642a337cb20
7
- data.tar.gz: ca6b126f2655f79365178bf79a74c3a5506a460875fd87418b05e6729b2e986684b4faf50b13416a393845e67960fc141a132a885bfb21a1cb6e73cab1cd5ff1
6
+ metadata.gz: e9bdb953025a86eaad3dd383ae4793fe75a855cdd5f5b12af6b5bbe549c50c6f09d59d664cf9bef90b14c2d27ef4ac2991131effed91b3b87c5764c38b03e586
7
+ data.tar.gz: 44ed7ad818b22c2ddf13d78c0a1bc3ee232f2a370e95af3058edbc895fa449d2aac80a16184e0b4404701bd2b81aac52ab29e4294c4710b801d8c85d37097934
@@ -401,7 +401,7 @@ BlockContentController.prototype = {
401
401
  }
402
402
 
403
403
  // child block of content area
404
- if ( $(v).closest('.content_body').length > 0 ) {
404
+ if ( $(v).closest('.content_body').length > 0 && !$(v).parent().hasClass('nodrag') ) {
405
405
  var parent_id = $(v).parents("[id^='block_']").first().attr('id').replace('block_','');
406
406
  var is_last_child = $(v).next("[id^='block_']").length == 0 ? true : false;
407
407
  $(v).before($('<div/>')
@@ -517,7 +517,7 @@ BlockContentController.prototype = {
517
517
  if (el.length > 0 && block_id.indexOf('constrain') < 0 && block_id.indexOf('full_width') < 0 && block_id.indexOf('_value_') < 0) {
518
518
  if ( el.attr('id').indexOf('_value') >= 0 || el.children('.drag_handle').length > 0 )
519
519
  return true;
520
- if ( el.parents('.content_body').length > 0 ) {
520
+ if ( el.parents('.content_body').length > 0 && el.parents('.nodrag').length == 0 ) {
521
521
  $('#block_' + block_id + ' *').attr('onclick', '').unbind('click');
522
522
  el.prepend($('<a/>').attr('id', 'handle_block_' + block_id + '_drag' ).addClass('drag_handle' ).append($('<span/>').addClass('ui-icon ui-icon-arrow-4' )).click(function(e) { e.preventDefault(); e.stopPropagation(); }))
523
523
  .prepend($('<a/>').attr('id', 'handle_block_' + block_id + '_select' ).addClass('select_handle' ).append($('<span/>').addClass('ui-icon ui-icon-check' )).click(function(e) { e.preventDefault(); e.stopPropagation(); that.select_block(block_id); }))
@@ -12,6 +12,7 @@ module Caboose
12
12
  def admin_options
13
13
  btc = BlockTypeCategory.find(params[:id])
14
14
  options = params[:default] == 'yes' ? [{:text => 'Default', :value => 'Default'}] : []
15
+ options << { 'value' => 'none', 'text' => "No Header" } if params[:none] == 'yes'
15
16
  BlockType.joins(:block_type_site_memberships).where("block_type_site_memberships.site_id = ?",@site.id).where("block_type_site_memberships.block_type_id = block_types.id").where("block_types.block_type_category_id = ?",btc.id).reorder('block_types.description').all.each do |s|
16
17
  options << { 'value' => s.id, 'text' => s.description }
17
18
  end
@@ -19,4 +20,4 @@ module Caboose
19
20
  end
20
21
 
21
22
  end
22
- end
23
+ end
@@ -95,6 +95,13 @@ module Caboose
95
95
  when 'note_success_bg' then theme.note_success_bg = value
96
96
  when 'nav_lineheight_offset' then theme.nav_lineheight_offset = value
97
97
 
98
+ when 'mobile_header_height' then theme.mobile_header_height = value
99
+ when 'mobile_logo_width' then theme.mobile_logo_width = value
100
+ when 'mobile_logo_height' then theme.mobile_logo_height = value
101
+ when 'mobile_logo_top_padding' then theme.mobile_logo_top_padding = value
102
+ when 'constrain_footer' then theme.constrain_footer = value
103
+ when 'heading_base_font_size' then theme.heading_base_font_size = value
104
+
98
105
  end
99
106
  end
100
107
  resp.success = save && theme.save
@@ -933,7 +933,8 @@ class Caboose::Schema < Caboose::Utilities::Schema
933
933
  [ :google_analytics_id , :string ],
934
934
  [ :google_analytics_id2 , :string ],
935
935
  [ :auto_ga_js , :boolean , { :default => false }],
936
- [ :share_image , :attachment ]
936
+ [ :share_image , :attachment ],
937
+ [ :facebook_pixel, :text ]
937
938
  ],
938
939
  Caboose::StackableGroup => [
939
940
  [ :name , :string ],
@@ -1088,7 +1089,13 @@ class Caboose::Schema < Caboose::Utilities::Schema
1088
1089
  [ :note_error_bg, :string ],
1089
1090
  [ :note_loading_bg, :string ],
1090
1091
  [ :note_success_bg, :string ],
1091
- [ :nav_lineheight_offset, :string ]
1092
+ [ :nav_lineheight_offset, :string ],
1093
+ [ :mobile_header_height, :string ],
1094
+ [ :mobile_logo_width, :string ],
1095
+ [ :mobile_logo_height, :string ],
1096
+ [ :mobile_logo_top_padding, :string ],
1097
+ [ :constrain_footer, :string ],
1098
+ [ :heading_base_font_size, :string ]
1092
1099
  ],
1093
1100
  Caboose::ThemeFile => [
1094
1101
  [ :filename, :string ],
@@ -16,7 +16,8 @@ class Caboose::SocialConfig < ActiveRecord::Base
16
16
  :rss_url ,
17
17
  :google_plus_url ,
18
18
  :linkedin_url ,
19
- :google_analytics_id
19
+ :google_analytics_id ,
20
+ :facebook_pixel
20
21
 
21
22
  has_attached_file :share_image,
22
23
  :path => 'share_images/:id_:style.:extension',
@@ -92,7 +92,13 @@ class Caboose::Theme < ActiveRecord::Base
92
92
  :note_loading_bg,
93
93
  :note_success_bg,
94
94
  :nav_lineheight_offset,
95
-
95
+
96
+ :mobile_header_height,
97
+ :mobile_logo_width,
98
+ :mobile_logo_height,
99
+ :mobile_logo_top_padding,
100
+ :constrain_footer,
101
+ :heading_base_font_size,
96
102
 
97
103
  :digest,
98
104
  :custom_sass,
@@ -261,7 +261,7 @@
261
261
  e.preventDefault();
262
262
  $.ajax({
263
263
  url: '/admin/themes/<%= @site.theme_id %>/compile',
264
- type: 'get',
264
+ type: 'put',
265
265
  success: function(resp) {
266
266
  if (resp.error) $('#cmessage').html("<p class='note error'>" + resp.error + "</p>").fadeIn();
267
267
  if (resp.success && resp.message) {
@@ -33,6 +33,7 @@ position = header.child('position') if header
33
33
  <div id="theme_<%= @theme.id %>_body_line_height"></div>
34
34
  <div id="theme_<%= @theme.id %>_body_font_color"></div>
35
35
  <div id="theme_<%= @theme.id %>_heading_line_height"></div>
36
+ <div id="theme_<%= @theme.id %>_heading_base_font_size"></div>
36
37
  </section>
37
38
  <section>
38
39
  <h5>Header</h5>
@@ -41,8 +42,6 @@ position = header.child('position') if header
41
42
  <div id="theme_<%= @theme.id %>_header_font_color"></div>
42
43
  <div id="theme_<%= @theme.id %>_dropdown_color"></div>
43
44
  <div id="theme_<%= @theme.id %>_dropdown_nav_padding"></div>
44
- <div id="theme_<%= @theme.id %>_mobile_menu_icon_color"></div>
45
- <div id="theme_<%= @theme.id %>_mobile_menu_icon_top"></div>
46
45
  <div id="theme_<%= @theme.id %>_header_font_size"></div>
47
46
  <div id="theme_<%= @theme.id %>_header_nav_spacing"></div>
48
47
  <div id="theme_<%= @theme.id %>_logo_width"></div>
@@ -55,6 +54,16 @@ position = header.child('position') if header
55
54
  <div id="theme_<%= @theme.id %>_nav_lineheight_offset"></div>
56
55
  <div id="theme_<%= @theme.id %>_default_header_style"></div>
57
56
  <div id="theme_<%= @theme.id %>_default_header_position"></div>
57
+
58
+ </section>
59
+ <section>
60
+ <h5>Mobile Header</h5>
61
+ <div id="theme_<%= @theme.id %>_mobile_menu_icon_color"></div>
62
+ <div id="theme_<%= @theme.id %>_mobile_menu_icon_top"></div>
63
+ <div id="theme_<%= @theme.id %>_mobile_header_height"></div>
64
+ <div id="theme_<%= @theme.id %>_mobile_logo_width"></div>
65
+ <div id="theme_<%= @theme.id %>_mobile_logo_height"></div>
66
+ <div id="theme_<%= @theme.id %>_mobile_logo_top_padding"></div>
58
67
  </section>
59
68
  <section>
60
69
  <h5>Footer</h5>
@@ -68,17 +77,7 @@ position = header.child('position') if header
68
77
  <div id="theme_<%= @theme.id %>_ninebar_show"></div>
69
78
  <div id="theme_<%= @theme.id %>_ninebar_bg_color"></div>
70
79
  <div id="theme_<%= @theme.id %>_ninebar_text"></div>
71
- </section>
72
-
73
- <section>
74
- <h5>Theme Files</h5>
75
- <% Caboose::ThemeFile.order(:nice_name).all.each do |tf| %>
76
- <% tfm = Caboose::ThemeFileMembership.where(:theme_file_id => tf.id, :theme_id => @theme.id).exists? %>
77
- <div class="field cb">
78
- <input class="file-toggle" <% if tfm %>checked<% end %> type="checkbox" value="<%= tf.id %>" name="tf_<%= tf.id %>" id="<%= tf.id %>" />
79
- <label for="<%= tf.id %>"><%= tf.nice_name %></label>
80
- </div>
81
- <% end %>
80
+ <div id="theme_<%= @theme.id %>_constrain_footer"></div>
82
81
  </section>
83
82
 
84
83
  </div>
@@ -92,7 +91,6 @@ position = header.child('position') if header
92
91
  <div id="theme_<%= @theme.id %>_btn_border_color"></div>
93
92
  <div id="theme_<%= @theme.id %>_btn_font_color"></div>
94
93
  <div id="theme_<%= @theme.id %>_btn_font_size"></div>
95
- <div id="theme_<%= @theme.id %>_btn_font_weight"></div>
96
94
  <div id="theme_<%= @theme.id %>_btn_font_case"></div>
97
95
  <div id="theme_<%= @theme.id %>_btn_border_side"></div>
98
96
  <div id="theme_<%= @theme.id %>_button_padding"></div>
@@ -137,12 +135,21 @@ position = header.child('position') if header
137
135
  <div id="theme_<%= @theme.id %>_sidebar_width"></div>
138
136
  <div id="theme_<%= @theme.id %>_sidebar_bg_color"></div>
139
137
  </section>
138
+
139
+ <section>
140
+ <h5>Theme Files</h5>
141
+ <% Caboose::ThemeFile.order(:nice_name).all.each do |tf| %>
142
+ <% tfm = Caboose::ThemeFileMembership.where(:theme_file_id => tf.id, :theme_id => @theme.id).exists? %>
143
+ <div class="field cb">
144
+ <input class="file-toggle" <% if tfm %>checked<% end %> type="checkbox" value="<%= tf.id %>" name="tf_<%= tf.id %>" id="<%= tf.id %>" />
145
+ <label for="<%= tf.id %>"><%= tf.nice_name %></label>
146
+ </div>
147
+ <% end %>
148
+ </section>
140
149
 
141
150
  </div>
142
151
  </div>
143
-
144
-
145
-
152
+
146
153
 
147
154
  <% content_for :caboose_css do %>
148
155
  <%= stylesheet_link_tag "caboose/spectrum" %>
@@ -256,7 +263,6 @@ $(document).ready(function() {
256
263
  { name: 'btn_border_color', nice_name: "<%= 'border_color'.titleize %>", type: 'color', value: <%== Caboose.json(@theme.btn_border_color) %>, width: 400 },
257
264
  { name: 'btn_font_color', nice_name: "<%= 'font_color'.titleize %>", type: 'color', value: <%== Caboose.json(@theme.btn_font_color) %>, width: 400 },
258
265
  { name: 'btn_font_size', nice_name: "<%= 'font_size'.titleize %>", type: 'text', value: <%== Caboose.json(@theme.btn_font_size) %>, width: 400 },
259
- { name: 'btn_font_weight', nice_name: "<%= 'font_weight'.titleize %>", type: 'text', value: <%== Caboose.json(@theme.btn_font_weight) %>, width: 400 },
260
266
  { name: 'btn_font_case', nice_name: "<%= 'font_case'.titleize %>", type: 'select', value: <%== Caboose.json(@theme.btn_font_case) %>, options: [{'text':'none','value':'none'},{'text':'uppercase','value':'uppercase'},{'text':'lowercase','value':'lowercase'}], width: 400 },
261
267
  { name: 'btn_border_side', nice_name: "<%= 'border_side'.titleize %>", type: 'select', options: [{'text':'none','value':'none'},{'text':'all','value':'all'},{'text':'bottom','value':'bottom'}], value: <%== Caboose.json(@theme.btn_border_side) %>, width: 400 },
262
268
  { name: 'input_border_radius', nice_name: "<%= 'border_radius'.titleize %>", type: 'text', value: <%== Caboose.json(@theme.input_border_radius) %>, width: 400 },
@@ -315,7 +321,14 @@ $(document).ready(function() {
315
321
  { name: 'note_error_bg', nice_name: "<%= 'note_error_background'.titleize %>", type: 'color', value: <%== Caboose.json(@theme.note_error_bg) %>, width: 400 },
316
322
  { name: 'note_loading_bg', nice_name: "<%= 'note_loading_background'.titleize %>", type: 'color', value: <%== Caboose.json(@theme.note_loading_bg) %>, width: 400 },
317
323
  { name: 'note_success_bg', nice_name: "<%= 'note_success_background'.titleize %>", type: 'color', value: <%== Caboose.json(@theme.note_success_bg) %>, width: 400 },
318
- { name: 'nav_lineheight_offset', nice_name: "<%= 'nav_line_height_offset'.titleize %>", type: 'text', value: <%== Caboose.json(@theme.nav_lineheight_offset) %>, width: 400 }
324
+ { name: 'nav_lineheight_offset', nice_name: "<%= 'nav_line_height_offset'.titleize %>", type: 'text', value: <%== Caboose.json(@theme.nav_lineheight_offset) %>, width: 400 },
325
+ { name: 'mobile_header_height', nice_name: 'Height', type: 'text', value: <%== Caboose.json(@theme.mobile_header_height) %>, width: 400 },
326
+ { name: 'mobile_logo_width', nice_name: 'Logo Width', type: 'text', value: <%== Caboose.json(@theme.mobile_logo_width) %>, width: 400 },
327
+ { name: 'mobile_logo_height', nice_name: 'Logo Height', type: 'text', value: <%== Caboose.json(@theme.mobile_logo_height) %>, width: 400 },
328
+ { name: 'mobile_logo_top_padding', nice_name: 'Logo Top Padding', type: 'text', value: <%== Caboose.json(@theme.mobile_logo_top_padding) %>, width: 400 },
329
+ { name: 'constrain_footer', nice_name: 'Constrain', type: 'select', options: [{'text':'Yes','value':'Yes'},{'text':'No','value':'No'}], value: <%== Caboose.json(@theme.constrain_footer) %>, width: 400 },
330
+ { name: 'heading_base_font_size', nice_name: 'Heading Base Font Size', type: 'text', value: <%== Caboose.json(@theme.heading_base_font_size) %>, width: 400 }
331
+
319
332
  ]
320
333
  });
321
334
  });
@@ -36,7 +36,6 @@
36
36
  <span>$btn-font-color: <%= @theme.btn_font_color %></span>
37
37
  <span>$btn-font: button-font</span>
38
38
  <span>$btn-font-size: <%= @theme.btn_font_size %></span>
39
- <span>$btn-font-weight: <%= @theme.btn_font_weight %></span>
40
39
  <span>$btn-font-case: <%= @theme.btn_font_case %></span>
41
40
  <span>$btn-border-side: <%= @theme.btn_border_side %></span>
42
41
  <span>$input-border-radius: <%= @theme.input_border_radius %></span>
@@ -72,6 +71,11 @@
72
71
  <span>$actual_footer_height: <%= @theme.actual_footer_height %></span>
73
72
  <span>$actual_banner_height: <%= @theme.actual_banner_height %></span>
74
73
  <span>$dropdown_nav_padding: <%= @theme.dropdown_nav_padding %></span>
74
+ <span>$mobile_header_height: <%= @theme.mobile_header_height %></span>
75
+ <span>$mobile_logo_width: <%= @theme.mobile_logo_width %></span>
76
+ <span>$mobile_logo_height: <%= @theme.mobile_logo_height %></span>
77
+ <span>$mobile_logo_top_padding: <%= @theme.mobile_logo_top_padding %></span>
78
+ <span>$heading_base_font_size: <%= @theme.heading_base_font_size %></span>
75
79
 
76
80
  </aside>
77
81
  <div class="holder">
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.191'
2
+ VERSION = '0.9.192'
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.9.191
4
+ version: 0.9.192
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-02 00:00:00.000000000 Z
11
+ date: 2018-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg