caboose-cms 0.6.5 → 0.6.6
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTIzN2Y4OGIxMGM5NTU5MDEzN2UxZmEyZGY3Nzc1ZWFkMTY2MWQ4ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjhlYjk4ODE3NDIyYzNjYmU5ZWM1YjI4MzU2NDk3NzJkOTMzMGM1OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzRjYjNkNWIwYjk2MDUxODM3YmQyZDZhMjFkNTMwN2EwOGQ0Mzc3NjMzMTJl
|
10
|
+
Yjc5Mzk1NjUzMDgxZTUxMDRmMzI5NGNkZWQzM2E2MjY0ZjU0NGM2MjBhZWMw
|
11
|
+
ZDViYjVjNjU5MmE0ZWI1ZTYyMjQxNGZiOWNlM2YzYTc1M2JmN2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGQ0NjI2OTZjZWYwYjFiOGY2ZDY4ZWVjYmRkZTFhZTdiOWMyZDM2MzE1MjMy
|
14
|
+
ODRkMjVkYmZmZWNiYTZmMWMzMmEzOWY1ZjMxY2Q5NDQzNTkxMTU2MjAyNWFl
|
15
|
+
Mjg0MGE1NmRmMjMzYzU0YjMwYmI2ZGQzNTdiZDZiMWI0Y2Q2MDA=
|
@@ -230,7 +230,7 @@ MediaController.prototype = {
|
|
230
230
|
if (that.cat.media.length > 0)
|
231
231
|
{
|
232
232
|
$.each(that.cat.media, function(i, m) {
|
233
|
-
if (m.
|
233
|
+
if (m.media_type == 'image' && m.processed == false)
|
234
234
|
processing = true
|
235
235
|
var li = $('<li/>')
|
236
236
|
.attr('id', 'media' + m.id)
|
@@ -261,7 +261,7 @@ MediaController.prototype = {
|
|
261
261
|
start: function() { $(this).data("origPosition", $(this).position()); }
|
262
262
|
});
|
263
263
|
});
|
264
|
-
},
|
264
|
+
},
|
265
265
|
|
266
266
|
//============================================================================
|
267
267
|
|
data/app/models/caboose/media.rb
CHANGED
@@ -74,10 +74,18 @@ class Caboose::Media < ActiveRecord::Base
|
|
74
74
|
:description => self.description,
|
75
75
|
:processed => self.processed,
|
76
76
|
:image_urls => self.image_urls,
|
77
|
-
:file_url => self.file ? self.file.url : nil
|
77
|
+
:file_url => self.file ? self.file.url : nil,
|
78
|
+
:media_type => self.is_image? ? 'image' : 'file'
|
78
79
|
}
|
79
80
|
end
|
80
81
|
|
82
|
+
def is_image?
|
83
|
+
image_extensions = ['.jpg', '.jpeg', '.gif', '.png', '.tif']
|
84
|
+
ext = File.extname(self.original_name).downcase
|
85
|
+
return true if image_extensions.include?(ext)
|
86
|
+
return false
|
87
|
+
end
|
88
|
+
|
81
89
|
def image_urls
|
82
90
|
return nil if self.image.nil? || self.image.url(:tiny).starts_with?('http://placehold.it')
|
83
91
|
return {
|
data/lib/caboose/version.rb
CHANGED