caboose-cms 0.9.63 → 0.9.64

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d8d3813a766f7029297bb4f08ee73dac892e4e8
4
- data.tar.gz: efa67048c5b4d6de6d255f69fb64252da1fa40e4
3
+ metadata.gz: c05e137cd6e27972d585cb2a92b3da5d0a953d4c
4
+ data.tar.gz: 1f84a4eb9232ef323d070bf225e4b8c571451364
5
5
  SHA512:
6
- metadata.gz: e36b85117b20a2909c007d969c7bb3819f2fa81c5313274fb941909149ba3ef64c5409b6a94c7ce27d2bbc4504530389729721881c716fb5f6c6befbf112c281
7
- data.tar.gz: 2a15256ba40389fb2fd52dfe0d11fbce6463c53a79b4711a6254b705eb87231bd6eb88f948002f05734db9451ac58197b415fa81fc3d744b34a229f50be4c0b5
6
+ metadata.gz: 00effcc5fc52ef32a1d7990a807276ab3162e4a4ba5e85b61a3fde70e0d9df7d40758048a58c7762f581be201e268caf36c17b05f9cdbfc568f17eceb3407071
7
+ data.tar.gz: c2fe489c22d2efd3f369491c3d8bfa275918d1cbe72504ada8f97d80ff582abaada41fa5b9c4bbc805a2ba3859de65573571a9e2d934d08e8867b21356008635
@@ -206,32 +206,32 @@ BlockContentController.prototype = {
206
206
  {
207
207
  var that = this;
208
208
  if (this.selected_block_ids.indexOf(block_id) == -1)
209
- this.selected_block_ids.push(block_id);
209
+ this.selected_block_ids.push(block_id);
210
210
  var other_count = this.selected_block_ids.length - 1;
211
-
212
211
  if (!confirm)
213
212
  {
214
213
  var message = "Are you sure you want to delete this block";
215
214
  if (other_count > 0)
216
215
  message += " and the " + other_count + " other selected block" + (other_count == 1 ? '' : 's');
217
216
  message += "?<br />";
218
-
219
217
  var p = $('<p/>')
220
218
  .addClass('caboose_note delete')
221
219
  .append(message)
222
220
  .append($('<input/>').attr('type', 'button').val('Yes').click(function(e) { e.preventDefault(); e.stopPropagation(); that.delete_block(block_id, true); })).append(" ")
223
- .append($('<input/>').attr('type', 'button').val('No').click(function(e) { e.preventDefault(); e.stopPropagation(); }));
221
+ .append($('<input/>').attr('type', 'button').val('No').click(function(e) { e.preventDefault(); e.stopPropagation(); that.render_block(block_id); }));
224
222
  $('#block_' + block_id).attr('onclick','').unbind('click');
225
223
  $('#block_' + block_id).empty().append(p);
226
224
  return;
227
225
  }
228
- for (var i in this.selected_block_ids) {
229
- var bid = this.selected_block_ids[i];
230
- $('#block_' + bid).remove();
231
- that.delete_block_save(bid);
226
+ else {
227
+ for (var i in this.selected_block_ids) {
228
+ var bid = this.selected_block_ids[i];
229
+ $('#block_' + bid).remove();
230
+ that.delete_block_save(bid);
231
+ }
232
+ that.selected_block_ids = [];
233
+ that.add_dropzones();
232
234
  }
233
- that.selected_block_ids = [];
234
- that.add_dropzones();
235
235
  },
236
236
 
237
237
  delete_block_save: function(block_id) {
@@ -366,8 +366,7 @@ BlockContentController.prototype = {
366
366
  });
367
367
  }
368
368
 
369
- if ( $(v).parents('.content_wrapper').length > 0 )
370
- that.add_handles_to_block(bid);
369
+ that.add_handles_to_block(bid);
371
370
 
372
371
  });
373
372
 
@@ -378,23 +377,21 @@ BlockContentController.prototype = {
378
377
  var el = $('#block_' + block_id);
379
378
  if ( el.attr('id').indexOf('_value') >= 0 || el.children('.drag_handle').length > 0 )
380
379
  return true;
381
- $('#block_' + block_id + ' *').attr('onclick', '').unbind('click');
382
- el
383
- .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(); }))
380
+ if ( el.parents('.content_body').length > 0 ) {
381
+ $('#block_' + block_id + ' *').attr('onclick', '').unbind('click');
382
+ 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(); }))
384
383
  .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); }))
385
384
  .prepend($('<a/>').attr('id', 'handle_block_' + block_id + '_duplicate' ).addClass('duplicate_handle' ).append($('<span/>').addClass('ui-icon ui-icon-copy' )).click(function(e) { e.preventDefault(); e.stopPropagation(); that.duplicate_block(block_id); }))
386
385
  .prepend($('<a/>').attr('id', 'handle_block_' + block_id + '_delete' ).addClass('delete_handle' ).append($('<span/>').addClass('ui-icon ui-icon-close' )).click(function(e) { e.preventDefault(); e.stopPropagation(); that.delete_block(block_id); }));
386
+ el.mouseover(function(el) { $('#block_' + block_id).addClass( 'block_over'); });
387
+ el.mouseout(function(el) { $('#block_' + block_id).removeClass('block_over'); });
388
+ }
387
389
  el.attr('onclick','').unbind('click');
388
390
  el.click(function(e) {
389
391
  e.preventDefault();
390
392
  e.stopPropagation();
391
393
  that.edit_block(block_id);
392
394
  });
393
- var show_mouseover = true;
394
- if (show_mouseover) {
395
- el.mouseover(function(el) { $('#block_' + block_id).addClass( 'block_over'); });
396
- el.mouseout(function(el) { $('#block_' + block_id).removeClass('block_over'); });
397
- }
398
395
  },
399
396
 
400
397
  /*****************************************************************************
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.63'
2
+ VERSION = '0.9.64'
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.63
4
+ version: 0.9.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-02 00:00:00.000000000 Z
11
+ date: 2017-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg