caboose-cms 0.9.68 → 0.9.69

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: 3740d98e50a2e6558a49bca0525a37fcf544733c
4
- data.tar.gz: bbf0b080b4fc7283ad1d1cea14cd2a67e8f8d975
3
+ metadata.gz: 831370d428d4a0786206a9f5b8e54526ff3f9c39
4
+ data.tar.gz: a01277ddc1bb65442d2ca545bb05fbfbf7e3abcf
5
5
  SHA512:
6
- metadata.gz: c66ee2560897a8063e4f105867c42d53e5350619a227c19b85442914288d70b0eb7136260cdf90f0524ab97e5ccb5a2641a1a427a39b93a6d660bfc5d4a44eab
7
- data.tar.gz: 7cca0d9adc8d03e3aa197ba71c86ca2b37346887a65285f6aa7dcdb9e6fc37d0f22bbcb6336457a3c496cb73df3064332fba94832f2413a000b8f0f425629093
6
+ metadata.gz: a58535527e87f529273d0899fa31a3723190cf6cbc640eb5b4edf9371a5b3dd45ef529ee7c7c999b65954ba8d0cfc4e7100d981187fe09708c62e2504cf35bc2
7
+ data.tar.gz: 4b2f1c9ff9053eb199c3da28fa9a5346c499b7d395ce61cffbdc016f22be88da4f9af0d7d1f51aaeab9d5e71b8aab0f779a8feac74909e55c5222f5e692d7522
@@ -140,7 +140,6 @@ BlockContentController.prototype = {
140
140
  $("#caboose-loading").fadeOut();
141
141
  },
142
142
 
143
-
144
143
  move_block: function(block_id, parent_id, before_block_id, after_block_id) {
145
144
  var that = this;
146
145
  var block_id = block_id.replace('block_','');
@@ -155,9 +154,11 @@ BlockContentController.prototype = {
155
154
  else if (after_block_id)
156
155
  $('#block_' + after_block_id).after(el);
157
156
  else if (parent_id) {
158
- if ( $('#block_' + parent_id).children('.content_body').children('.new_block_link.np').length > 0 ) {
159
- $('#block_' + parent_id).children('.content_body').children('.new_block_link.np').remove();
160
- $('#block_' + parent_id).find('.content_body').append(el);
157
+ var el2 = $('#block_' + parent_id).find('.content_body').first();
158
+ var first_parent_block = el2.parents("[id^='block_']").first();
159
+ if ( ('block_' + parent_id) == first_parent_block.attr('id') && el2.children('.new_block_link.np').length > 0 ) {
160
+ el2.children('.new_block_link.np').remove();
161
+ el2.append(el);
161
162
  }
162
163
  else
163
164
  $('#block_' + parent_id).append(el);
@@ -169,7 +170,6 @@ BlockContentController.prototype = {
169
170
  }
170
171
  },
171
172
 
172
-
173
173
  move_block_save: function(block_id, parent_id, before_block_id, after_block_id) {
174
174
  var that = this;
175
175
  var block_id = block_id.replace('block_','');
@@ -750,23 +750,38 @@ IndexTable.prototype = {
750
750
  $('#export_message').html("<p class='loading'>Creating export...</p>");
751
751
  var qs = {};
752
752
  $.each(p, function(k,v) { if (k != '[object Object]') qs[k] = v; });
753
- $.ajax({ url: h.url, type: h.type, data: qs, success: function(resp) { h.status_url = h.status_url(resp); }, async: false });
754
- setTimeout(function() { that.csv_export_status(h); }, 1000);
753
+ $.ajax({
754
+ url: h.url,
755
+ type: h.type,
756
+ data: qs,
757
+ success: function(resp) {
758
+ h.status_url = h.status_url(resp);
759
+ setTimeout(function() { that.csv_export_status(h); }, 1000);
760
+ }
761
+ });
762
+
755
763
  },
756
764
 
757
765
  csv_export_status: function(h)
758
766
  {
759
767
  var that = this;
760
- $.ajax({
761
- url: h.status_url,
762
- type: 'get',
763
- success: function(resp) {
764
- if (h.ready(resp))
765
- window.location = h.final_url(resp);
766
- else
767
- setTimeout(function() { that.csv_export_status(h); }, 1000);
768
- }
769
- });
768
+ if ( typeof h.status_url === "function") {
769
+ console.log('error');
770
+ }
771
+ else {
772
+ $.ajax({
773
+ url: h.status_url,
774
+ type: 'get',
775
+ success: function(resp) {
776
+ if (h.ready(resp)) {
777
+ $('#export_message').html("");
778
+ window.location = h.final_url(resp);
779
+ }
780
+ else
781
+ setTimeout(function() { that.csv_export_status(h); }, 1000);
782
+ }
783
+ });
784
+ }
770
785
  },
771
786
 
772
787
  pager_div: function(summary)
@@ -545,6 +545,7 @@ module Caboose
545
545
  resp = StdClass.new
546
546
  b = Block.find(params[:id])
547
547
  resp.new_id = b.duplicate_block(@site.id, params[:page_id], params[:post_id], b.block_type_id, b.parent_id)
548
+ resp.success = true
548
549
  render :json => resp
549
550
  end
550
551
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.68'
2
+ VERSION = '0.9.69'
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.68
4
+ version: 0.9.69
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-23 00:00:00.000000000 Z
11
+ date: 2017-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg