tb_media 1.0.8 → 1.2.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e003b647c6daf3a4154d9f4be103bbd7c0967c4b
4
- data.tar.gz: 0ca6e7cec76779943f3d0285c634fc4b7e0e5871
3
+ metadata.gz: 113523e49c829fd56bda7df24ae33a556660fee5
4
+ data.tar.gz: f657496378550afd5bcb74b82fb774aee76277b8
5
5
  SHA512:
6
- metadata.gz: 6131013a9382913db5263624078d7b242371fb2d5d4ebe6392401f07fff197099aca03597facf7e387bc90ef66e80d00ef74a5879de258ffc0c4bc6a118370b7
7
- data.tar.gz: 2fd6a6e22a8de93cd57a555e6526d243657d8230a6a3a06503d5538b1998e01106a5d756865816c5c8473735f96dab31b3ab2b3b5e645b45b582f51063a87068
6
+ metadata.gz: f603cbb40c6ec92e57797ee3d3b095b3db21f37419e0564caa736dc410506ea60322d1517f147e76d7fc6649d93e563a4c1b50647659169707197bf2bc3a6349
7
+ data.tar.gz: 363afcc5f0f28cb0bfd3ec0605d202aad048570998ad48918e08cdb542527f925b20344e324210429c206c4089a3a05702b2e83dabf4caba8fc3ebb6fa1feff0
@@ -152,12 +152,12 @@ spud.admin.mediapicker = new function(){
152
152
 
153
153
  this.setProgressBarPrecent = function(percent){
154
154
  var progress = $('.spud_media_picker_upload_progress');
155
- progress.find('.bar').css({width: percent + '%'});
155
+ progress.find('.progress-bar').css({width: percent + '%'});
156
156
  if(percent == 100){
157
- progress.addClass('progress-success');
157
+ // progress.addClass('progress-bar-success');
158
158
  }
159
159
  else{
160
- progress.removeClass('progress-success');
160
+ // progress.removeClass('progress-bar-success');
161
161
  }
162
162
  };
163
163
 
@@ -48,7 +48,7 @@ img.size-50-thumb {
48
48
  #spud_media_cropper_toolbar{
49
49
  font-size: 11px;
50
50
  background: #ccc;
51
- width: 882px;
51
+ width: 900px;
52
52
  margin:0 auto;
53
53
  padding: 5px 10px;
54
54
  border-top-right-radius: 8px;
@@ -86,6 +86,7 @@ user-select: none;
86
86
  }
87
87
  #spud_media_cropper_toolbar input[type=text]{
88
88
  width: 30px;
89
+ height: 22px;
89
90
  }
