asset_host_core 2.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.markdown +138 -0
  3. data/Rakefile +11 -0
  4. data/app/assets/images/asset_host_core/alert-overlay.png +0 -0
  5. data/app/assets/images/asset_host_core/arrow-left.gif +0 -0
  6. data/app/assets/images/asset_host_core/arrow-right.gif +0 -0
  7. data/app/assets/images/asset_host_core/fallback-img-rect.png +0 -0
  8. data/app/assets/images/asset_host_core/videoplayer-play.png +0 -0
  9. data/app/assets/images/asset_host_core/x.png +0 -0
  10. data/app/assets/javascripts/asset_host_core/admin/assets.js.coffee +221 -0
  11. data/app/assets/javascripts/asset_host_core/application.js +20 -0
  12. data/app/assets/javascripts/asset_host_core/assetadmin.js.coffee +56 -0
  13. data/app/assets/javascripts/asset_host_core/assethost.js.coffee.erb +17 -0
  14. data/app/assets/javascripts/asset_host_core/browserui.js.coffee +139 -0
  15. data/app/assets/javascripts/asset_host_core/chooserui.js.coffee +381 -0
  16. data/app/assets/javascripts/asset_host_core/client.js.coffee +29 -0
  17. data/app/assets/javascripts/asset_host_core/clients/BrightcoveVideo.js.coffee +64 -0
  18. data/app/assets/javascripts/asset_host_core/clients/templates/brightcove_embed.jst.eco +18 -0
  19. data/app/assets/javascripts/asset_host_core/clients/templates/vimeo_embed.jst.eco +1 -0
  20. data/app/assets/javascripts/asset_host_core/clients/templates/youtube_embed.jst.eco +1 -0
  21. data/app/assets/javascripts/asset_host_core/clients/vimeo_video.js.coffee +21 -0
  22. data/app/assets/javascripts/asset_host_core/clients/youtube_video.js.coffee +21 -0
  23. data/app/assets/javascripts/asset_host_core/cmsplugin.js.coffee +235 -0
  24. data/app/assets/javascripts/asset_host_core/models.js.coffee +586 -0
  25. data/app/assets/javascripts/asset_host_core/railsCMS.js.coffee +141 -0
  26. data/app/assets/javascripts/asset_host_core/slideshow.js.coffee +428 -0
  27. data/app/assets/javascripts/asset_host_core/templates/after_upload_button.jst.eco +3 -0
  28. data/app/assets/javascripts/asset_host_core/templates/asset_drop_asset.jst.eco +4 -0
  29. data/app/assets/javascripts/asset_host_core/templates/asset_modal.jst.eco +13 -0
  30. data/app/assets/javascripts/asset_host_core/templates/asset_preview.jst.eco +35 -0
  31. data/app/assets/javascripts/asset_host_core/templates/asset_search.jst.eco +2 -0
  32. data/app/assets/javascripts/asset_host_core/templates/browser_asset.jst.eco +1 -0
  33. data/app/assets/javascripts/asset_host_core/templates/browser_asset_tip.jst.eco +3 -0
  34. data/app/assets/javascripts/asset_host_core/templates/edit_modal.jst.eco +40 -0
  35. data/app/assets/javascripts/asset_host_core/templates/import_help.jst.eco +59 -0
  36. data/app/assets/javascripts/asset_host_core/templates/pagination_link.jst.eco +1 -0
  37. data/app/assets/javascripts/asset_host_core/templates/pagination_links.jst.eco +13 -0
  38. data/app/assets/javascripts/asset_host_core/templates/queued_file.jst.eco +11 -0
  39. data/app/assets/javascripts/asset_host_core/templates/save_and_close_view.jst.eco +4 -0
  40. data/app/assets/javascripts/asset_host_core/templates/upload_all_button.jst.eco +4 -0
  41. data/app/assets/javascripts/asset_host_core/templates/url_input.jst.eco +8 -0
  42. data/app/assets/stylesheets/asset_host_core/application.css.scss +384 -0
  43. data/app/assets/stylesheets/asset_host_core/jquery-ui.css +105 -0
  44. data/app/assets/stylesheets/asset_host_core/public.css.scss +204 -0
  45. data/app/assets/stylesheets/asset_host_core/slidetest.css.scss +93 -0
  46. data/app/controllers/asset_host_core/admin/api_users_controller.rb +72 -0
  47. data/app/controllers/asset_host_core/admin/assets_controller.rb +140 -0
  48. data/app/controllers/asset_host_core/admin/base_controller.rb +36 -0
  49. data/app/controllers/asset_host_core/admin/home_controller.rb +13 -0
  50. data/app/controllers/asset_host_core/admin/outputs_controller.rb +55 -0
  51. data/app/controllers/asset_host_core/api/assets_controller.rb +110 -0
  52. data/app/controllers/asset_host_core/api/base_controller.rb +43 -0
  53. data/app/controllers/asset_host_core/api/outputs_controller.rb +33 -0
  54. data/app/controllers/asset_host_core/application_controller.rb +43 -0
  55. data/app/controllers/asset_host_core/public_controller.rb +104 -0
  56. data/app/models/asset_host_core/api_user.rb +44 -0
  57. data/app/models/asset_host_core/api_user_permission.rb +6 -0
  58. data/app/models/asset_host_core/asset.rb +265 -0
  59. data/app/models/asset_host_core/asset_output.rb +69 -0
  60. data/app/models/asset_host_core/brightcove_video.rb +20 -0
  61. data/app/models/asset_host_core/output.rb +52 -0
  62. data/app/models/asset_host_core/permission.rb +19 -0
  63. data/app/models/asset_host_core/video.rb +8 -0
  64. data/app/models/asset_host_core/vimeo_video.rb +17 -0
  65. data/app/models/asset_host_core/youtube_video.rb +17 -0
  66. data/app/views/asset_host_core/admin/api_users/_form_fields.html.erb +5 -0
  67. data/app/views/asset_host_core/admin/api_users/edit.html.erb +26 -0
  68. data/app/views/asset_host_core/admin/api_users/index.html.erb +31 -0
  69. data/app/views/asset_host_core/admin/api_users/new.html.erb +17 -0
  70. data/app/views/asset_host_core/admin/api_users/show.html.erb +23 -0
  71. data/app/views/asset_host_core/admin/assets/index.html.erb +19 -0
  72. data/app/views/asset_host_core/admin/assets/metadata.html.erb +24 -0
  73. data/app/views/asset_host_core/admin/assets/show.html.erb +86 -0
  74. data/app/views/asset_host_core/admin/home/chooser.html.erb +49 -0
  75. data/app/views/asset_host_core/admin/outputs/_form_fields.html.erb +5 -0
  76. data/app/views/asset_host_core/admin/outputs/edit.html.erb +26 -0
  77. data/app/views/asset_host_core/admin/outputs/index.html.erb +27 -0
  78. data/app/views/asset_host_core/admin/outputs/new.html.erb +13 -0
  79. data/app/views/asset_host_core/admin/outputs/show.html.erb +17 -0
  80. data/app/views/asset_host_core/shared/_footerjs.html.erb +3 -0
  81. data/app/views/asset_host_core/shared/_navbar.html.erb +28 -0
  82. data/app/views/kaminari/_first_page.html.erb +3 -0
  83. data/app/views/kaminari/_gap.html.erb +3 -0
  84. data/app/views/kaminari/_last_page.html.erb +3 -0
  85. data/app/views/kaminari/_next_page.html.erb +3 -0
  86. data/app/views/kaminari/_page.html.erb +3 -0
  87. data/app/views/kaminari/_paginator.html.erb +17 -0
  88. data/app/views/kaminari/_prev_page.html.erb +3 -0
  89. data/app/views/layouts/asset_host_core/application.html.erb +54 -0
  90. data/app/views/layouts/asset_host_core/full_width.html.erb +32 -0
  91. data/app/views/layouts/asset_host_core/minimal.html.erb +45 -0
  92. data/config/initializers/simple_form.rb +142 -0
  93. data/config/initializers/simple_form_bootstrap.rb +45 -0
  94. data/config/locales/simple_form.en.yml +26 -0
  95. data/config/routes.rb +49 -0
  96. data/lib/asset_host_core.rb +38 -0
  97. data/lib/asset_host_core/config.rb +39 -0
  98. data/lib/asset_host_core/engine.rb +94 -0
  99. data/lib/asset_host_core/loaders.rb +34 -0
  100. data/lib/asset_host_core/loaders/asset_host.rb +30 -0
  101. data/lib/asset_host_core/loaders/base.rb +22 -0
  102. data/lib/asset_host_core/loaders/brightcove.rb +67 -0
  103. data/lib/asset_host_core/loaders/flickr.rb +114 -0
  104. data/lib/asset_host_core/loaders/url.rb +59 -0
  105. data/lib/asset_host_core/loaders/vimeo.rb +76 -0
  106. data/lib/asset_host_core/loaders/youtube.rb +90 -0
  107. data/lib/asset_host_core/model_methods.rb +61 -0
  108. data/lib/asset_host_core/paperclip.rb +4 -0
  109. data/lib/asset_host_core/paperclip/asset_thumbnail.rb +92 -0
  110. data/lib/asset_host_core/paperclip/attachment.rb +206 -0
  111. data/lib/asset_host_core/paperclip/trimmer.rb +33 -0
  112. data/lib/asset_host_core/resque_job.rb +13 -0
  113. data/lib/asset_host_core/version.rb +3 -0
  114. data/lib/tasks/asset_host_core_tasks.rake +4 -0
  115. data/spec/controllers/admin/api_users_controller_spec.rb +21 -0
  116. data/spec/controllers/admin/assets_controller_spec.rb +59 -0
  117. data/spec/controllers/admin/home_controller_spec.rb +4 -0
  118. data/spec/controllers/admin/outputs_controller_spec.rb +4 -0
  119. data/spec/controllers/api/assets_controller_spec.rb +133 -0
  120. data/spec/controllers/api/outputs_controller_spec.rb +51 -0
  121. data/spec/controllers/public_controller_spec.rb +4 -0
  122. data/spec/factories.rb +39 -0
  123. data/spec/features/api_users_spec.rb +78 -0
  124. data/spec/fixtures/api/brightcove/video.json +137 -0
  125. data/spec/fixtures/api/flickr/photos_getInfo.json +78 -0
  126. data/spec/fixtures/api/flickr/photos_getSizes.json +82 -0
  127. data/spec/fixtures/api/flickr/photos_licenses_getInfo.json +52 -0
  128. data/spec/fixtures/api/vimeo/video.json +28 -0
  129. data/spec/fixtures/api/youtube/discovery.json +5190 -0
  130. data/spec/fixtures/api/youtube/video.json +44 -0
  131. data/spec/fixtures/images/chipmunk.jpg +0 -0
  132. data/spec/fixtures/images/dude.jpg +0 -0
  133. data/spec/fixtures/images/ernie.jpg +0 -0
  134. data/spec/fixtures/images/fry.png +0 -0
  135. data/spec/fixtures/images/hat.jpg +0 -0
  136. data/spec/fixtures/images/spongebob.png +0 -0
  137. data/spec/fixtures/images/stars.jpg +0 -0
  138. data/spec/internal/app/controllers/application_controller.rb +16 -0
  139. data/spec/internal/app/controllers/sessions_controller.rb +24 -0
  140. data/spec/internal/app/models/user.rb +10 -0
  141. data/spec/internal/app/views/sessions/new.html.erb +14 -0
  142. data/spec/internal/config/database.yml +3 -0
  143. data/spec/internal/config/initializers/assethost_config.rb +57 -0
  144. data/spec/internal/config/routes.rb +7 -0
  145. data/spec/internal/db/combustion_test.sqlite +0 -0
  146. data/spec/internal/db/schema.rb +106 -0
  147. data/spec/internal/log/test.log +14769 -0
  148. data/spec/internal/public/favicon.ico +0 -0
  149. data/spec/internal/public/images/1_27f7745237849975ca90591c1fba5934_original. +0 -0
  150. data/spec/internal/public/images/1_7d33319deca787d5bb3f62ff06563ad2_original. +0 -0
  151. data/spec/internal/public/images/1_b6d48c8b1286104ce76649731e09645f_original. +0 -0
  152. data/spec/internal/public/images/1_b6d48c8b1286104ce76649731e09645f_original.jpg +0 -0
  153. data/spec/internal/public/images/1_b6d48c8b1286104ce76649731e09645f_original.txt +0 -0
  154. data/spec/internal/public/images/1_e179cbd27e07cb55042d0db36cdac095_original. +0 -0
  155. data/spec/internal/public/images/1_e669edd3dfd74be66fc38416e82e3a37_original. +0 -0
  156. data/spec/lib/asset_host_core/loaders/asset_host_spec.rb +33 -0
  157. data/spec/lib/asset_host_core/loaders/brightcove_spec.rb +51 -0
  158. data/spec/lib/asset_host_core/loaders/flickr_spec.rb +72 -0
  159. data/spec/lib/asset_host_core/loaders/url_spec.rb +42 -0
  160. data/spec/lib/asset_host_core/loaders/vimeo_spec.rb +51 -0
  161. data/spec/lib/asset_host_core/loaders/youtube_spec.rb +73 -0
  162. data/spec/lib/asset_host_core/loaders_spec.rb +4 -0
  163. data/spec/lib/asset_host_core/model_methods_spec.rb +4 -0
  164. data/spec/lib/asset_host_core/paperclip/asset_thumbnail_spec.rb +4 -0
  165. data/spec/lib/asset_host_core/paperclip/attachment_spec.rb +4 -0
  166. data/spec/lib/asset_host_core/resque_job_spec.rb +4 -0
  167. data/spec/lib/asset_host_core_spec.rb +4 -0
  168. data/spec/models/api_user_spec.rb +58 -0
  169. data/spec/models/asset_output_spec.rb +4 -0
  170. data/spec/models/asset_spec.rb +4 -0
  171. data/spec/models/output_spec.rb +4 -0
  172. data/spec/models/permission_spec.rb +4 -0
  173. data/spec/spec_helper.rb +30 -0
  174. data/spec/support/fixture_loader.rb +9 -0
  175. data/spec/support/param_helper.rb +14 -0
  176. data/spec/support/permission_matcher.rb +17 -0
  177. data/vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  178. data/vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  179. data/vendor/assets/images/jquery-ui/ui-bg_flat_10_000000_40x100.png +0 -0
  180. data/vendor/assets/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  181. data/vendor/assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  182. data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  183. data/vendor/assets/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  184. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  185. data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  186. data/vendor/assets/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  187. data/vendor/assets/images/jquery-ui/ui-icons_228ef1_256x240.png +0 -0
  188. data/vendor/assets/images/jquery-ui/ui-icons_ef8c08_256x240.png +0 -0
  189. data/vendor/assets/images/jquery-ui/ui-icons_ffd27a_256x240.png +0 -0
  190. data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  191. data/vendor/assets/javascripts/backbone.js +1158 -0
  192. data/vendor/assets/javascripts/backbone.modelbinding.js +475 -0
  193. data/vendor/assets/javascripts/exif.js +695 -0
  194. data/vendor/assets/javascripts/jquery-ui.js +5614 -0
  195. data/vendor/assets/javascripts/simplemodal.js +698 -0
  196. data/vendor/assets/javascripts/spin.jquery.js +81 -0
  197. data/vendor/assets/javascripts/spin.min.js +1 -0
  198. data/vendor/assets/javascripts/underscore.min.js +1 -0
  199. metadata +658 -0
