caboose-cms 0.9.143 → 0.9.144

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: a92776f5ed142c3e522858dd4ba25d6be8957e39
4
- data.tar.gz: 345197a5844595eaf4de3ea6ce9ca32049e1a3e7
3
+ metadata.gz: ad36e3ab078cfe4288197c147f011cd96206417e
4
+ data.tar.gz: 2f69c0326c4a6d12220aa33627f95111227dd6a1
5
5
  SHA512:
6
- metadata.gz: 533b503d91b9eb8e8805fe3af5b9dc002c998df0bf45319cfb77feb5f0247ee1c910c41b800b023f2ec4e70e84f3ae489baa085fce8ebd5b004a80cd5c471cd1
7
- data.tar.gz: 22ef7c2d5a27c51aeec9e40d966b6fdb8518c6c01cb45e3db78f3e2ff4296a06c47ca0496c7d757a05f9a8cd253ef4bc8ddb9b8d1a43a5c1499dd68c1cbd1a3b
6
+ metadata.gz: a1038f36116c32ee019d71fd2ebf648e108344758ba24de2224196288bd535fd5afbeff9723f797cc90efe2812fe7ef108a514aebbd9405cb146cfaebc7b313a
7
+ data.tar.gz: a5f0124896a57daf5d6862cf55b3040dd0697cc3d0cb39756d8176837d8dc084972090b79bc704526214f4a3f713f996e7a28fbffa9b93777ebb44bfb876c207
@@ -214,7 +214,7 @@ BlockContentController.prototype = {
214
214
  that.is_modified();
215
215
  if ( before_block_id != block_id && after_block_id != block_id && parent_id != block_id ) {
216
216
  var original = $('#block_' + block_id);
217
- original.draggable('destroy');
217
+ if ( original.data('ui-draggable') ) { original.draggable('destroy'); }
218
218
  var el = original.detach();
219
219
  el.removeClass('ui-draggable-dragging, block_over');
220
220
  el.css({'left':'auto','right':'auto','bottom':'auto','top':'auto','height':'auto','width':'auto'});
@@ -232,6 +232,8 @@ BlockContentController.prototype = {
232
232
  else
233
233
  $('#block_' + parent_id).append(el);
234
234
  }
235
+ if ( el.data('height') ) { el.css('height', el.data('height')); }
236
+ if ( el.data('width') ) { el.css('width', el.data('width')); }
235
237
  that.move_block_save(block_id, parent_id, before_block_id, after_block_id);
236
238
  }
237
239
  },
