caboose-cms 0.9.90 → 0.9.91

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: 8db1d5dd7b28bb3c07904747001fc0057bcbd240
4
- data.tar.gz: 0441edec2da5b23eeb8791ae95412b5d67c3aed2
3
+ metadata.gz: 99839730ea370085978e97d59472d8cf8f865d14
4
+ data.tar.gz: e96993941de7a4617bcfa774260f0325b52d2f95
5
5
  SHA512:
6
- metadata.gz: e6cab2ac89d12cceeb46d228c5390c4897769caea0eb5c550c7774047c373de126ac3c8521efea95966abfa89bc582bc2b7a59ec00f7e0e4c84bf23aaf426d62
7
- data.tar.gz: 8a6895eb6dc5b837a80f52726d8cd9c8dad6fd82b4c0fe1ecf619138c68a7b88e53eaffc925e4f3ef57b908b9f9a32a6323f420346db9f2da153ebca52807b3d
6
+ metadata.gz: 0b1b04cf4e4733518d28a41e726dce56da82ab6af368af1e011b7b19852f2a56bcbca601bc9ae550f7e07126474bbc088b5667741211fe60d8083d1466e2edb7
7
+ data.tar.gz: 628e14e0078e2ea8a64497d441a2c36dd0c2105c4dbe0ecbbf0dec059a35699c470309dfc37c416d5b5b5497788610c827ffae92a573a6597f854aed841234bd
@@ -17,6 +17,8 @@ MediaController.prototype = {
17
17
  allow_edit: false,
18
18
  feather_editor: false,
19
19
  last_upload_processed: false,
20
+ ajax_count: 0,
21
+ ajax_limit: 20,
20
22
 
21
23
  init: function(params) {
22
24
  var that = this;
@@ -180,6 +182,7 @@ MediaController.prototype = {
180
182
  },
181
183
  UploadComplete: function(up, files) {
182
184
  that.refresh();
185
+ that.ajax_count = 0;
183
186
  if (that.uploader)
184
187
  {
185
188
  $("#the_uploader").slideUp(400, function() {
@@ -197,21 +200,24 @@ MediaController.prototype = {
197
200
  check_processing_status: function()
198
201
  {
199
202
  var that = this;
203
+ console.log("ajax count: " + that.ajax_count + " out of " + that.ajax_limit);
200
204
  if (!that.last_upload_processed)
201
205
  that.last_upload_processed = new Date();
202
-
203
- $.ajax({
204
- url: '/admin/media/last-upload-processed',
205
- type: 'get',
206
- success: function(resp) {
207
- var d = Date.parse(resp['last_upload_processed']);
208
- if (d > that.last_upload_processed)
209
- that.refresh_media();
210
- else
211
- setTimeout(function() { that.check_processing_status(); }, 2000);
212
- that.last_upload_processed = d;
213
- }
214
- });
206
+ if ( that.ajax_count < that.ajax_limit ) {
207
+ $.ajax({
208
+ url: '/admin/media/last-upload-processed',
209
+ type: 'get',
210
+ success: function(resp) {
211
+ that.ajax_count += 1;
212
+ var d = Date.parse(resp['last_upload_processed']);
213
+ if (d > that.last_upload_processed)
214
+ that.refresh_media();
215
+ else
216
+ setTimeout(function() { that.check_processing_status(); }, 3000);
217
+ that.last_upload_processed = d;
218
+ }
219
+ });
220
+ }
215
221
  },
216
222
 
217
223
  print_categories: function()
@@ -357,7 +363,7 @@ MediaController.prototype = {
357
363
  if (that.refresh_unprocessed_images == true && processing)
358
364
  {
359
365
  //setTimeout(function() { that.refresh_media(); }, 2000);
360
- setTimeout(function() { that.check_processing_status(); }, 2000);
366
+ setTimeout(function() { that.check_processing_status(); }, 3000);
361
367
  }
362
368
 
363
369
  $.each(that.media, function(i, m) {
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.90'
2
+ VERSION = '0.9.91'
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.90
4
+ version: 0.9.91
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-11-15 00:00:00.000000000 Z
11
+ date: 2017-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg