avatars_for_rails 1.0.6 → 1.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56695592a126d6233ce5a370c461e54ca47539f2
|
4
|
+
data.tar.gz: 61b2f45b13cd21063ebfec2ac1f67060e3f5c4ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 725ff159ff4bbd5f8d41d3df1380df405e37a7841494baed4ee4a86c00752973a165c0ded315574975b2afeb259f37698dde4fbedf12519e5d058eb3df915a72
|
7
|
+
data.tar.gz: b7b14122ff2b503902b9f11568d99aef8476c8e342ee64f2af02cc3d0d8519fabb50ba4c10f0c254dd53c6bd1381ce5843fba988e56158f8724a3d7960db437a
|
data/Rakefile
CHANGED
@@ -46,13 +46,14 @@ var AvatarForRails = AvatarForRails || (function($, undefined) {
|
|
46
46
|
};
|
47
47
|
|
48
48
|
var initCrop = function(data) {
|
49
|
-
var div = $('
|
49
|
+
var div = $('.avatar-update'),
|
50
50
|
img,
|
51
51
|
ar;
|
52
52
|
|
53
|
+
$('#avatar-progress .bar').css('width', '0%');
|
53
54
|
div.html(data);
|
54
55
|
|
55
|
-
img = div.find('img.crop'),
|
56
|
+
img = div.find('img.avatar-crop'),
|
56
57
|
ar = parseInt(img.attr('data-aspect_ratio'), 10);
|
57
58
|
|
58
59
|
img.Jcrop({
|
@@ -66,7 +67,7 @@ var AvatarForRails = AvatarForRails || (function($, undefined) {
|
|
66
67
|
};
|
67
68
|
|
68
69
|
var updateCrop = function(coords) {
|
69
|
-
var img = $('
|
70
|
+
var img = $('img.avatar-crop');
|
70
71
|
var iW = img.width();
|
71
72
|
var iH = img.height();
|
72
73
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= image_tag avatarable.avatar_tmp_public_path(root_path), class: 'crop', "data-aspect_ratio" => avatarable.class.logo_aspect_ratio %>
|
1
|
+
<%= image_tag avatarable.avatar_tmp_public_path(root_path), class: 'avatar-crop', "data-aspect_ratio" => avatarable.class.logo_aspect_ratio %>
|
2
2
|
|
3
3
|
<%= form_for avatarable, url: avatar_path, multipart: true do |f| %>
|
4
4
|
<% %w( x y w ).each do |attr| %>
|
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
1
|
+
<div class="avatar-update">
|
2
|
+
<%= form_for avatarable, url: avatar_path, multipart: true do |f| %>
|
3
|
+
<%= f.file_field :logo, "data-url" => avatar_path %>
|
4
|
+
<% end %>
|
5
|
+
</div>
|
4
6
|
|
5
7
|
<%= render partial: 'avatars/progress' %>
|
6
8
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avatars_for_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaime Castro Montero
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jquery-rails
|