@@ -146,7 +146,7 @@ var BlockModalController = ModalController.extend({
146
146
  var crumbs = $('<h2/>').css('margin-top', '0').css('padding-top', '0');
147
147
  $.each(that.block.crumbtrail, function(i, h) {
148
148
  if (i > 0) crumbs.append(' > ');
149
- if ( i == 0 || h['text'] == "Content" ) {
149
+ if ( i == 0 || (i == 1 && h['text'] == "Content" )) {
150
150
  crumbs.append($('<span/>').html(h['text']).data('block_id', h['block_id']));
151
151
  }
152
152
  else {
@@ -142,11 +142,11 @@ BoundSelect = BoundControl.extend({
142
142
 
143
143
  set_placeholder_padding: function() {
144
144
  var that = this;
145
- var w = $('#'+that.placeholder).outerWidth(true);
146
- if (w > 0)
147
- $('#'+that.el).css('padding-left', '+=' + w);
145
+ var w = $('#'+that.placeholder).outerWidth(true) + 10;
146
+ if (w > 10)
147
+ $('#'+that.el).css('padding-left', w);
148
148
  else
149
- setTimeout(function() { that.set_placeholder_padding(); }, 200);
149
+ setTimeout(function() { that.set_placeholder_padding(); }, 500);
150
150
  },
151
151
 
152
152
  //update_options: function() {
@@ -70,7 +70,7 @@ BoundText = BoundControl.extend({
70
70
  var that = this;
71
71
  var w = $('#'+that.el+'_placeholder').outerWidth() + 10;
72
72
  if (w > 10)
73
- $('#'+that.el).css('padding-left', + w);
73
+ $('#'+that.el).css('padding-left', w);
74
74
  else {
75
75
  setTimeout(function() { that.set_placeholder_padding(); }, 500);
76
76
  }
@@ -651,7 +651,7 @@ Page Bar Generator
651
651
  text-align: center;
652
652
  font-family: "Roboto", Arial;
653
653
  font-weight: 400;
654
- padding: 1px 15px 3px 15px;
654
+ padding: 1px 15px 2px 15px;
655
655
  height: auto;
656
656
  display: inline-block;
657
657
  margin: 0 auto;
@@ -674,7 +674,7 @@ Page Bar Generator
674
674
  text-align: center;
675
675
  font-family: "Roboto", Arial;
676
676
  font-weight: 400;
677
- padding: 1px 15px 3px 15px;
677
+ padding: 1px 15px 2px 15px;
678
678
  height: auto;
679
679
  display: inline-block;
680
680
  margin: 0 auto;
@@ -13,7 +13,7 @@
13
13
  #the_modal .mb_container input { border: #ccc 1px solid; }
14
14
  #the_modal div.mb_container div.mb_placeholder { top: 9px; }
15
15
  #the_modal div.mb_container div.mb_placeholder span { font-size: 16px; }
16
- #the_modal div.mb_container select { border: #ccc 1px solid; height: 36px; }
16
+ #the_modal div.mb_container select { border: #ccc 1px solid; height: 38px; }
17
17
  #the_modal div.mb_container select option { font-size: 16px; }
18
18
  #the_modal div.mb_container input[type=checkbox] { top: 12px; }
19
19
  #the_modal #modal_crumbtrail,
@@ -24,7 +24,7 @@ module Caboose
24
24
  render :file => "caboose/extras/error404" and return if @event.nil?
25
25
  @event = Caboose.plugin_hook('event_content', @event)
26
26
  @page.title = @event.name
27
- @editmode = !params['edit'].nil? && user.is_allowed('calendars', 'edit') ? true : false
27
+ # @editmode = !params['edit'].nil? && user.is_allowed('calendars', 'edit') ? true : false
28
28
  end
29
29
 
30
30
  # @route_priority 1
@@ -79,7 +79,9 @@ module Caboose
79
79
  page = Caboose.plugin_hook('page_content', page)
80
80
  @page = page
81
81
  @user = user
82
- @editmode = !params['edit'].nil? && user.is_allowed('pages', 'edit') ? true : false
82
+ @editing = false
83
+ @preview = false
84
+ # @editmode = !params['edit'].nil? && user.is_allowed('pages', 'edit') ? true : false
83
85
  # @crumb_trail = Caboose::Page.crumb_trail(@page)
84
86
  # @subnav = Caboose::Page.subnav(@page, session['use_redirect_urls'], @user)
85
87
  #@subnav.links = @tasks.collect {|href, task| {'href' => href, 'text' => task, 'is_current' => uri == href}}
@@ -26,8 +26,10 @@ module Caboose
26
26
  end
27
27
  render :file => "caboose/extras/error404" and return if @post.nil?
28
28
 
29
+ @editing = false
30
+ @preview = false
29
31
  @post = Caboose.plugin_hook('post_content', @post)
30
- @editmode = !params['edit'].nil? && user.is_allowed('posts', 'edit') ? true : false
32
+ # @editmode = !params['edit'].nil? && user.is_allowed('posts', 'edit') ? true : false
31
33
  end
32
34
 
33
35
  #=============================================================================
@@ -16,7 +16,7 @@ bt = @block_type
16
16
 
17
17
  <h2>Advanced</h2>
18
18
  <p><div id='blocktype_<%= bt.id %>_site_id' ></div></p>
19
- <p><div id='blocktype_<%= bt.id %>_parent_id' ></div></p>
19
+ <!-- <p><div id='blocktype_<%= bt.id %>_parent_id' ></div></p> -->
20
20
  <p><div id='blocktype_<%= bt.id %>_block_type_category_id' ></div></p>
21
21
  <p><div id='blocktype_<%= bt.id %>_field_type' ></div></p>
22
22
  <p><div id='blocktype_<%= bt.id %>_default' ></div></p>
@@ -89,7 +89,7 @@ $(document).ready(function() {
89
89
  allow_bulk_delete: false,
90
90
  allow_duplicate: false,
91
91
  fields: [
92
- { name: 'parent_id' , sort: 'parent_id' , show: false , bulk_edit: false, nice_name: 'Parent' , type: 'select' , value: function(bt) { return bt.parent_id; }, width: 400, options_url: '/admin/block-types/tree-options' },
92
+ // { name: 'parent_id' , sort: 'parent_id' , show: false , bulk_edit: false, nice_name: 'Parent' , type: 'select' , value: function(bt) { return bt.parent_id; }, width: 400, options_url: '/admin/block-types/tree-options' },
93
93
  { name: 'name' , sort: 'name' , show: true , bulk_edit: false, nice_name: 'Name' , type: 'text' , value: function(bt) { return bt.name; }, width: 400 },
94
94
  { name: 'description' , sort: 'description' , show: true , bulk_edit: false, nice_name: 'Description' , type: 'text' , value: function(bt) { return bt.description; }, width: 400 },
95
95
  { name: 'field_type' , sort: 'field_type' , show: true , bulk_edit: false, nice_name: 'Field type' , type: 'select' , value: function(bt) { return bt.field_type; }, width: 400, options_url: '/admin/block-types/field-type-options' },
@@ -99,7 +99,7 @@ $(document).ready(function() {
99
99
  { name: 'use_render_function_for_layout' , sort: 'use_render_function_for_layout' , show: true , bulk_edit: false, nice_name: 'Use Render Function for Modal' , type: 'checkbox' , value: function(bt) { return bt.use_render_function_for_layout; }, text: function(bt) { return bt.use_render_function_for_layout ? 'Yes' : 'No' }, width: 400 },
100
100
  { name: 'use_js_for_modal' , sort: 'use_js_for_modal' , show: true , bulk_edit: false, nice_name: 'Use JS for Modal' , type: 'checkbox' , value: function(bt) { return bt.use_js_for_modal; }, text: function(bt) { return bt.use_js_for_modal ? 'Yes' : 'No' }, width: 400 },
101
101
  { name: 'allow_child_blocks' , sort: 'allow_child_blocks' , show: true , bulk_edit: false, nice_name: 'Allow Child Blocks' , type: 'checkbox' , value: function(bt) { return bt.allow_child_blocks; }, text: function(bt) { return bt.allow_child_blocks ? 'Yes' : 'No' }, width: 400 },
102
- { name: 'default_child_block_type_id' , sort: 'default_child_block_type_id' , show: false , bulk_edit: false, nice_name: 'Default Child Block Type' , type: 'select' , value: function(bt) { return bt.default_child_block_type_id; }, width: 400, options_url: '/admin/block-types/options' },
102
+ { name: 'default_child_block_type_id' , sort: 'default_child_block_type_id' , show: false , bulk_edit: false, nice_name: 'Default Child Block Type ID' , type: 'text' , value: function(bt) { return bt.default_child_block_type_id; }, width: 400 },
103
103
  { name: 'render_function' , sort: 'render_function' , show: false , bulk_edit: false, nice_name: 'Render Function' , type: 'textarea' , value: function(bt) { return bt.render_function; }, width: 800, height: 200 },
104
104
  { name: 'default' , sort: 'default' , show: false , bulk_edit: false, nice_name: 'Default value' , type: 'text' , value: function(bt) { return bt.default; }, width: 400 },
105
105
  { name: 'width' , sort: 'width' , show: false , bulk_edit: false, nice_name: 'Width' , type: 'text' , value: function(bt) { return bt.width; }, width: 400 },
@@ -123,7 +123,7 @@ $(document).ready(function() {
123
123
  update_url: '/admin/block-types/<%= @block_type.id %>',
124
124
  authenticity_token: '<%= form_authenticity_token %>',
125
125
  attributes: [
126
- { name: 'parent_id' , nice_name: 'Parent' , type: 'select' , value: <%= raw Caboose.json(bt.parent_id) %>, width: 400, options_url: '/admin/block-types/tree-options' },
126
+ // { name: 'parent_id' , nice_name: 'Parent' , type: 'select' , value: <%= raw Caboose.json(bt.parent_id) %>, width: 400, options_url: '/admin/block-types/tree-options' },
127
127
  { name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= raw Caboose.json(bt.name) %>, width: 400 },
128
128
  { name: 'description' , nice_name: 'Description' , type: 'text' , value: <%= raw Caboose.json(bt.description) %>, width: 400 },
129
129
  { name: 'block_type_category_id' , nice_name: 'Category' , type: 'select' , value: <%= raw Caboose.json(bt.block_type_category_id) %>, width: 400, options_url: '/admin/block-type-categories/tree-options' },
@@ -132,7 +132,7 @@ $(document).ready(function() {
132
132
  { name: 'use_render_function_for_layout' , nice_name: 'Use Render Function for Modal' , type: 'checkbox' , value: <%= bt.use_render_function_for_layout ? 'true' : 'false' %>, width: 400 },
133
133
  { name: 'use_js_for_modal' , nice_name: 'Use JS for Modal' , type: 'checkbox' , value: <%= bt.use_js_for_modal ? 'true' : 'false' %>, width: 400 },
134
134
  { name: 'allow_child_blocks' , nice_name: 'Allow Child Blocks' , type: 'checkbox' , value: <%= bt.allow_child_blocks ? 'true' : 'false' %>, width: 400 },
135
- { name: 'default_child_block_type_id' , nice_name: 'Default Child Block Type' , type: 'select' , value: <%= raw Caboose.json(bt.default_child_block_type_id) %>, text: <%= raw Caboose.json(bt.default_child_block_type) %>, width: 400, options_url: '/admin/block-types/options' },
135
+ { name: 'default_child_block_type_id' , nice_name: 'Default Child Block Type ID' , type: 'text' , value: <%= raw Caboose.json(bt.default_child_block_type_id) %>, width: 400 },
136
136
  { name: 'render_function' , nice_name: 'Render Function' , type: 'textarea' , value: <%= raw Caboose.json(bt.render_function) %>, width: 800, height: 200 },
137
137
  { name: 'field_type' , nice_name: 'Field type' , type: 'select' , value: <%= raw Caboose.json(bt.field_type) %>, text: <%= raw Caboose.json(bt.field_type) %>, width: 400, options_url: '/admin/block-types/field-type-options' },
138
138
  { name: 'default' , nice_name: 'Default value' , type: 'text' , value: <%= raw Caboose.json(bt.default) %>, width: 400 },
@@ -28,7 +28,7 @@ $(document).ready(function() {
28
28
  { name: 'description' , sort: 'description' , show: false , bulk_edit: false, nice_name: 'Description' , type: 'text' , value: function(bt) { return bt.description; }, width: 400 },
29
29
  { name: 'field_type' , sort: 'field_type' , show: true , bulk_edit: false, nice_name: 'Field type' , type: 'select' , value: function(bt) { return bt.field_type; }, width: 400, options_url: '/admin/block-types/field-type-options' },
30
30
  { name: 'site_id' , sort: 'site_id' , show: false , bulk_edit: false, nice_name: 'Site' , type: 'checkbox-multiple' , value: function(bt) { return bt.sites ? bt.sites.map(function(s) { return s.id }) : []; }, text: function(bt) { return bt.sites ? bt.sites.map(function(s) { return s.description && s.description.length > 0 ? s.description : s.name }).join(', ') : ''; }, width: 400, height: 200, options_url: '/admin/block-types/site-options' },
31
- { name: 'parent_id' , sort: 'parent_id' , show: false , bulk_edit: false, nice_name: 'Parent' , type: 'select' , value: function(bt) { return bt.parent_id; }, width: 400, options_url: '/admin/block-types/tree-options' },
31
+ // { name: 'parent_id' , sort: 'parent_id' , show: false , bulk_edit: false, nice_name: 'Parent' , type: 'select' , value: function(bt) { return bt.parent_id; }, width: 400, options_url: '/admin/block-types/tree-options' },
32
32
  { name: 'block_type_category_id' , sort: 'block_type_category_id' , show: false , bulk_edit: false, nice_name: 'Category' , type: 'select' , value: function(bt) { return bt.block_type_category_id; }, width: 400, options_url: '/admin/block-type-categories/tree-options' },
33
33
  { name: 'is_global' , sort: 'is_global' , show: false , bulk_edit: false, nice_name: 'Global' , type: 'checkbox' , value: function(bt) { return bt.is_global ? 'Yes' : 'No'; }, width: 20 },
34
34
  { name: 'use_render_function' , sort: 'use_render_function' , show: true , bulk_edit: false, nice_name: 'Use Render Function' , type: 'checkbox' , value: function(bt) { return bt.use_render_function ? 'Yes' : 'No' }, width: 20 },
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.143'
2
+ VERSION = '0.9.144'
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.143
4
+ version: 0.9.144
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-05-29 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg