trusty-clipped-extension 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjEwYmYzNjRhMjA5NGQ1NGMxY2VhMjIwMzY2OTcwNjM2ZjdjNmJlYg==
4
+ NjE1MWFiNDUxYWY1NjU2MDUxMzE4MGJlODA0MWJiNzExMzUwZTY4ZQ==
5
5
  data.tar.gz: !binary |-
6
- YThhZDc5NDMxZDEyMWUwNGI3MmViNDgyZDE1YTA0MzBmYThhNTY1OQ==
6
+ NmFkNjg1ZDA1YzY4NWI3YzhjYTMzOThiYTliYjZhZTVmOGYxYTQ3ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGI3NDAzOTA0OWViNmU5ZjcxMWU1MTc4Njk0NDExYTFiZWVhZTU4MjkyNjQy
10
- ZWU2MDlmZGVjM2E1YjA5OTNlM2FjOTBmMDk5OWU2NDVhNWU2NjI0MmY3MDRh
11
- NTJmYjQ3OTc5YjczMDU2OWVlZWQzODc5ZjE3ZDBmMDU1NzcyOWI=
9
+ MDA4ODU3NTQzZDViMDM3YzMxMTc5YjUxNjA5ZWQzMzM2MzU5OWZhYTZjZTk1
10
+ OTJlZWQwZTI5Y2U4OWExMGM3NTI3NjYzMzBjODcxNzg0ZDhmZTM3ODQwNDE3
11
+ MTg5ZjIyMWQxN2JmYjQwMmUzMjIyNTA3ZWJiY2VmOTU2OTJiMjY=
12
12
  data.tar.gz: !binary |-
