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 +4 -4
- data/app/assets/javascripts/caboose/admin_media_index.js +20 -14
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99839730ea370085978e97d59472d8cf8f865d14
|
4
|
+
data.tar.gz: e96993941de7a4617bcfa774260f0325b52d2f95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
that.
|
210
|
-
|
211
|
-
|
212
|
-
|
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(); },
|
366
|
+
setTimeout(function() { that.check_processing_status(); }, 3000);
|
361
367
|
}
|
362
368
|
|
363
369
|
$.each(that.media, function(i, m) {
|
data/lib/caboose/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|