@@ -0,0 +1,3 @@
1
+ <a id="afterUpload" class="btn btn-success" style="margin-top: 10px;" href="#">
2
+ <%= @text %>
3
+ </a>
@@ -0,0 +1,4 @@
1
+ <button class="btn btn-danger delete">x</button>
2
+ <%- if @asset.tags then @asset.tags[ AssetHost.SIZES.thumb ] else "INVALID" %>
3
+ <%= @asset.title %>
4
+ <small style="display:block;"><%= @chop %></small>
@@ -0,0 +1,13 @@
1
+ <div class="ah_asset_browse modal-body">
2
+ <%- @asset.tags[ AssetHost.SIZES.modal ] %>
3
+ <h1><%= @asset.title %></h1>
4
+ <h2><%= @asset.owner %></h2>
5
+ <h2><%= @asset.size %></h2>
6
+ <p><%= @asset.caption %></p>
7
+ <br style="clear:both;"/>
8
+ </div>
9
+ <div class="modal-footer">
10
+ <a href="#" class="btn close">Close</a>
11
+ <% if @admin: %><a class="admin btn">View in Admin</a><% end %>
12
+ <% if @select:%><a class="select btn btn-primary">Select Asset</a><% end %>
13
+ </div>
@@ -0,0 +1,35 @@
1
+ <h4><%= @asset.title || @asset.id %></h4>
2
+
3
+ <div class="row">
4
+ <div class="span6 asset-preview">
5
+ <div class="asset-wrapper">
6
+ <%- @asset.tags[@tag] %>
7
+ </div>
8
+ <table style="margin-top: 10px;">
9
+ <tr><td style="width:100px;"><strong style="margin-right:10px;">Asset ID</strong></td><td><%= @asset.id %></td></tr>
10
+ <tr>
11
+ <td><strong style="margin-right:10px;">Size</strong></td>
12
+ <td><%= @asset.sizes[@tag].width %> x <%= @asset.sizes[@tag].height %></td>
13
+ </tr>
14
+
15
+ <tr>
16
+ <td><strong style="margin-right:10px;">URL</strong></td>
17
+ <td><input type="text" value="<%= @asset.urls[@tag] %>" style="margin-right:10px;width:300px;" />(<a href="<%= @asset.urls[@tag] %>" target="_blank">link</a>)</td>
18
+ </tr>
19
+
20
+ <tr>
21
+ <td><strong style="margin-right:10px;">Tag</strong></td>
22
+ <td><input type="text" value="<%= @asset.tags[@tag] %>" style="width:300px;" /></td>
23
+ </tr>
24
+ </table>
25
+ </div>
26
+
27
+ <div class="span2">
28
+ <h4>Sizes</h4>
29
+ <ul class="asset_sizes">
30
+ <% for code, size of @asset.sizes: %>
31
+ <li data-size="<%= code %>" <% if (@tag == code): %>class="selected"<% end %>><%= code %></li>
32
+ <% end %>
33
+ </ul>
34
+ </div>
35
+ </div>
@@ -0,0 +1,2 @@
1
+ <input type="text" style="width: 200px" value="<%= @query %>"/>
2
+ <button class="btn">Search</button>
@@ -0,0 +1 @@
1
+ <button data-asset-url="<%= @url %>" draggable="true"><%- @tags[ AssetHost.SIZES.thumb ] %></button>
@@ -0,0 +1,3 @@
1
+ <b><%= @title || "No Title"%></b>
2
+ <br/><%= @owner || "No Credit" %>
3
+ <br/><%= @size %>
@@ -0,0 +1,40 @@
1
+ <div class="" style="display:inline;float:left;width: 324px;margin-right: 12px">
2
+ <%- @tags[ AssetHost.SIZES.modal ] %>
3
+ <br/><i>Uploaded at <%= @size %></i>
4
+ </div>
5
+ <div class="formtastic">
6
+ <button class="admin btn">View in Admin</button>
7
+
8
+ <fieldset>
9
+ <h3>Asset Metadata (Global)</h3>
10
+ <ol>
11
+ <li class="input stringish">
12
+ <label for="title" class="label">Title</label>
13
+ <input id="title" name="title" value="<%= @title %>">
14
+ </li>
15
+ <li class="input stringish">
16
+ <label for="owner" class="label">Credit</label>
17
+ <input id="owner" name="owner" value="<%= @owner %>">
18
+ </li>
19
+ <li class="input text">
20
+ <label for="notes" class="label">Notes</label>
21
+ <textarea id="notes" name="notes" rows=4><%= @notes %></textarea>
22
+ </li>
23
+ </ol>
24
+ </fieldset>
25
+ </div>
26
+ <br style="clear:both;line-height: 0"/>
27
+
28
+ <h3 style="margin-top: 0">Story Caption:</h3>
29
+ <textarea rows="4" style="width: 98%" id="caption"><%= @caption %></textarea>
30
+
31
+ <div class="notice save_caption">
32
+ <input type="checkbox" id="save_caption_check"/> Also save caption back to AssetHost for future uses?
33
+ </div>
34
+
35
+ <div class="alert meta_dirty">
36
+ <strong>Note:</strong> Metadata (title, credit, notes) has been changed and will be saved to AssetHost.
37
+ </div>
38
+
39
+ <button class="save btn btn-primary">Save Caption</button>
40
+
@@ -0,0 +1,59 @@
1
+ <div id="importHelp" class="modal hide fade">
2
+ <div class="modal-header">
3
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
4
+ <h3>Import Help</h3>
5
+ </div>
6
+ <div class="modal-body">
7
+ To import an Asset, you can:
8
+ <ul>
9
+ <li>Drag an image file into the Drop area.</li>
10
+ <li>Paste in a URL/Key:
11
+ <table class="table table-condensed table-striped" style="font-size:12px;">
12
+ <thead>
13
+ <tr>
14
+ <th>Service</th>
15
+ <th>Type</th>
16
+ <th>Examples</th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <tr>
21
+ <td>YouTube</td>
22
+ <td>URL</td>
23
+ <td>http://www.youtube.com/watch?v=a1Y73sPHKxw<br />
24
+ <strong>Note:</strong> Poster images for YouTube videos are trimmed of any black letterboxing. Add <code>?ah-noTrim</code> to the URL to bypass this.</td>
25
+ </tr>
26
+ <tr>
27
+ <td>Vimeo</td>
28
+ <td>URL</td>
29
+ <td>http://vimeo.com/29695463</td>
30
+ </tr>
31
+ <tr>
32
+ <td>Flickr</td>
33
+ <td>URL</td>
34
+ <td><ul><li>http://www.flickr.com/photos/scpr/6098495440/</li><li>http://farm7.staticflickr.com/6191/6098495440_aff9c9b793_o.jpg</li></ul></td>
35
+ </tr>
36
+ <tr>
37
+ <td>AssetHost</td>
38
+ <td>URL</td>
39
+ <td>http://a.scpr.org/i/b2186724bb63bfd1af85de5354d1ecc0/60623-small.jpg</td>
40
+ </tr>
41
+ <tr>
42
+ <td>Brightcove</td>
43
+ <td>KEY</td>
44
+ <td>brightcove:2104029225001<br /><i>Format:</i> brightcove:videoid</td>
45
+ </tr>
46
+ <tr>
47
+ <td>Image File</td>
48
+ <td>URL</td>
49
+ <td>http://i.imgur.com/z843Gtu.jpg</td>
50
+ </tr>
51
+ </tbody>
52
+ </table>
53
+ </li>
54
+ </ul>
55
+ </div>
56
+ <div class="modal-footer">
57
+ <a href="#" class="btn" data-dismiss="modal">Close</a>
58
+ </div>
59
+ </div>
@@ -0,0 +1 @@
1
+ <li data-page="<%= @page %>" <% if @current: %>class="active"<% end %> ><a href="#"><%= @page %></a></li>
@@ -0,0 +1,13 @@
1
+ <br style="clear: both;"/>
2
+
3
+ <ul>
4
+ <% if @current > 1: %>
5
+ <li data-page="<%= @current - 1 %>" class="prev"><a href="#"><%- @options.prev_label %></a></li>
6
+ <% end %>
7
+
8
+ <%- @links %>
9
+
10
+ <% if @current + 1 <= @pages: %>
11
+ <li data-page="<%= @current + 1 %>" class="next"><a href="#"><%- @options.next_label %></a></li>
12
+ <% end %>
13
+ </ul>
@@ -0,0 +1,11 @@
1
+ <% if !@xhr: %>
2
+ <button class="btn btn-danger remove">x</button>
3
+ <button class="btn btn-primary upload">Upload</button>
4
+ <% end %>
5
+
6
+ <% if @STATUS == 'uploading': %>
7
+ <b>(<%= @PERCENT %>%)</b>
8
+ <br/>
9
+ <% end %>
10
+
11
+ <%= @name %>: <%= @size %>
@@ -0,0 +1,4 @@
1
+ <button id="saveAndClose" class="btn btn-large btn-primary">
2
+ Save and Close
3
+ <% if @count: %>(<%= @count %> Assets)<% end %>
4
+ </button>
@@ -0,0 +1,4 @@
1
+ <button id="uploadAll" class="btn btn-large btn-warning">
2
+ Upload All
3
+ <% if @count: %>(<%= @count %> Images)<% end %>
4
+ </button>
@@ -0,0 +1,8 @@
1
+ <h6>Import via URL/Key</h6>
2
+ <input type="text" name="url_input" id="urlInput" style="display:inline-block;" /><a class="add btn" href="#" style="display:inline-block;">Import</a>
3
+ <a href="#importHelp" role="button" class="btn btn-primary" data-toggle="modal" style="margin-top:10px;">Importing Help</a>
4
+
5
+ <div id="importError" class="alert alert-error importNotification" style="display:none; margin-top: 10px"></div>
6
+ <div id="importSuccess" class="alert alert-success importNotification" style="display:none; margin-top: 10px"></div>
7
+
8
+ <%- JST['asset_host_core/templates/import_help']() %>
@@ -0,0 +1,384 @@
1
+ @import "bootstrap";
2
+
3
+ body {
4
+ background: #ccc;
5
+ margin: 0;
6
+ padding: 0;
7
+ }
8
+
9
+ .navbar {
10
+ margin-bottom: 0;
11
+ }
12
+
13
+ #content {
14
+ background: #fff;
15
+ padding: $gridGutterWidth;
16
+ }
17
+
18
+ br.clear {
19
+ clear: both;
20
+ line-height: 0;
21
+ }
22
+
23
+ hr.tight {
24
+ margin: 0 0 12px 0;
25
+ }
26
+
27
+
28
+ .blocks.blockcaps, .blocks .blockcaps {
29
+ text-transform: uppercase;
30
+ }
31
+
32
+ .b_right {
33
+ text-align: right;
34
+ }
35
+
36
+ .greyed {
37
+ color: #666;
38
+ }
39
+
40
+ /* admin */
41
+
42
+ ul.asset_sizes {
43
+ list-style-type: none;
44
+
45
+ li {
46
+ @extend .btn;
47
+ display: block;
48
+ }
49
+
50
+ li.selected {
51
+ @extend .btn-primary;
52
+ }
53
+ }
54
+
55
+ .asset-wrapper {
56
+ position: relative;
57
+ padding-bottom: 56.25%; /* 16/9 ratio */
58
+ height: 0;
59
+ overflow: hidden;
60
+ margin-bottom: 1.3em;
61
+
62
+ iframe, object, embed {
63
+ position: absolute;
64
+ top: 0;
65
+ left: 0;
66
+ width: 100%;
67
+ height: 100%;
68
+ max-height: 260px;
69
+ }
70
+
71
+ img {
72
+ max-width: 100%;
73
+ width: auto;
74
+ }
75
+ }
76
+
77
+ .assetbox {
78
+ margin-right: -12px;
79
+
80
+ ul {
81
+ list-style-type: none;
82
+ margin-right: -12px;
83
+ padding: 0;
84
+
85
+ li {
86
+ display: inline;
87
+ float: left;
88
+ width: 88px;
89
+ height: 88px;
90
+ margin-right: 9px;
91
+ margin-bottom: 9px;
92
+ background: #eee;
93
+
94
+ button {
95
+ padding: 0;
96
+ border: 1px solid #ddd;
97
+
98
+ img {
99
+
100
+ }
101
+ }
102
+
103
+ button:hover {
104
+ cursor: pointer;
105
+ }
106
+
107
+
108
+ a {
109
+ color: inherit;
110
+
111
+ :hover {
112
+ text-decoration: none;
113
+ }
114
+ }
115
+
116
+ span {
117
+ display: none;
118
+ }
119
+ }
120
+ }
121
+ }
122
+
123
+ .tooltip {
124
+ h3 {
125
+ margin-top: 0;
126
+ margin-bottom: 2px;
127
+ font: normal 12px Arial, Helvetica, sans-serif;
128
+ color: #fff;
129
+ }
130
+ }
131
+
132
+ #replacedrop, #filedrop {
133
+ background: #ffe;
134
+ border: 1px solid darken(#ffc,40%);
135
+ min-height: 100px;
136
+ padding-bottom: 50px;
137
+
138
+ ul {
139
+ list-style-type: none;
140
+ margin: 0;
141
+ background: #ffc;
142
+
143
+ li {
144
+ display: block;
145
+ padding: 2px;
146
+ margin-bottom: 2px;
147
+ border: 1px solid #aaa;
148
+ overflow: auto;
149
+ background: #fff;
150
+
151
+ button {
152
+ display: inline;
153
+ float: right;
154
+ }
155
+
156
+ img {
157
+ display: inline;
158
+ float: left;
159
+ margin: -2px 4px 0 -2px;
160
+ }
161
+ }
162
+
163
+
164
+ li.help {
165
+ font-size: 16px;
166
+ color: #aaa;
167
+ text-align: center;
168
+ padding: 12px;
169
+ }
170
+
171
+ .ready {
172
+ background: #efc;
173
+ }
174
+
175
+ .uploading {
176
+ background: #cfc;
177
+ }
178
+
179
+ .complete {
180
+ background: #afa;
181
+ }
182
+
183
+ }
184
+
185
+ ul.uploads li {
186
+ min-height: 32px;
187
+ }
188
+
189
+
190
+ p.ahUp_upbutton {
191
+ display: block;
192
+ margin: 0;
193
+ padding: 4px;
194
+ border: 1px solid #aaa;
195
+ background: #fff;
196
+ text-align: center;
197
+ font-weight: bold;
198
+ }
199
+
200
+ }
201
+
202
+ .search_box {
203
+ input {
204
+ padding: 4px;
205
+ font-size: 14px;
206
+ margin-bottom: 0;
207
+ }
208
+ }
209
+
210
+ form.formtastic, div.formtastic {
211
+ ol {
212
+ list-style-type: none;
213
+ margin: 0;
214
+ padding: 0;
215
+ }
216
+
217
+ .help-inline {
218
+ color: #999;
219
+ }
220
+
221
+ .input {
222
+ margin-bottom: 4px;
223
+
224
+ .inline-hints {
225
+ color: #777 !important;
226
+ font-size: 12px;
227
+ margin-top: 2px;
228
+ margin-bottom: 2px;
229
+ }
230
+ }
231
+
232
+ textarea, input {
233
+ width: 96%;
234
+ }
235
+
236
+ .checkbox input {
237
+ width: inherit;
238
+ }
239
+
240
+ label {
241
+ font-size: 14px;
242
+ }
243
+
244
+ ol ol {
245
+ background: inherit;
246
+ padding: inherit;
247
+ }
248
+
249
+ li fieldset legend {
250
+ font: inherit;
251
+ color: inherit;
252
+ }
253
+
254
+ .required label {
255
+ font-weight: bold;
256
+ }
257
+
258
+ }
259
+
260
+
261
+ /*
262
+ public
263
+ */
264
+
265
+ #saveAndClose {
266
+ margin: 0 auto 5px auto;
267
+ }
268
+
269
+ #assets_loading {
270
+ position: absolute;
271
+ height: 490px;
272
+ width: 620px;
273
+ background: #fcc;
274
+ }
275
+
276
+ ul.assets, ul.uploads li {
277
+ overflow: auto;
278
+
279
+ p {
280
+ margin: 2px 0;
281
+ }
282
+
283
+ img {
284
+ max-width: 80px;
285
+ }
286
+ }
287
+
288
+ #my_assets {
289
+ min-height: 200px;
290
+ background: #ffc;
291
+ padding-bottom: 40px;
292
+
293
+ ul {
294
+ margin: 0;
295
+ list-style-type: none;
296
+
297
+ li {
298
+ clear: both;
299
+ background: #eee;
300
+ border: 1px solid #aaa;
301
+ padding: 2px;
302
+ margin-bottom: 4px;
303
+
304
+ button {
305
+ display: inline;
306
+ float: right;
307
+ }
308
+
309
+ img {
310
+ display: inline;
311
+ float: left;
312
+ margin: -2px 4px 0 -2px;
313
+ }
314
+ }
315
+ }
316
+
317
+ ul.assets li {
318
+ min-height: 86px;
319
+ }
320
+
321
+ ul.uploads li {
322
+ min-height: 32px;
323
+ }
324
+
325
+ ul.uploads li.uploading {
326
+ background: #cfc;
327
+ }
328
+
329
+ ul.uploads li.pending {
330
+ background: #afc;
331
+ }
332
+
333
+ ul.uploads li.complete {
334
+ background: #afa;
335
+ }
336
+ }
337
+
338
+ span.asset_tip {
339
+ background: #fff;
340
+ padding: 12px;
341
+ min-width: 200px;
342
+ }
343
+
344
+ .ah_asset_browse {
345
+ margin: 12px;
346
+
347
+ img {
348
+ display: inline;
349
+ float: right;
350
+ padding-left: 8px;
351
+ padding-bottom: 8px;
352
+ max-width: 200px;
353
+ }
354
+
355
+ h1 {
356
+ font: 18px/24px normal Arial, Helvetica, sans-serif;
357
+ }
358
+
359
+ h2 {
360
+ font: 14px/18px normal Arial, Helvetica, sans-serif;
361
+ color: #444;
362
+ margin: 0;
363
+ }
364
+
365
+ h3 {
366
+ color:#84b8d9;
367
+ }
368
+ }
369
+
370
+
371
+ .ah_chooser_url_input {
372
+ margin-top: 10px;
373
+ input { margin: 0 5px 0 0; } // Override bootstrap style
374
+ }
375
+
376
+ .ah_asset_edit {
377
+ width: 660px;
378
+ padding: 12px;
379
+ max-height: inherit;
380
+ }
381
+
382
+ .replace-asset input {
383
+ width: 95%;
384
+ }