13
- ZmEwMDkzMDlkMTRlZTA3OGYxZmRiOGFlMmFmOGNmNDkxN2Q3ZDViNjIyMjkw
14
- NmFkNGM2ZmRjMmM1MjQzMmZkZmEyMmE1YjlmZDVlNWE0MzlhOWRiNTVhMzE5
15
- NDVlOTdmMjk4OGFiZDEzY2JkNzg4ZjdhZTMxNjg1ZWEyYWRhY2Y=
13
+ NzBlNTdkYjg4MjhiMDhiYzhmNzE3YmM0YzJmMTUxNTBjMTQ4YTEzZDk5MTcx
14
+ YjUzM2ZhNGU0ZmVlZDEzMjNmYmExZGQ1YzNhNGRjYjlhOWNhZTlmN2M3Mjhh
15
+ Mjc4OWRhZWYyYjJkOTliMzA4MjFhYjQwNzg2Y2M2ZjY3ZjBkMjA=
@@ -26,6 +26,7 @@ Assets = {
26
26
  e.preventDefault();
27
27
  var part_name = $("a.tab.here").children('span').html();
28
28
  if (part_name.indexOf(' ')) part_name = part_name.replace(' ', '-');
29
+ part_name = part_name.replace('_', '-');
29
30
  var part_id = 'part_' + part_name + '_content';
30
31
  var tag_parts = $(this).attr('rel').split('_');
31
32
  var tag_name = tag_parts[0];
@@ -57,6 +58,11 @@ Assets = {
57
58
  if ($('#filesearchforminput').val() !== '') {
58
59
  parameters.push(['search', $('#filesearchforminput').val()]);
59
60
  }
61
+
62
+ if ($('#page_id').val() !== undefined) {
63
+ parameters.push(['page_id', $('#page_id').val()]);
64
+ }
65
+
60
66
  var filters = [];
61
67
  var url_params = "";
62
68
  $('a.selective.pressed').each(function(){
@@ -49,7 +49,7 @@ p.asset
49
49
  border-top-color: #999
50
50
  border-left-color: #b0b0b0
51
51
  border-right-color: #bbb
52
- background: white image_url('admin/search.png') 4px center no-repeat
52
+ background: white url('/assets/admin/search.png') 4px center no-repeat
53
53
  +box-shadow(rgba(black, 0.2), 0, 1px, 0, inset)
54
54
  width: 180px
55
55
  padding: 2px 8px 2px 20px
@@ -147,7 +147,7 @@ p.asset
147
147
  .back
148
148
  display: none
149
149
  .front
150
- background: transparent url(/images/admin/spinner.gif) no-repeat center center
150
+ background: transparent url(/assets/admin/spinner.gif) no-repeat center center
151
151
  img
152
152
  opacity: 0.2
153
153
 
@@ -3,7 +3,9 @@ class Admin::AssetsController < Admin::ResourceController
3
3
 
4
4
  def index
5
5
  assets = Asset.scoped({:order => "created_at DESC"})
6
-
6
+
7
+ @page = Page.find(params[:page_id]) if params[:page_id]
8
+
7
9
  @term = params[:search] || ''
8
10
  assets = assets.matching(@term) if @term && !@term.blank?
9
11
 
@@ -48,9 +48,9 @@ class AssetType
48
48
 
49
49
  def icon(style_name='icon')
50
50
  if File.exist?(Rails.root + "public/images/admin/assets/#{icon_name}_#{style_name.to_s}.png")
51
- return "/images/admin/assets/#{icon_name}_#{style_name.to_s}.png"
51
+ return "/assets/admin/#{icon_name}_#{style_name.to_s}.png"
52
52
  else
53
- return "/images/admin/assets/#{icon_name}_icon.png"
53
+ return "/assets/admin/#{icon_name}_icon.png"
54
54
  end
55
55
  end
56
56
 
@@ -6,7 +6,7 @@
6
6
  - css_class = "#{asset_type} asset"
7
7
  - css_class += ' unsaved' if attachment.new_record?
8
8
 
9
- %li{:class => css_class, :id => "attachment_#{asset.uuid}"}
9
+ %li{:class => css_class, :id => "attachment_#{asset.uuid}", data: {toggle: "tooltip", placement: "left"}, title: "Asset ID: #{asset.id}"}
10
10
  = fields_for :page, @page do |f|
11
11
  = f.fields_for :page_attachments, attachment, :child_index => asset.uuid do |paf|
12
12
  - if attachment.new_record?
@@ -15,7 +15,7 @@
15
15
  = paf.hidden_field :_destroy, :class => 'destroyer'
16
16
  = paf.hidden_field :position, :class => 'pos'
17
17
  .front
18
- .thumbnail= image_tag asset.thumbnail(:thumbnail)
18
+ .thumbnail= image_tag asset.thumbnail(:thumbnail), alt: "Asset ID: #{asset.id}"
19
19
  .back
20
20
  .title= asset.title
21
21
  %ul.actions
@@ -13,7 +13,7 @@
13
13
  = f.label :asset, t("clipped_extension.choose_file")
14
14
  = f.file_field :asset, :class => 'file', :multiple => true
15
15
  #upload-status{:style => 'display: none;'}
16
- %img{:src => "/images/admin/spinner.gif"}
16
+ %img{:src => "/assets/admin/spinner.gif"}
17
17
  %p
18
18
  %a#attach-popup{:href=>"#attach_asset", :style => 'color: #666; font-size: .8em'}= t('clipped_extension.attach_existing')
19
19
 
@@ -33,7 +33,7 @@
33
33
  .buttons
34
34
  = button_tag "Set Title", {:id => 'update-asset', :class => "button"}
35
35
  #update-status{:style => 'display: none;'}
36
- %img{:src => "/images/admin/spinner.gif"}
36
+ %img{:src => "/assets/admin/spinner.gif"}
37
37
  = t('or')
38
38
  %a.close_popup{:href=>"#"}= 'Continue'
39
39
  #upload_holders
data/clipped_extension.rb CHANGED
@@ -16,8 +16,6 @@ class ClippedExtension < TrustyCms::Extension
16
16
  AssetType.new :image, :icon => 'image', :default_radius_tag => 'image', :processors => [:thumbnail], :styles => :standard, :extensions => %w[jpg jpeg png gif], :mime_types => %w[image/png image/x-png image/jpeg image/pjpeg image/jpg image/gif]
17
17
  AssetType.new :video, :icon => 'video', :processors => [:frame_grab], :styles => :standard, :mime_types => %w[application/x-mp4 video/mpeg video/quicktime video/x-la-asf video/x-ms-asf video/x-msvideo video/x-sgi-movie video/x-flv flv-application/octet-stream video/3gpp video/3gpp2 video/3gpp-tt video/BMPEG video/BT656 video/CelB video/DV video/H261 video/H263 video/H263-1998 video/H263-2000 video/H264 video/JPEG video/MJ2 video/MP1S video/MP2P video/MP2T video/mp4 video/MP4V-ES video/MPV video/mpeg4 video/mpeg4-generic video/nv video/parityfec video/pointer video/raw video/rtx video/ogg video/webm]
18
18
  AssetType.new :audio, :icon => 'audio', :mime_types => %w[audio/mpeg audio/mpg audio/ogg application/ogg audio/x-ms-wma audio/vnd.rn-realaudio audio/x-wav]
19
- AssetType.new :font, :icon => 'font', :extensions => %w[ttf otf eot woff]
20
- AssetType.new :flash, :icon => 'flash', :default_radius_tag => 'flash', :extensions => %w{swf}, :mime_types => %w[application/x-shockwave-flash]
21
19
  AssetType.new :pdf, :icon => 'pdf', :processors => [:thumbnail], :extensions => %w{pdf}, :mime_types => %w[application/pdf application/x-pdf], :styles => :standard
22
20
  AssetType.new :document, :icon => 'document', :mime_types => %w[application/msword application/rtf application/vnd.ms-excel application/vnd.ms-powerpoint application/vnd.ms-project application/vnd.ms-works text/plain text/html]
23
21
  AssetType.new :other, :icon => 'unknown'
@@ -1,5 +1,5 @@
1
1
  module TrustyCmsClippedExtension
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  SUMMARY = %q{Assets for TrustyCms CMS}
4
4
  DESCRIPTION = %q{Asset-management derived from Keith Bingman's Paperclipped extension.}
5
5
  URL = "https://github.com/pgharts/trusty-clipped-extension"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-clipped-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Bingman
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2015-03-23 00:00:00.000000000 Z
16
+ date: 2015-04-30 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: acts_as_list
@@ -116,6 +116,8 @@ files:
116
116
  - app/assets/images/admin/image_thumbnail.png
117
117
  - app/assets/images/admin/java_icon.png
118
118
  - app/assets/images/admin/page_edit.png
119
+ - app/assets/images/admin/pdf_icon.png
120
+ - app/assets/images/admin/pdf_thumbnail.png
119
121
  - app/assets/images/admin/perl_icon.png
120
122
  - app/assets/images/admin/php_icon.png
121
123
  - app/assets/images/admin/presentation_icon.png