90
91
  .spud_media_cropper_toolbar_item{
91
92
  margin-right: 6px;
@@ -56,6 +56,7 @@
56
56
  /* Uploader
57
57
  ------------ */
58
58
  .spud_media_picker_upload_progress{
59
+ margin: 10px 0 0;
59
60
  display: none;
60
61
  }
61
62
  .spud_media_picker_upload_progress .bar{
@@ -1,4 +1,4 @@
1
- <%= error_messages_for(@media) %>
1
+ <%= tb_form_errors(@media) %>
2
2
 
3
3
  <div id="spud_media_cropper_toolbar">
4
4
  <%= form_for @media, :url => admin_medium_path(@media) do |f| %>
@@ -26,13 +26,13 @@
26
26
  <div class="spud_media_cropper_toolbar_item">
27
27
  <%= label_tag :scale, 'Size' %>
28
28
  <%= f.hidden_field :crop_s %>
29
- <a href="#" id="spud_media_cropper_resize_up"><i class="icon-plus"></i></a>
30
- <a href="#" id="spud_media_cropper_resize_down"><i class="icon-minus"></i></a>
29
+ <a href="#" id="spud_media_cropper_resize_up"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></a>
30
+ <a href="#" id="spud_media_cropper_resize_down"><span class="glyphicon glyphicon-minus" aria-hidden="true"></span></a>
31
31
  </div>
32
32
 
33
33
  <div id="spud_media_cropper_toolbar_actions">
34
- <%= f.submit 'Crop', :id => 'spud_media_cropper_submit', :class => 'btn btn-mini btn-primary' %>
35
- <%= link_to "Don't Crop", admin_media_path, :class => 'btn btn-mini' %>
34
+ <%= f.submit 'Crop', :id => 'spud_media_cropper_submit', :class => 'btn btn-xs btn-primary' %>
35
+ <%= link_to "Don't Crop", admin_media_path, :class => 'btn btn-xs' %>
36
36
  </div>
37
37
  <% end %>
38
38
  </div>
@@ -1,37 +1,35 @@
1
- <%=content_for :data_controls do%>
2
- <%=link_to "Upload File",new_admin_medium_path(),:class => "btn btn-primary",:title => "Upload File"%>
3
- <%end%>
4
- <%=content_for :detail do%>
5
- <div class="page_list">
6
- <%@media.each do |media|%>
7
- <div class="page_row">
8
-
9
- <span class="row_meta">
10
- <% if media.is_protected && media.is_image? %>
11
- <img src="<%= media.image_from_type %>" class="size-50-thumb" />
12
- <% else %>
13
- <%= image_tag(media.image_from_type, :class => "size-50-thumb") %>
14
- <% end %>
15
- <%= link_to media.attachment_file_name, media.attachment_url %>
16
- </span>
1
+ <%= content_for :data_controls do %>
2
+ <%= link_to "Upload File", new_admin_medium_path, :class => "btn btn-primary", :title => "Upload File" %>
3
+ <% end %>
17
4
 
18
- <span class="edit_controls">
19
- <% if media.is_image? %>
20
- <%= link_to 'Crop', edit_admin_medium_path(media.id), :class => 'btn' %>
21
- <% end %>
22
- <% if media.is_protected %>
23
- <%= link_to raw('<i class="icon-lock"></i> Protected'), set_access_admin_medium_path(media.id, :protected => false), :method => :put, :class => 'btn' %>
24
- <% else %>
25
- <%= link_to 'Public', set_access_admin_medium_path(media.id, :protected => true), :method => :put, :class => 'btn' %>
26
- <% end %>
27
- <%=link_to "Remove", admin_medium_path(:id => media.id),:method => :delete,:class => 'btn btn-danger', :data => {:confirm => "Are you sure you want to remove this file?"} %>
28
- </span>
29
-
30
- <br style="clear:both;"/>
31
- </div>
32
- <%end%>
33
- <%=will_paginate @media%>
34
-
35
- </div>
36
-
37
- <%end%>
5
+ <%= content_for :detail do %>
6
+ <div class="table-responsive">
7
+ <table class="table table-striped table-hover">
8
+ <tbody>
9
+ <% @media.each do |media| %>
10
+ <tr>
11
+ <td>
12
+ <% if media.is_protected && media.is_image? %>
13
+ <img src="<%= media.image_from_type %>" class="size-50-thumb" />
14
+ <% else %>
15
+ <%= image_tag(media.image_from_type, :class => "size-50-thumb") %>
16
+ <% end %>
17
+ <%= link_to media.attachment_file_name, media.attachment_url %>
18
+ </td>
19
+ <td class="table-actions">
20
+ <% if media.is_image? %>
21
+ <%= link_to 'Crop', edit_admin_medium_path(media.id), :class => 'btn btn-sm btn-default' %>
22
+ <% end %>
23
+ <% if media.is_protected %>
24
+ <%= link_to raw('<i class="icon-lock"></i> Protected'), set_access_admin_medium_path(media.id, :protected => false), :method => :put, :class => 'btn btn-sm btn-default' %>
25
+ <% else %>
26
+ <%= link_to 'Public', set_access_admin_medium_path(media.id, :protected => true), :method => :put, :class => 'btn btn-sm btn-default' %>
27
+ <% end %>
28
+ <%= link_to "Remove", admin_medium_path(media), :method => :delete, :class => 'btn btn-sm btn-danger', :data => {:confirm => "Are you sure you want to remove this file?"} %>
29
+ </td>
30
+ </tr>
31
+ <% end %>
32
+ </tbody>
33
+ </table>
34
+ </div>
35
+ <% end %>
@@ -1,27 +1,6 @@
1
-
2
-
3
-
4
- <%=form_for @media,:url => admin_media_path(),:html=>{:class=>"form-horizontal", :multipart => true} do |f|%>
5
- <%= tb_form_errors(@media) %>
6
- <fieldset>
7
- <legend>Upload Media</legend>
8
-
9
- <div class="control-group">
10
- <%=f.label :attachment, "Choose File",:class =>"control-label"%>
11
- <div class="controls">
12
- <%=f.file_field :attachment%>
13
- </div>
14
- </div>
15
-
16
- <div class="control-group">
17
- <%= f.label :is_protected, 'Protected File', :class => 'control-label' %>
18
- <div class="controls">
19
- <%= f.check_box :is_protected %>
20
- </div>
21
- </div>
22
-
23
- <div class="form-actions">
24
- <%=f.submit "Upload", :class=>"btn btn-primary","data-loading-text"=>"Uploading..."%> or <%=link_to "cancel",admin_media_path,:class => "btn"%>
25
- </div>
26
- <%end%>
27
-
1
+ <%=form_for @media, :url => admin_media_path, :builder => TbCore::FormBuilder, :html => {:class => "form-horizontal", :multipart => true} do |f|%>
2
+ <%= tb_form_error_header(@media) %>
3
+ <%= f.tb_file_field :attachment %>
4
+ <%= f.tb_check_box :is_protected %>
5
+ <%= f.tb_save_buttons('File', admin_media_path) %>
6
+ <% end %>
@@ -20,12 +20,12 @@
20
20
  <%= form_for :spud_media, :html => {:class => 'spud_media_picker_upload_form', :target => 'spud_media_picker_upload_target'} do |f| %>
21
21
  <%= f.label :attachment, 'Upload New File' %>
22
22
  <%= f.file_field :attachment%>
23
- <div class="progress progress-striped active spud_media_picker_upload_progress">
24
- <div class="bar"></div>
23
+ <div class="progress spud_media_picker_upload_progress">
24
+ <div class="progress-bar progress-bar-striped active" role="progressbar"style="width: 60%;"></div>
25
25
  </div>
26
26
  <div class="spud_media_picker_buttons">
27
- <%= f.submit 'Upload', :class => 'btn btn-mini btn-primary spud_media_picker_tab_upload_submit' %>
28
- <%= link_to 'Cancel', '#', :class => 'btn btn-mini spud_media_picker_button_cancel' %>
27
+ <%= f.submit 'Upload', :class => 'btn btn-xs btn-primary spud_media_picker_tab_upload_submit' %>
28
+ <%= link_to 'Cancel', '#', :class => 'btn btn-xs btn-default spud_media_picker_button_cancel' %>
29
29
  </div>
30
30
  <% end %>
31
31
  </div>
@@ -44,8 +44,8 @@
44
44
  </ul>
45
45
  </div>
46
46
  <div class="spud_media_picker_buttons">
47
- <%= link_to 'Use Selected', '#', :class => 'btn btn-mini btn-primary spud_media_picker_button_use_selected' %>
48
- <%= link_to 'Cancel', '#', :class => 'btn btn-mini spud_media_picker_button_cancel' %>
47
+ <%= link_to 'Use Selected', '#', :class => 'btn btn-xs btn-primary spud_media_picker_button_use_selected' %>
48
+ <%= link_to 'Cancel', '#', :class => 'btn btn-xs btn-default spud_media_picker_button_cancel' %>
49
49
  </div>
50
50
  </div>
51
51
 
@@ -86,8 +86,8 @@
86
86
  <input name="spud_media_picker_option_dimension_w" type="text" placeholder="auto" /> px by <input name="spud_media_picker_option_dimension_h" type="text" placeholder="auto" /> px
87
87
  </div>
88
88
  <div class="spud_media_picker_buttons">
89
- <%= link_to 'Insert', '#', :class => 'btn btn-mini btn-primary spud_media_picker_button_insert' %>
90
- <%= link_to 'Cancel', '#', :class => 'btn btn-mini spud_media_picker_button_cancel' %>
89
+ <%= link_to 'Insert', '#', :class => 'btn btn-xs btn-primary spud_media_picker_button_insert' %>
90
+ <%= link_to 'Cancel', '#', :class => 'btn btn-xs btn-default spud_media_picker_button_cancel' %>
91
91
  </div>
92
92
  </div>
93
93
 
@@ -0,0 +1,9 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ activerecord:
6
+ attributes:
7
+ spud_media:
8
+ attachment: 'File Upload'
9
+ is_protected: 'Protected File'
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Media
3
- VERSION = "1.0.8"
3
+ VERSION = "1.2.0.beta1"
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -13,7 +13,7 @@ require 'rspec/autorun'
13
13
  require 'database_cleaner'
14
14
  require 'shoulda'
15
15
  require 'factory_girl'
16
- require 'mocha'
16
+ #require 'mocha'
17
17
  require 'capybara/rspec'
18
18
  require 'capybara/rails'
19
19
 
@@ -23,7 +23,7 @@ ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')
23
23
  Dir[File.join(ENGINE_RAILS_ROOT,"spec/support/**/*.rb"), File.join(ENGINE_RAILS_ROOT,"factories/*")].each {|f| require f}
24
24
 
25
25
  RSpec.configure do |config|
26
- config.mock_with :mocha
26
+ #config.mock_with :mocha
27
27
  config.use_transactional_fixtures = true
28
28
  config.infer_base_class_for_anonymous_controllers = false
29
29
 
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_media
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.2.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Westlake Design
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-27 00:00:00.000000000 Z
11
+ date: 2014-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '4.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: tb_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.2.7
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.2.7
41
41
  - !ruby/object:Gem::Dependency
@@ -192,8 +192,8 @@ dependencies:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
- description: Spud Media allows you to upload files to your site and manage them in
196
- the spud administrative panel. It also uses paperclip and supports s3 storage
195
+ description: Twice Baked Media allows you to upload files to your site and manage
196
+ them in the spud administrative panel. It also uses paperclip and supports s3 storage
197
197
  email:
198
198
  - greg@westlakedesign.com
199
199
  executables: []
@@ -248,6 +248,7 @@ files:
248
248
  - app/views/admin/media_picker/create.html.erb
249
249
  - app/views/admin/media_picker/create.js.erb
250
250
  - app/views/admin/media_picker/index.html.erb
251
+ - config/locales/en.yml
251
252
  - config/routes.rb
252
253
  - db/migrate/20120101194256_create_spud_media.rb
253
254
  - db/migrate/20120501203325_add_protected_to_spud_media.rb
@@ -295,12 +296,16 @@ files:
295
296
  - spec/dummy/public/422.html
296
297
  - spec/dummy/public/500.html
297
298
  - spec/dummy/public/favicon.ico
299
+ - spec/dummy/public/system/spud_media/1/cropped/test_img1.jpg
298
300
  - spec/dummy/public/system/spud_media/1/original/test_img1.png
299
301
  - spec/dummy/public/system/spud_media/1/small/test_img1.png
302
+ - spec/dummy/public/system/spud_media/2/cropped/test_img1.jpg
300
303
  - spec/dummy/public/system/spud_media/2/original/test_img1.png
301
304
  - spec/dummy/public/system/spud_media/2/small/test_img1.png
305
+ - spec/dummy/public/system/spud_media/3/cropped/test_img1.jpg
302
306
  - spec/dummy/public/system/spud_media/3/original/test_img1.png
303
307
  - spec/dummy/public/system/spud_media/3/small/test_img1.png
308
+ - spec/dummy/public/system/spud_media/4/cropped/test_img1.jpg
304
309
  - spec/dummy/public/system/spud_media/4/original/test_img1.png
305
310
  - spec/dummy/public/system/spud_media/4/small/test_img1.png
306
311
  - spec/dummy/public/system/spud_media/5/original/test_img1.png
@@ -328,15 +333,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
328
333
  version: '0'
329
334
  required_rubygems_version: !ruby/object:Gem::Requirement
330
335
  requirements:
331
- - - ">="
336
+ - - ">"
332
337
  - !ruby/object:Gem::Version
333
- version: '0'
338
+ version: 1.3.1
334
339
  requirements: []
335
340
  rubyforge_project:
336
341
  rubygems_version: 2.2.1
337
342
  signing_key:
338
343
  specification_version: 4
339
- summary: Spud File upload/management module
344
+ summary: TB File upload/management module
340
345
  test_files:
341
346
  - spec/controllers/media_controller_spec.rb
342
347
  - spec/dummy/app/assets/javascripts/application.js
@@ -373,12 +378,16 @@ test_files:
373
378
  - spec/dummy/public/422.html
374
379
  - spec/dummy/public/500.html
375
380
  - spec/dummy/public/favicon.ico
381
+ - spec/dummy/public/system/spud_media/1/cropped/test_img1.jpg
376
382
  - spec/dummy/public/system/spud_media/1/original/test_img1.png
377
383
  - spec/dummy/public/system/spud_media/1/small/test_img1.png
384
+ - spec/dummy/public/system/spud_media/2/cropped/test_img1.jpg
378
385
  - spec/dummy/public/system/spud_media/2/original/test_img1.png
379
386
  - spec/dummy/public/system/spud_media/2/small/test_img1.png
387
+ - spec/dummy/public/system/spud_media/3/cropped/test_img1.jpg
380
388
  - spec/dummy/public/system/spud_media/3/original/test_img1.png
381
389
  - spec/dummy/public/system/spud_media/3/small/test_img1.png
390
+ - spec/dummy/public/system/spud_media/4/cropped/test_img1.jpg
382
391
  - spec/dummy/public/system/spud_media/4/original/test_img1.png
383
392
  - spec/dummy/public/system/spud_media/4/small/test_img1.png
384
393
  - spec/dummy/public/system/spud_media/5/original/test_img1.png