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.
Files changed (101) hide show
  1. checksums.yaml +8 -8
  2. data/app/assets/javascripts/caboose/admin_media_index.js +401 -0
  3. data/app/assets/javascripts/caboose/jquery-ui.drag-multiple.min.js +4 -0
  4. data/app/assets/javascripts/plupload/Moxie.swf +0 -0
  5. data/app/assets/javascripts/plupload/Moxie.xap +0 -0
  6. data/app/assets/javascripts/plupload/i18n/ar.js +2 -0
  7. data/app/assets/javascripts/plupload/i18n/az.js +2 -0
  8. data/app/assets/javascripts/plupload/i18n/bg.js +2 -0
  9. data/app/assets/javascripts/plupload/i18n/bs.js +2 -0
  10. data/app/assets/javascripts/plupload/i18n/ca.js +2 -0
  11. data/app/assets/javascripts/plupload/i18n/cs.js +2 -0
  12. data/app/assets/javascripts/plupload/i18n/cy.js +2 -0
  13. data/app/assets/javascripts/plupload/i18n/da.js +2 -0
  14. data/app/assets/javascripts/plupload/i18n/de.js +2 -0
  15. data/app/assets/javascripts/plupload/i18n/el.js +2 -0
  16. data/app/assets/javascripts/plupload/i18n/en.js +2 -0
  17. data/app/assets/javascripts/plupload/i18n/es.js +2 -0
  18. data/app/assets/javascripts/plupload/i18n/et.js +2 -0
  19. data/app/assets/javascripts/plupload/i18n/fa.js +2 -0
  20. data/app/assets/javascripts/plupload/i18n/fi.js +2 -0
  21. data/app/assets/javascripts/plupload/i18n/fr.js +2 -0
  22. data/app/assets/javascripts/plupload/i18n/he.js +2 -0
  23. data/app/assets/javascripts/plupload/i18n/hr.js +2 -0
  24. data/app/assets/javascripts/plupload/i18n/hu.js +2 -0
  25. data/app/assets/javascripts/plupload/i18n/hy.js +2 -0
  26. data/app/assets/javascripts/plupload/i18n/id.js +2 -0
  27. data/app/assets/javascripts/plupload/i18n/it.js +2 -0
  28. data/app/assets/javascripts/plupload/i18n/ja.js +2 -0
  29. data/app/assets/javascripts/plupload/i18n/ka.js +2 -0
  30. data/app/assets/javascripts/plupload/i18n/kk.js +2 -0
  31. data/app/assets/javascripts/plupload/i18n/km.js +2 -0
  32. data/app/assets/javascripts/plupload/i18n/ko.js +2 -0
  33. data/app/assets/javascripts/plupload/i18n/ku_IQ.js +2 -0
  34. data/app/assets/javascripts/plupload/i18n/lt.js +2 -0
  35. data/app/assets/javascripts/plupload/i18n/lv.js +2 -0
  36. data/app/assets/javascripts/plupload/i18n/mn.js +2 -0
  37. data/app/assets/javascripts/plupload/i18n/ms.js +2 -0
  38. data/app/assets/javascripts/plupload/i18n/nl.js +2 -0
  39. data/app/assets/javascripts/plupload/i18n/pl.js +2 -0
  40. data/app/assets/javascripts/plupload/i18n/pt_BR.js +2 -0
  41. data/app/assets/javascripts/plupload/i18n/ro.js +2 -0
  42. data/app/assets/javascripts/plupload/i18n/ru.js +2 -0
  43. data/app/assets/javascripts/plupload/i18n/sk.js +2 -0
  44. data/app/assets/javascripts/plupload/i18n/sq.js +2 -0
  45. data/app/assets/javascripts/plupload/i18n/sr.js +2 -0
  46. data/app/assets/javascripts/plupload/i18n/sr_RS.js +2 -0
  47. data/app/assets/javascripts/plupload/i18n/sv.js +2 -0
  48. data/app/assets/javascripts/plupload/i18n/th_TH.js +2 -0
  49. data/app/assets/javascripts/plupload/i18n/tr.js +2 -0
  50. data/app/assets/javascripts/plupload/i18n/uk_UA.js +2 -0
  51. data/app/assets/javascripts/plupload/i18n/vi.js +2 -0
  52. data/app/assets/javascripts/plupload/i18n/zh_CN.js +2 -0
  53. data/app/assets/javascripts/plupload/i18n/zh_TW.js +2 -0
  54. data/app/assets/javascripts/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css +185 -0
  55. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/backgrounds.gif +0 -0
  56. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/buttons-disabled.png +0 -0
  57. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/buttons.png +0 -0
  58. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/delete.gif +0 -0
  59. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/done.gif +0 -0
  60. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/error.gif +0 -0
  61. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/throbber.gif +0 -0
  62. data/app/assets/javascripts/plupload/jquery.plupload.queue/img/transp50.png +0 -0
  63. data/app/assets/javascripts/plupload/jquery.plupload.queue/jquery.plupload.queue.js +428 -0
  64. data/app/assets/javascripts/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js +1 -0
  65. data/app/assets/javascripts/plupload/jquery.ui.plupload/css/jquery.ui.plupload.css +370 -0
  66. data/app/assets/javascripts/plupload/jquery.ui.plupload/img/loading.gif +0 -0
  67. data/app/assets/javascripts/plupload/jquery.ui.plupload/img/plupload.png +0 -0
  68. data/app/assets/javascripts/plupload/jquery.ui.plupload/jquery.ui.plupload.js +1323 -0
  69. data/app/assets/javascripts/plupload/jquery.ui.plupload/jquery.ui.plupload.min.js +1 -0
  70. data/app/assets/javascripts/plupload/moxie.js +10726 -0
  71. data/app/assets/javascripts/plupload/moxie.min.js +15 -0
  72. data/app/assets/javascripts/plupload/plupload.dev.js +2315 -0
  73. data/app/assets/javascripts/plupload/plupload.full.min.js +28 -0
  74. data/app/assets/javascripts/plupload/plupload.min.js +13 -0
  75. data/app/assets/stylesheets/caboose/admin_media_index.css.scss +115 -0
  76. data/app/controllers/caboose/application_controller.rb +1 -1
  77. data/app/controllers/caboose/cart_controller.rb +1 -1
  78. data/app/controllers/caboose/media_categories_controller.rb +44 -8
  79. data/app/controllers/caboose/media_controller.rb +116 -0
  80. data/app/controllers/caboose/posts_controller.rb +1 -1
  81. data/app/controllers/caboose/sns_controller.rb +60 -0
  82. data/app/models/caboose/block.rb +4 -2
  83. data/app/models/caboose/media.rb +94 -0
  84. data/app/models/caboose/media_category.rb +55 -15
  85. data/app/models/caboose/schema.rb +6 -9
  86. data/app/models/caboose/tax_calculator.rb +1 -1
  87. data/app/views/caboose/{images → media}/admin_edit.html.erb +0 -0
  88. data/app/views/caboose/media/admin_index.html.erb +49 -0
  89. data/app/views/caboose/posts/admin_edit_general.html.erb +3 -1
  90. data/config/routes.rb +30 -17
  91. data/lib/caboose.rb +6 -0
  92. data/lib/caboose/version.rb +1 -1
  93. metadata +81 -11
  94. data/app/assets/javascripts/caboose/admin_images_index.js +0 -171
  95. data/app/assets/stylesheets/caboose/admin_images_index.css.scss +0 -53
  96. data/app/controllers/caboose/images_controller.rb +0 -149
  97. data/app/models/caboose/media_file.rb +0 -18
  98. data/app/models/caboose/media_image.rb +0 -43
  99. data/app/views/caboose/images/admin_index.html.erb +0 -59
  100. data/app/views/caboose/images/admin_new.html.erb +0 -80
  101. 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 %>
@@ -1,3 +0,0 @@
1
- <script>
2
- document.body.innerText=document.body.textContent=decodeURIComponent(window.location.search.slice(1));
3
- </script>