caboose-cms 0.8.50 → 0.8.51
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 +4 -4
- data/app/assets/javascripts/caboose/admin_media_index.js +44 -44
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a4aad5fd207db5f2deb5a57391e8da46c926966
|
|
4
|
+
data.tar.gz: affde0cc83a0a9a3c470779c4d3e9a825bdfe4db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2711f20fa46a45ccb0b7d3d94caf218878e43e5da840c74a0c93d86fc91c6b0f5416f20880e2180e2c07c604955ec439863f0648b88cb5936c718c4c5e52dc91
|
|
7
|
+
data.tar.gz: 67a19e2eb4b842ee3a67a206fc82153a8445f88ba648295d6d4d726313a931daaa0936e1ff222bccf78081d4477d90d5b16e56d52555fda827c355e92583387a
|
|
@@ -6,7 +6,8 @@ MediaController.prototype = {
|
|
|
6
6
|
top_cat_id: false,
|
|
7
7
|
cat: false,
|
|
8
8
|
cat_id: false,
|
|
9
|
-
categories: false,
|
|
9
|
+
categories: false,
|
|
10
|
+
media: false,
|
|
10
11
|
s3_upload_url: false,
|
|
11
12
|
aws_access_key_id: false,
|
|
12
13
|
policy: false,
|
|
@@ -43,6 +44,39 @@ MediaController.prototype = {
|
|
|
43
44
|
that.refresh_media();
|
|
44
45
|
that.print_controls();
|
|
45
46
|
},
|
|
47
|
+
|
|
48
|
+
refresh_categories: function(after)
|
|
49
|
+
{
|
|
50
|
+
var that = this;
|
|
51
|
+
$.ajax({
|
|
52
|
+
url: '/admin/media-categories/flat-tree',
|
|
53
|
+
type: 'get',
|
|
54
|
+
async: false,
|
|
55
|
+
success: function(resp) {
|
|
56
|
+
that.categories = resp;
|
|
57
|
+
if (!that.cat_id)
|
|
58
|
+
that.cat_id = that.categories[0].id;
|
|
59
|
+
that.print_categories();
|
|
60
|
+
if (after) after();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
refresh_media: function()
|
|
66
|
+
{
|
|
67
|
+
var that = this;
|
|
68
|
+
$.ajax({
|
|
69
|
+
url: '/admin/media/json',
|
|
70
|
+
type: 'get',
|
|
71
|
+
async: false,
|
|
72
|
+
data: { media_category_id: that.cat_id },
|
|
73
|
+
success: function(resp) {
|
|
74
|
+
that.media = resp;
|
|
75
|
+
that.selected_media = [];
|
|
76
|
+
that.print_media();
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
},
|
|
46
80
|
|
|
47
81
|
change_sort_order: function(list) {
|
|
48
82
|
var that = this;
|
|
@@ -162,41 +196,7 @@ MediaController.prototype = {
|
|
|
162
196
|
$("#the_uploader").slideDown();
|
|
163
197
|
}
|
|
164
198
|
},
|
|
165
|
-
|
|
166
|
-
refresh_categories: function(after)
|
|
167
|
-
{
|
|
168
|
-
var that = this;
|
|
169
|
-
$.ajax({
|
|
170
|
-
url: '/admin/media-categories/flat-tree',
|
|
171
|
-
type: 'get',
|
|
172
|
-
async: false,
|
|
173
|
-
success: function(resp) {
|
|
174
|
-
that.categories = resp;
|
|
175
|
-
if (!that.cat_id)
|
|
176
|
-
that.cat_id = that.categories[0].id;
|
|
177
|
-
that.print_categories();
|
|
178
|
-
if (after) after();
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
|
|
183
|
-
refresh_media: function()
|
|
184
|
-
{
|
|
185
|
-
var that = this;
|
|
186
|
-
$.ajax({
|
|
187
|
-
url: '/admin/media/json',
|
|
188
|
-
type: 'get',
|
|
189
|
-
async: false,
|
|
190
|
-
data: { media_category_id: that.cat_id },
|
|
191
|
-
success: function(resp) {
|
|
192
|
-
that.cat = resp;
|
|
193
|
-
that.cat_id = that.cat.id;
|
|
194
|
-
that.selected_media = [];
|
|
195
|
-
that.print_media();
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
},
|
|
199
|
-
|
|
199
|
+
|
|
200
200
|
check_processing_status: function()
|
|
201
201
|
{
|
|
202
202
|
var that = this;
|
|
@@ -306,9 +306,9 @@ MediaController.prototype = {
|
|
|
306
306
|
var that = this;
|
|
307
307
|
var ul = $('<ul/>');
|
|
308
308
|
var processing = false;
|
|
309
|
-
if (that.
|
|
309
|
+
if (that.media.length > 0)
|
|
310
310
|
{
|
|
311
|
-
$.each(that.
|
|
311
|
+
$.each(that.media, function(i, m) {
|
|
312
312
|
if (m.media_type == 'image' && m.processed == false)
|
|
313
313
|
processing = true
|
|
314
314
|
var li = $('<li/>')
|
|
@@ -345,7 +345,7 @@ MediaController.prototype = {
|
|
|
345
345
|
setTimeout(function() { that.check_processing_status(); }, 2000);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
$.each(that.
|
|
348
|
+
$.each(that.media, function(i, m) {
|
|
349
349
|
$('li.media').draggable({
|
|
350
350
|
multiple: true,
|
|
351
351
|
revert: 'invalid',
|
|
@@ -381,7 +381,7 @@ MediaController.prototype = {
|
|
|
381
381
|
|
|
382
382
|
// See if they're all selected
|
|
383
383
|
var all_selected = true;
|
|
384
|
-
$.each(that.
|
|
384
|
+
$.each(that.media, function(i, m) {
|
|
385
385
|
if (that.selected_media.indexOf(m.id) == -1)
|
|
386
386
|
{
|
|
387
387
|
all_selected = false
|
|
@@ -396,7 +396,7 @@ MediaController.prototype = {
|
|
|
396
396
|
// And re-select everything if not everything was previously selected
|
|
397
397
|
if (!all_selected)
|
|
398
398
|
{
|
|
399
|
-
$.each(that.
|
|
399
|
+
$.each(that.media, function(i, m) {
|
|
400
400
|
$('#media' + m.id).addClass('selected ui-selected');
|
|
401
401
|
that.selected_media[i] = m.id;
|
|
402
402
|
});
|
|
@@ -489,7 +489,7 @@ MediaController.prototype = {
|
|
|
489
489
|
url: '/admin/media-categories',
|
|
490
490
|
type: 'post',
|
|
491
491
|
data: {
|
|
492
|
-
parent_id: that.
|
|
492
|
+
parent_id: that.cat_id,
|
|
493
493
|
name: name
|
|
494
494
|
},
|
|
495
495
|
success: function(resp) {
|
|
@@ -533,9 +533,9 @@ MediaController.prototype = {
|
|
|
533
533
|
{
|
|
534
534
|
var that = this;
|
|
535
535
|
var m = false;
|
|
536
|
-
if (that.
|
|
536
|
+
if (that.media.length > 0)
|
|
537
537
|
{
|
|
538
|
-
$.each(that.
|
|
538
|
+
$.each(that.media, function(i, m2) {
|
|
539
539
|
if (parseInt(m2.id) == parseInt(media_id))
|
|
540
540
|
{
|
|
541
541
|
m = m2;
|
data/lib/caboose/version.rb
CHANGED