caboose-cms 0.8.66 → 0.8.67
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/block_modal_controllers/block_modal_controller.js +1 -1
- data/app/assets/javascripts/caboose/block_modal_controllers/media_modal_controller.js +26 -6
- data/app/assets/stylesheets/caboose/admin_block_edit_image.css.scss +15 -12
- data/app/views/caboose/blocks/_file.html.erb +1 -1
- 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: 650fd50d2cc40e1d916e15ed23930f3cff2427d6
|
4
|
+
data.tar.gz: 0cb4538479b27adf6d72fd3dcf640afdac72d071
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f745259efc0b4cfd3e37cce5ccfcf73903497a0f5c2c0f8ddc1798072425f41f34bd71684f94d7e2d32c2473d06e4f3e2324a9b03b19a5507f578788db9c91b
|
7
|
+
data.tar.gz: f0c6a9d6ef387930ea19b0dc393de4da1246fc386ca666a2d9d204d52dea90ffa1309b85c0cf11f39a6fabdf2edfc736bbcef9c919352a5cc847bf59a6679245
|
@@ -293,7 +293,7 @@ var BlockModalController = ModalController.extend({
|
|
293
293
|
});
|
294
294
|
}
|
295
295
|
|
296
|
-
$('#the_modal #block_' + b.id).attr('onclick','').unbind('click');
|
296
|
+
$('#the_modal #block_' + b.id).attr('onclick','').unbind('click');
|
297
297
|
$('#the_modal #block_' + b.id).click(function(e) {
|
298
298
|
e.stopPropagation();
|
299
299
|
that.parent_controller.edit_block(b.id);
|
@@ -99,6 +99,22 @@ var MediaModalController = BlockModalController.extend({
|
|
99
99
|
that.print_media();
|
100
100
|
that.autosize();
|
101
101
|
},
|
102
|
+
|
103
|
+
alphabetize_media: function() {
|
104
|
+
var mylist = $('#the_modal #media > ul');
|
105
|
+
var listitems = mylist.children('li').get();
|
106
|
+
listitems.sort(function(a, b) {
|
107
|
+
return $(a).text().toUpperCase().localeCompare($(b).text().toUpperCase());
|
108
|
+
});
|
109
|
+
if ( mylist.data('alph-order') == null || mylist.data('alph-order') == 'desc' ) {
|
110
|
+
$.each(listitems, function(idx, itm) { mylist.append(itm); });
|
111
|
+
mylist.data('alph-order', 'asc');
|
112
|
+
}
|
113
|
+
else {
|
114
|
+
$.each(listitems, function(idx, itm) { mylist.prepend(itm); });
|
115
|
+
mylist.data('alph-order', 'desc');
|
116
|
+
}
|
117
|
+
},
|
102
118
|
|
103
119
|
print_top_controls: function()
|
104
120
|
{
|
@@ -115,7 +131,8 @@ var MediaModalController = BlockModalController.extend({
|
|
115
131
|
.append($('<select/>').attr('id', 'categories')).append(' | ')
|
116
132
|
.append($('<a/>').attr('href', '#').html('New Category' ).click(function(e) { e.preventDefault(); that.add_category(); })).append(' | ')
|
117
133
|
.append($('<a/>').attr('href', '#').html('Upload to this Category' ).click(function(e) { e.preventDefault(); that.toggle_uploader(); })).append(' | ')
|
118
|
-
.append($('<a/>').attr('href', '#').html(that.file_view == '
|
134
|
+
.append($('<a/>').attr('href', '#').html(that.file_view == 'list' ? 'Thumbnail View' : 'List View' ).click(function(e) { e.preventDefault(); that.toggle_file_view(); $(this).html( that.file_view == 'thumbnail' ? 'List View' : 'Thumbnail View' ); })).append(' | ')
|
135
|
+
.append($('<a/>').attr('href', '#').html('Alphabetize' ).click(function(e) { e.preventDefault(); that.alphabetize_media(); }))
|
119
136
|
)
|
120
137
|
.append($('<div/>').attr('id', 'new_cat_message'))
|
121
138
|
.append($('<div/>').attr('id', 'uploader' ).append($('<div/>').attr('id', 'the_uploader')));
|
@@ -238,12 +255,14 @@ var MediaModalController = BlockModalController.extend({
|
|
238
255
|
}
|
239
256
|
|
240
257
|
$('#top_controls').empty();
|
241
|
-
$('
|
242
|
-
|
258
|
+
var img_tag = m.media_type == 'image' ? ($('<img/>').attr('id', 'detail_image').attr('src', m.image_urls ? m.image_urls.thumb_url : '//placehold.it/250x250')) : ( $('<p/>').text(m.original_name) );
|
259
|
+
$('#the_modal #media').empty()
|
260
|
+
.append(img_tag)
|
243
261
|
.append($('<p/>').append($('<div/>').attr('id', 'media_' + media_id + '_media_category_id' )))
|
244
262
|
.append($('<p/>').append($('<div/>').attr('id', 'media_' + media_id + '_name' )))
|
245
263
|
.append($('<p/>').append($('<div/>').attr('id', 'media_' + media_id + '_description' )))
|
246
264
|
.append(image_urls);
|
265
|
+
var select_text = m.media_type == 'image' ? 'Select this Image' : 'Select this File';
|
247
266
|
$('#modal_controls').empty()
|
248
267
|
.append($('<p/>').css('clear', 'both')
|
249
268
|
.append($('<input/>').attr('type', 'button').addClass('caboose-btn').val('< Back' ).click(function(e) {
|
@@ -251,7 +270,7 @@ var MediaModalController = BlockModalController.extend({
|
|
251
270
|
that.print_media();
|
252
271
|
that.print_controls();
|
253
272
|
}))
|
254
|
-
.append($('<input/>').attr('type', 'button').addClass('caboose-btn').val(
|
273
|
+
.append($('<input/>').attr('type', 'button').addClass('caboose-btn').val(select_text ).click(function(e) { that.select_media(media_id) }))
|
255
274
|
.append($('<input/>').attr('type', 'button').addClass('caboose-btn').val('Close' ).click(function(e) { that.parent_controller.render_blocks(); that.close(); }))
|
256
275
|
);
|
257
276
|
|
@@ -432,8 +451,9 @@ var MediaModalController = BlockModalController.extend({
|
|
432
451
|
toggle_file_view: function()
|
433
452
|
{
|
434
453
|
var that = this;
|
435
|
-
that.file_view = (that.file_view == 'thumbnail' ? 'list' : 'thumbnail');
|
436
|
-
|
454
|
+
that.file_view = (that.file_view == 'thumbnail' ? 'list' : 'thumbnail');
|
455
|
+
|
456
|
+
that.print_media();
|
437
457
|
},
|
438
458
|
|
439
459
|
media_with_id: function(media_id)
|
@@ -134,27 +134,30 @@
|
|
134
134
|
position: relative;
|
135
135
|
list-style: none;
|
136
136
|
margin: 4px;
|
137
|
-
padding: 4px;
|
138
|
-
background-color: #
|
137
|
+
padding: 4px 6px;
|
138
|
+
background-color: #e2e2e2;
|
139
139
|
background-position: center;
|
140
140
|
background-size: contain;
|
141
141
|
background-repeat: no-repeat;
|
142
|
-
border: #
|
143
|
-
|
142
|
+
border: #b5b5b5 1px solid;
|
143
|
+
border-radius: 2px;
|
144
|
+
cursor: pointer;
|
145
|
+
img {
|
146
|
+
display: none;
|
147
|
+
}
|
144
148
|
span.name {
|
145
149
|
display: block;
|
146
|
-
color: #
|
150
|
+
color: #292929;
|
151
|
+
font-size: 15px;
|
147
152
|
text-decoration: none !important;
|
148
153
|
}
|
149
154
|
&:hover {
|
150
|
-
background-color: #
|
151
|
-
|
152
|
-
span { background-color: #fff799; color: #000; }
|
155
|
+
background-color: #fffcdb;
|
156
|
+
span { background-color: #fffcdb; }
|
153
157
|
}
|
154
158
|
&.selected {
|
155
|
-
background-color: #
|
156
|
-
|
157
|
-
span { background-color: #90dbf9; color: #000; }
|
159
|
+
background-color: #d1f2ff;
|
160
|
+
span { background-color: #d1f2ff; }
|
158
161
|
}
|
159
162
|
}
|
160
163
|
}
|
@@ -238,7 +241,7 @@
|
|
238
241
|
|
239
242
|
|
240
243
|
#media {
|
241
|
-
ul {
|
244
|
+
ul.thumbnail_view {
|
242
245
|
list-style: none;
|
243
246
|
margin: 0 0 20px 0;
|
244
247
|
padding: 0;
|
@@ -14,7 +14,7 @@ if editing
|
|
14
14
|
if url.nil? || url.starts_with?('http://placehold.it') || url.include?('missing')
|
15
15
|
%><div id='block_<%= block.id %>'><p>Empty file: <%= block.name %></p></div><%
|
16
16
|
else
|
17
|
-
%><div id='block_<%= block.id %>'><p><
|
17
|
+
%><div id='block_<%= block.id %>'><p><span><%= name %></span></p></div><%
|
18
18
|
end
|
19
19
|
elsif url
|
20
20
|
%><div id='block_<%= block.id %>'><p><a href="<%= raw file.url %>">Download File</a></p></div><%
|
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.8.
|
4
|
+
version: 0.8.67
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|