caboose-cms 0.5.221 → 0.5.222
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/caboose/admin_media_index.js +401 -0
- data/app/assets/javascripts/caboose/jquery-ui.drag-multiple.min.js +4 -0
- data/app/assets/javascripts/plupload/Moxie.swf +0 -0
- data/app/assets/javascripts/plupload/Moxie.xap +0 -0
- data/app/assets/javascripts/plupload/i18n/ar.js +2 -0
- data/app/assets/javascripts/plupload/i18n/az.js +2 -0
- data/app/assets/javascripts/plupload/i18n/bg.js +2 -0
- data/app/assets/javascripts/plupload/i18n/bs.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ca.js +2 -0
- data/app/assets/javascripts/plupload/i18n/cs.js +2 -0
- data/app/assets/javascripts/plupload/i18n/cy.js +2 -0
- data/app/assets/javascripts/plupload/i18n/da.js +2 -0
- data/app/assets/javascripts/plupload/i18n/de.js +2 -0
- data/app/assets/javascripts/plupload/i18n/el.js +2 -0
- data/app/assets/javascripts/plupload/i18n/en.js +2 -0
- data/app/assets/javascripts/plupload/i18n/es.js +2 -0
- data/app/assets/javascripts/plupload/i18n/et.js +2 -0
- data/app/assets/javascripts/plupload/i18n/fa.js +2 -0
- data/app/assets/javascripts/plupload/i18n/fi.js +2 -0
- data/app/assets/javascripts/plupload/i18n/fr.js +2 -0
- data/app/assets/javascripts/plupload/i18n/he.js +2 -0
- data/app/assets/javascripts/plupload/i18n/hr.js +2 -0
- data/app/assets/javascripts/plupload/i18n/hu.js +2 -0
- data/app/assets/javascripts/plupload/i18n/hy.js +2 -0
- data/app/assets/javascripts/plupload/i18n/id.js +2 -0
- data/app/assets/javascripts/plupload/i18n/it.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ja.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ka.js +2 -0
- data/app/assets/javascripts/plupload/i18n/kk.js +2 -0
- data/app/assets/javascripts/plupload/i18n/km.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ko.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ku_IQ.js +2 -0
- data/app/assets/javascripts/plupload/i18n/lt.js +2 -0
- data/app/assets/javascripts/plupload/i18n/lv.js +2 -0
- data/app/assets/javascripts/plupload/i18n/mn.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ms.js +2 -0
- data/app/assets/javascripts/plupload/i18n/nl.js +2 -0
- data/app/assets/javascripts/plupload/i18n/pl.js +2 -0
- data/app/assets/javascripts/plupload/i18n/pt_BR.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ro.js +2 -0
- data/app/assets/javascripts/plupload/i18n/ru.js +2 -0
- data/app/assets/javascripts/plupload/i18n/sk.js +2 -0
- data/app/assets/javascripts/plupload/i18n/sq.js +2 -0
- data/app/assets/javascripts/plupload/i18n/sr.js +2 -0
- data/app/assets/javascripts/plupload/i18n/sr_RS.js +2 -0
- data/app/assets/javascripts/plupload/i18n/sv.js +2 -0
- data/app/assets/javascripts/plupload/i18n/th_TH.js +2 -0
- data/app/assets/javascripts/plupload/i18n/tr.js +2 -0
- data/app/assets/javascripts/plupload/i18n/uk_UA.js +2 -0
- data/app/assets/javascripts/plupload/i18n/vi.js +2 -0
- data/app/assets/javascripts/plupload/i18n/zh_CN.js +2 -0
- data/app/assets/javascripts/plupload/i18n/zh_TW.js +2 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css +185 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/backgrounds.gif +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/buttons-disabled.png +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/buttons.png +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/delete.gif +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/done.gif +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/error.gif +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/throbber.gif +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/img/transp50.png +0 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/jquery.plupload.queue.js +428 -0
- data/app/assets/javascripts/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js +1 -0
- data/app/assets/javascripts/plupload/jquery.ui.plupload/css/jquery.ui.plupload.css +370 -0
- data/app/assets/javascripts/plupload/jquery.ui.plupload/img/loading.gif +0 -0
- data/app/assets/javascripts/plupload/jquery.ui.plupload/img/plupload.png +0 -0
- data/app/assets/javascripts/plupload/jquery.ui.plupload/jquery.ui.plupload.js +1323 -0
- data/app/assets/javascripts/plupload/jquery.ui.plupload/jquery.ui.plupload.min.js +1 -0
- data/app/assets/javascripts/plupload/moxie.js +10726 -0
- data/app/assets/javascripts/plupload/moxie.min.js +15 -0
- data/app/assets/javascripts/plupload/plupload.dev.js +2315 -0
- data/app/assets/javascripts/plupload/plupload.full.min.js +28 -0
- data/app/assets/javascripts/plupload/plupload.min.js +13 -0
- data/app/assets/stylesheets/caboose/admin_media_index.css.scss +115 -0
- data/app/controllers/caboose/application_controller.rb +1 -1
- data/app/controllers/caboose/cart_controller.rb +1 -1
- data/app/controllers/caboose/media_categories_controller.rb +44 -8
- data/app/controllers/caboose/media_controller.rb +116 -0
- data/app/controllers/caboose/posts_controller.rb +1 -1
- data/app/controllers/caboose/sns_controller.rb +60 -0
- data/app/models/caboose/block.rb +4 -2
- data/app/models/caboose/media.rb +94 -0
- data/app/models/caboose/media_category.rb +55 -15
- data/app/models/caboose/schema.rb +6 -9
- data/app/models/caboose/tax_calculator.rb +1 -1
- data/app/views/caboose/{images → media}/admin_edit.html.erb +0 -0
- data/app/views/caboose/media/admin_index.html.erb +49 -0
- data/app/views/caboose/posts/admin_edit_general.html.erb +3 -1
- data/config/routes.rb +30 -17
- data/lib/caboose.rb +6 -0
- data/lib/caboose/version.rb +1 -1
- metadata +81 -11
- data/app/assets/javascripts/caboose/admin_images_index.js +0 -171
- data/app/assets/stylesheets/caboose/admin_images_index.css.scss +0 -53
- data/app/controllers/caboose/images_controller.rb +0 -149
- data/app/models/caboose/media_file.rb +0 -18
- data/app/models/caboose/media_image.rb +0 -43
- data/app/views/caboose/images/admin_index.html.erb +0 -59
- data/app/views/caboose/images/admin_new.html.erb +0 -80
- data/app/views/caboose/images/admin_s3_result.html.erb +0 -3
@@ -1,80 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
# https://github.com/blueimp/jQuery-File-Upload/wiki/Upload-directly-to-S3
|
3
|
-
%>
|
4
|
-
<h1>Upload Images</h1>
|
5
|
-
|
6
|
-
<form action='/admin/images/sign-s3' method='post' id='new_image_form' enctype='multipart/form-data'>
|
7
|
-
<input type='hidden' name='key' value='' />
|
8
|
-
<input type='hidden' name='AWSAccessKeyId' value='' />
|
9
|
-
<input type='hidden' name='acl' value='' />
|
10
|
-
<input type='hidden' name='success_action_status' value='' />
|
11
|
-
<!--<input type='hidden' name='success_action_redirect' value='' />-->
|
12
|
-
<input type='hidden' name='policy' value='' />
|
13
|
-
<input type='hidden' name='signature' value='' />
|
14
|
-
<input type="file" name="file" id="file" multiple='true' />
|
15
|
-
<div id='progress'><div id='bar'></div></div>
|
16
|
-
</form>
|
17
|
-
|
18
|
-
<% content_for :caboose_css do %>
|
19
|
-
<style type='text/css'>
|
20
|
-
.progress { max-width: 600px; margin: 0.2em 0 0.2em 0; }
|
21
|
-
.progress .bar { height: 1.2em; padding: 0.2em; color: white; display: none; }
|
22
|
-
</style>
|
23
|
-
<% end %>
|
24
|
-
|
25
|
-
<% content_for :caboose_js do %>
|
26
|
-
<%= javascript_include_tag 'jquery.ui.widget' %>
|
27
|
-
<%= javascript_include_tag 'caboose/jquery.iframe-transport.js' %>
|
28
|
-
<%= javascript_include_tag 'caboose/jquery.fileupload.js' %>
|
29
|
-
<script type='text/javascript'>
|
30
|
-
|
31
|
-
$(document).ready(function() {
|
32
|
-
$('#file').fileupload({
|
33
|
-
//forceIframeTransport: true,
|
34
|
-
autoUpload: true,
|
35
|
-
//replaceFileInput: true,
|
36
|
-
//singleFileUploads: false,
|
37
|
-
add: function(e, data) {
|
38
|
-
$.ajax({
|
39
|
-
url: '/admin/images/s3',
|
40
|
-
type: 'get',
|
41
|
-
data: {
|
42
|
-
name: data.files[0].name,
|
43
|
-
media_category_id: <%= @media_category_id %>
|
44
|
-
},
|
45
|
-
async: false,
|
46
|
-
success: function(resp) {
|
47
|
-
var form = $('#new_image_form');
|
48
|
-
for (var i in resp.fields)
|
49
|
-
form.find("input[name=" + i + "]").val(resp.fields[i]);
|
50
|
-
form.attr('action', resp.url);
|
51
|
-
}
|
52
|
-
});
|
53
|
-
data.submit();
|
54
|
-
},
|
55
|
-
progressall: function (e, data) {
|
56
|
-
$('#bar').css('width', parseInt(data.loaded / data.total * 100, 10) + '%')
|
57
|
-
},
|
58
|
-
start: function (e) {
|
59
|
-
$('#file').hide();
|
60
|
-
$('#bar').css('background', 'green').css('display', 'block').css('width', '0%').text("Uploading...");
|
61
|
-
},
|
62
|
-
done: function(e, data) {
|
63
|
-
console.log("Upload done.");
|
64
|
-
console.log(data);
|
65
|
-
$('#bar').text("Uploading done");
|
66
|
-
setTimeout(function() {
|
67
|
-
$('#file').val('').show();
|
68
|
-
$('#bar').css('background', 'transparent').empty();
|
69
|
-
}, 2000);
|
70
|
-
},
|
71
|
-
fail: function(e, data) {
|
72
|
-
console.log("Upload failed.");
|
73
|
-
console.log(data);
|
74
|
-
$('#bar').css("background", "red").text("Failed");
|
75
|
-
}
|
76
|
-
});
|
77
|
-
});
|
78
|
-
|
79
|
-
</script>
|
80
|
-
<% end %>
|