ack_rails_admin_jcrop 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/rails_admin/ra.jcrop.js +1 -1
- data/app/assets/stylesheets/rails_admin/ra.jcrop.sass +12 -0
- data/app/views/rails_admin/main/_form_jcrop.html.slim +4 -1
- data/lib/rails_admin_jcrop/asset_engine/paperclip.rb +4 -3
- data/lib/rails_admin_jcrop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13e72edc6e6ed63c6cd118009e26c277dac8fe6c
|
4
|
+
data.tar.gz: 966e0bc8e5c40c4ec6b45412cd0039b66d48e6eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca19b55f93ff61844c28db8f8d62e2151e74b9724af7f407cbbc3127488ac4850c7f5c730ec1fd5c2071cc4976e1ace2fa97e57dd8cda9f33791c229cfe38ca9
|
7
|
+
data.tar.gz: 47905ee8778fdd1bb5d6a0924c7d422d6c80081b21606ae2bdc3df60526ba7f98f12ba2008efde6961dad1ebbfafff7313cc72fd1ca610a98ee016fb3d57cfc3
|
@@ -1,5 +1,17 @@
|
|
1
1
|
.jcrop_data_value
|
2
2
|
cursor: pointer
|
3
|
+
display: inline-block
|
4
|
+
&:hover
|
5
|
+
font-weight: bold
|
6
|
+
&:active
|
7
|
+
.title_link_hint
|
8
|
+
color: black
|
9
|
+
.title_link_hint
|
10
|
+
color: blue
|
11
|
+
display: inline-block
|
12
|
+
border-bottom: 1px solid blue
|
13
|
+
margin-bottom: 5px
|
14
|
+
line-height: 14px
|
3
15
|
|
4
16
|
.jcrop_data_value img, .jcrop_type .img-polaroid
|
5
17
|
min-width: 50px
|
@@ -16,7 +16,10 @@
|
|
16
16
|
|
17
17
|
.toggle{style=('display:none;' if file and field.delete_method and form.object.send(field.delete_method) == '1')}
|
18
18
|
- if value = field.pretty_value
|
19
|
-
.jcrop_data_value
|
19
|
+
.jcrop_data_value
|
20
|
+
.title_link_hint= "Обрезать"
|
21
|
+
div
|
22
|
+
= value
|
20
23
|
= form.file_field(field.name, field.html_attributes.reverse_merge({data: {fileupload: true, rails_admin_jcrop_options: rails_admin_jcrop_options } }))
|
21
24
|
|
22
25
|
- url = jcrop_path(model_name: form.object.class.to_param, modal: true, id: form.object.id, field: field.name, fit_image: field.fit_image)
|
@@ -6,7 +6,7 @@ module RailsAdminJcrop
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def crop!(obj, field)
|
9
|
-
obj.send(field).reprocess!
|
9
|
+
obj.send(field).reprocess!
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -14,12 +14,13 @@ end
|
|
14
14
|
|
15
15
|
module Paperclip
|
16
16
|
|
17
|
-
module
|
17
|
+
module RailsAdminJcropperMethods
|
18
18
|
def has_attached_file(*args)
|
19
19
|
super
|
20
20
|
self.attachment_definitions.each do |name, options|
|
21
21
|
options[:processors] ||= []
|
22
22
|
options[:processors] << :rails_admin_jcropper
|
23
|
+
options[:processors].uniq!
|
23
24
|
end
|
24
25
|
end
|
25
26
|
end
|
@@ -27,7 +28,7 @@ module Paperclip
|
|
27
28
|
module ClassMethods
|
28
29
|
def self.extended(base)
|
29
30
|
super
|
30
|
-
base.send :extend, ::Paperclip::
|
31
|
+
base.send :extend, ::Paperclip::RailsAdminJcropperMethods
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ack_rails_admin_jcrop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ack43
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-05
|
12
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|