caboose-cms 0.8.56 → 0.8.57

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: a8aa462e50b81de8d5a19890e06e9718f2f9367d
4
- data.tar.gz: c4ef0bfb833d42461bfa368bbb4b878325e0f5d9
3
+ metadata.gz: 46cad8ef370ab797b7f36acf01536f50c4194d33
4
+ data.tar.gz: 8f8db6b566034b216a86337aacf9aab8fdec23d7
5
5
  SHA512:
6
- metadata.gz: 9846f063fd1665761671434ff3dc532862b3ce53f731f87da4d3adda37ae854c82e5bfc6258d7b5cc3746695366c1b86059336909b1de1dbd7360b1c1986a9d7
7
- data.tar.gz: dd87b9498fcf43e04ac1c365c0d8a8989b88f5bf3c5aee720313c2350f9d374fb293aaad1cfc3e7e920f2416a46c9c124680188297ba207b74da3cc023c895a4
6
+ metadata.gz: f6b53ec696e54189d76d3726f100e194d86a5161b7c840f6a04a18d729814745ca7bc81381aacd2d1760962beb26eaf93e62d12684a4cb0aeb4e042dc46276a7
7
+ data.tar.gz: 10473972752dd1cd0f8aa7646aeff8501c72970ae4ca975613a8b689c5130b8cbe76592caecf289cc6c60d0bf45c8139cf060e926cc88454e94fb29f8742e47e
@@ -260,8 +260,9 @@ PageContentController.prototype = {
260
260
  );
261
261
  }
262
262
  }
263
-
264
- $('#block_' + b.id).attr('onclick','').unbind('click');
263
+
264
+ $('#block_' + b.id + ' *').attr('onclick', '').unbind('click');
265
+ $('#block_' + b.id).attr('onclick','').unbind('click');
265
266
  $('#block_' + b.id).click(function(e) {
266
267
  e.preventDefault();
267
268
  e.stopPropagation();
@@ -115,7 +115,7 @@ var BlockModalController = ModalController.extend({
115
115
  }
116
116
  }
117
117
  $('#modal_content').replaceWith(div);
118
- that.render_blocks();
118
+ that.render_child_blocks();
119
119
  that.autosize();
120
120
  },
121
121
 
@@ -193,16 +193,16 @@ var BlockModalController = ModalController.extend({
193
193
  Block Rendering
194
194
  *****************************************************************************/
195
195
 
196
- render_blocks: function()
196
+ render_child_blocks: function()
197
197
  {
198
198
  var that = this;
199
199
  if (that.block.block_type.field_type != 'block' && that.block.children.length == 0)
200
200
  return;
201
201
 
202
- $.each(that.block.children, function(i, b) { that.render_block(b); });
202
+ $.each(that.block.children, function(i, b) { that.render_child_block(b); });
203
203
  },
204
204
 
205
- render_block: function(b)
205
+ render_child_block: function(b)
206
206
  {
207
207
  var that = this;
208
208
  if (that.complex_field_types.indexOf(b.block_type.field_type) > -1)
@@ -73,16 +73,18 @@ module Caboose
73
73
  def admin_json
74
74
  return if !user_is_allowed('media', 'view')
75
75
  render :json => false and return if @site.nil?
76
- #id = params[:media_category_id]
77
- #cat = id ? MediaCategory.find(id) : MediaCategory.top_category(@site.id)
78
- #render :json => cat.api_hash
79
-
76
+
80
77
  arr = Media.where(:media_category_id => params[:media_category_id]).reorder(:sort_order).all
81
- render :json => arr.collect{ |m| m.api_hash }
82
-
83
- #cat = id ? MediaCategory.find(id) : MediaCategory.top_category(@site.id)
84
- #render :json => cat.api_hash
85
-
78
+ render :json => arr.collect{ |m| m.api_hash }
79
+ end
80
+
81
+ # @route GET /admin/media/:id/json
82
+ def admin_json_single
83
+ return if !user_is_allowed('media', 'view')
84
+ render :json => false and return if @site.nil?
85
+
86
+ m = Media.where(:id => params[:id]).first
87
+ render :json => m.api_hash
86
88
  end
87
89
 
88
90
  # @route GET /admin/media/last-upload-processed
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.8.56'
2
+ VERSION = '0.8.57'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.56
4
+ version: 0.8.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry