caboose-cms 0.8.50 → 0.8.51

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: 11ccf530449523a7c1acc40056546a113ea02603
4
- data.tar.gz: 46446d0c93c7a5a8ba9e4e95c58fa50ed810abae
3
+ metadata.gz: 8a4aad5fd207db5f2deb5a57391e8da46c926966
4
+ data.tar.gz: affde0cc83a0a9a3c470779c4d3e9a825bdfe4db
5
5
  SHA512:
6
- metadata.gz: eee9bdeb8df4a068b3fab66d6b8c775ca29c699d01074c099eb2bac0fcbdd33a5b8b79be3a4ef37698bc01f7231fd67e15e5e8f35c80ce6f6ee3abdda8a644ce
7
- data.tar.gz: 9721bd6f8b12ec8c789126c0fbf8a9bf424c572dc3bb5a20a78c6db1d4cb5729f888736a058d04b0b915cb44e87a102035c4f9403d74bb8840f18f4415583bcc
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.cat.media.length > 0)
309
+ if (that.media.length > 0)
310
310
  {
311
- $.each(that.cat.media, function(i, m) {
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.cat.media, function(i, m) {
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.cat.media, function(i, m) {
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.cat.media, function(i, m) {
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.cat.id,
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.cat.media.length > 0)
536
+ if (that.media.length > 0)
537
537
  {
538
- $.each(that.cat.media, function(i, m2) {
538
+ $.each(that.media, function(i, m2) {
539
539
  if (parseInt(m2.id) == parseInt(media_id))
540
540
  {
541
541
  m = m2;
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.8.50'
2
+ VERSION = '0.8.51'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.50
4
+ version: 0.8.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry