avatars_for_rails 0.0.10 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,118 @@
1
+ /******************** Common ***********************/
2
+ *{
3
+ font-family: Arial;
4
+ font-size: 11px;
5
+ }
6
+
7
+ .clearfloat { clear: both; height: 0px;}
8
+ .space_center { padding-top: 9px; padding-right: 4px; text-align: center;}
9
+ h2{padding-left:10px;font-size: 14px;color: #2A3890;}
10
+ /******************** Avatars ***********************/
11
+ .avatars {
12
+ padding-left: 10px;
13
+ }
14
+ .avatar {
15
+ float:left;
16
+ position:relative;
17
+ }
18
+ .avatar .actions {
19
+ }
20
+ .avatar .delete_avatar {
21
+ position:absolute;
22
+ top:5px;
23
+ right:5px;
24
+ display:none;
25
+ }
26
+ .avatar .default {
27
+ border: 5px solid #2A3890;
28
+ }
29
+ .avatar .non_default {
30
+ border: 5px solid #E0EEF5;
31
+ }
32
+ #avatar_logo_drag{
33
+ margin-left: 25px;
34
+ }
35
+ /******************** New form ***********************/
36
+ .new_logo_form {
37
+ }
38
+ /******************** Slide Effect ***********************/
39
+ .boxgrid {
40
+ width: 104px;
41
+ height: 104px;
42
+ float:left;
43
+ overflow: hidden;
44
+ position: relative;
45
+ }
46
+ .boxgrid img {
47
+ position: absolute;
48
+ top: 0;
49
+ left: 0;
50
+ border: 0;
51
+ }
52
+ .boxcaption {
53
+ top: 104px;
54
+ left: 5px;
55
+ float: left;
56
+ position: absolute;
57
+ background: #E0EEF5;
58
+ opacity: .8;
59
+ width: 84px;
60
+ height: 28px;
61
+ /* For IE 5-7 */
62
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
63
+ /* For IE 8 */
64
+ -MS-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
65
+ }
66
+ .captionfull .boxcaption {
67
+ top: 104px;
68
+ left: 5px;
69
+ padding: 5px;
70
+ }
71
+ /**************** Crop **************/
72
+ #precropDiv {
73
+ width:499px;
74
+ display:inline-block;
75
+ padding: 0px 30px 0px 29px;
76
+ }
77
+ #precropPrev {
78
+ vertical-align:top;
79
+ display:inline-block;
80
+ /*padding: 5px 4px 5px 4px;*/
81
+ }
82
+ #precropPrevImg {
83
+ width:100px;
84
+ height:100px;
85
+ overflow:hidden;
86
+ margin-left:30px;
87
+ border: 1px solid #E0EEF5;
88
+ }
89
+ /************** BLOCK DIV SECTION *********/
90
+ .block .content{ padding: 5px 4px 5px 4px;}
91
+ .block .form_row { display: block; padding:5px; padding-left:20px; }
92
+
93
+
94
+ /*************REVIEW ********************/
95
+ * { margin: 0; padding: 0; font-family: Arial; }
96
+ html, body {height: 100%;}
97
+ .p { margin: 0px; padding: 0px; font-size: inherit; font-family: inherit; font-weight: inherit;
98
+ text-align: inherit; color: inherit; line-height: inherit; vertical-align: top;}
99
+ p { padding-top: 0px; margin-top: 0px;}
100
+ img { border: 0px;}
101
+ div { margin: 0px; padding: 0px; font-family: Helvetica; font-size: 11px;}
102
+ .AbsWrap { width: 100%; position: relative;}
103
+ .rowWrap { width: 100%;}
104
+ a:link,a:visited { color: inherit; text-decoration: inherit;}
105
+ a:hover { text-decoration: underline;}
106
+ .clearfloat { clear: both; height: 0px;}
107
+ h2{padding-left:10px;}
108
+ body{font-size:1.0em; color:#2A3890; background-color:#ffffff; }
109
+ #wrapper { background-color: #f5f5f5; width: 100%; margin: 0px auto; }
110
+ #wrapper_body{min-height: 552px; width: 960px; margin:0px auto; margin-left: auto; margin-right: auto;
111
+ margin-top: auto; margin-bottom:auto;}
112
+
113
+
114
+
115
+
116
+ .button{margin: 10px 0 10px 10px;padding: 3px 3px 3px 3px;color:#FFFFFF;background-color: #1F4A75;}
117
+
118
+
@@ -0,0 +1,35 @@
1
+ /* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */
2
+ .jcrop-holder { text-align: left; }
3
+
4
+ .jcrop-vline, .jcrop-hline
5
+ {
6
+ font-size: 0;
7
+ position: absolute;
8
+ background: white url('Jcrop.gif') top left repeat;
9
+ }
10
+ .jcrop-vline { height: 100%; width: 1px !important; }
11
+ .jcrop-hline { width: 100%; height: 1px !important; }
12
+ .jcrop-handle {
13
+ font-size: 1px;
14
+ width: 7px !important;
15
+ height: 7px !important;
16
+ border: 1px #eee solid;
17
+ background-color: #333;
18
+ *width: 9px;
19
+ *height: 9px;
20
+ }
21
+
22
+ .jcrop-tracker { width: 100%; height: 100%; }
23
+
24
+ .custom .jcrop-vline,
25
+ .custom .jcrop-hline
26
+ {
27
+ background: yellow;
28
+ }
29
+ .custom .jcrop-handle
30
+ {
31
+ border-color: black;
32
+ background-color: #C7BB00;
33
+ -moz-border-radius: 3px;
34
+ -webkit-border-radius: 3px;
35
+ }
@@ -0,0 +1,70 @@
1
+ .file_upload {
2
+ position: relative;
3
+ overflow: hidden;
4
+ direction: ltr;
5
+ cursor: pointer;
6
+ text-align: center;
7
+ color: #333;
8
+ font-weight: bold;
9
+ -moz-border-radius: 10px;
10
+ -webkit-border-radius: 10px;
11
+ border-radius: 10px;
12
+ width: 200px;
13
+ height: 30px;
14
+ line-height: 30px;
15
+ background: palegreen;
16
+ border: 1px solid limegreen;
17
+ }
18
+
19
+ .file_upload_small {
20
+ width: 200px;
21
+ height: 30px;
22
+ line-height: 30px;
23
+ font-size: auto;
24
+ background: palegreen;
25
+ border: 1px solid limegreen;
26
+ }
27
+
28
+ .file_upload_large {
29
+ width: 100%;
30
+ height: 150px;
31
+ line-height: 150px;
32
+ font-size: 20px;
33
+ background: palegreen;
34
+ border: 1px solid limegreen;
35
+ }
36
+
37
+ .file_upload_highlight {
38
+ background: lawngreen;
39
+ }
40
+
41
+ .file_upload input {
42
+ position: absolute;
43
+ top: 0;
44
+ right: 0;
45
+ margin: 0;
46
+ border: 300px solid transparent;
47
+ opacity: 0;
48
+ -ms-filter: 'alpha(opacity=0)';
49
+ filter: alpha(opacity=0);
50
+ -o-transform: translate(-300px, -300px) scale(10);
51
+ -moz-transform: translate(-800px, 0) scale(10);
52
+ cursor: pointer;
53
+ }
54
+
55
+ .file_upload iframe, .file_upload button {
56
+ display: none;
57
+ }
58
+
59
+ .file_upload_progress .ui-progressbar-value {
60
+ background: url(/images/pbar-ani.gif);
61
+ }
62
+
63
+ .file_upload_progress div {
64
+ width: 150px;
65
+ height: 15px;
66
+ }
67
+
68
+ .file_upload_cancel div {
69
+ cursor: pointer;
70
+ }
@@ -1,5 +1,6 @@
1
1
  <div id ="avatars_for_rails">
2
- <div class= "block">
2
+ <!--
3
+ <div class= "block">
3
4
  <div class = "content">
4
5
  <%= form_for Avatar.new,:html => { :multipart => true,:id =>"uploadForm"} do |f| %>
5
6
  <div class="form_row">
@@ -7,16 +8,17 @@
7
8
 
8
9
  <%= f.submit t('avatar.upload'), :class => "button" %>
9
10
  </div>
10
- <div id= "prueba">
11
- </div>
11
+ <div id= "prueba">
12
+ </div>
12
13
  <% end %>
13
14
  </div>
15
+
14
16
  </div>
15
-
17
+ -->
16
18
  <div class="files">
17
19
  <%= form_for Avatar.new, :html => { :class => "upload", :multipart => true } do |f| %>
18
- <%= f.file_field :logo %>
19
- <div>Upload files</div>
20
+ <%= f.file_field :logo, :id=> "avatar_logo_drag" %>
21
+ <!--<div>Upload files</div>-->
20
22
  <%= f.hidden_field :drag %>
21
23
  <% end %>
22
24
 
@@ -1,12 +1,12 @@
1
1
  <% content_for :headers do %>
2
- <%= javascript_include_tag 'jquery' %>
2
+
3
3
  <%= javascript_include_tag 'jquery.Jcrop.min' %>
4
4
  <%= javascript_include_tag 'jquery-ui.min' %>
5
5
  <%= javascript_include_tag 'rails' %>
6
- <%= javascript_include_tag 'avatars' %>
7
6
  <%= javascript_include_tag 'jquery.form' %>
8
7
  <%= javascript_include_tag 'jquery.fileupload' %>
9
8
  <%= javascript_include_tag 'jquery.fileupload-ui' %>
9
+ <%= javascript_include_tag 'avatars' %>
10
10
 
11
11
  <%= stylesheet_link_tag "jquery.Jcrop", :media => "screen, projection" %>
12
12
  <%= stylesheet_link_tag "avatars", :media => "screen, projection" %><br/>
@@ -11,7 +11,7 @@
11
11
  <%= t('avatar.preview') %>
12
12
  </div>
13
13
  <div id="precropPrevImg" class="logo">
14
- <%= image_tag "tmp/#{my_file_name}",:id=>"preview" %>
14
+ <%= image_tag "/images/tmp/#{my_file_name}",:id=>"preview" %>
15
15
  </div>
16
16
  </div>
17
17
 
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
 
22
22
  <div id="precropDiv" class = "block title content">
23
- <%= image_tag "tmp/#{my_file_name}",:id=>"cropImage" %>
23
+ <%= image_tag "/images/tmp/#{my_file_name}",:id=>"cropImage" %>
24
24
  </div>
25
25
  </div>
26
26
 
@@ -2,10 +2,10 @@
2
2
  # project in your rails apps through git.
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "avatars_for_rails"
5
- s.version = "0.0.10"
5
+ s.version = "0.1.0"
6
6
  s.authors = ["Jaime Castro Montero"]
7
7
  s.summary = "Avatar manager for rails apps."
8
- s.description = "A Rails engine that allows any model to act as avatarable, permitting it to have a complete avatar manager with a few options."
8
+ s.description = "A Rails engine that allows any model to act as avatarable, permitting it to have a complete avatar manager with a few options. Adapted to rails 3.1.0"
9
9
  s.email = "jaime1988@gmail.com"
10
10
  s.homepage = "http://github.com/ging/avatars_for_rails"
11
11
  s.files = `git ls-files`.split("\n")
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # Development Gem dependencies
22
22
  #
23
- s.add_development_dependency('rails', '>= 3.0.5')
23
+ s.add_development_dependency('rails', '>= 3.1.0.rc4')
24
24
  # Testing database
25
25
  s.add_development_dependency('sqlite3-ruby')
26
26
  # Debugging
@@ -4,19 +4,11 @@ class AvatarsForRails::InstallGenerator < Rails::Generators::NamedBase #:nodoc:
4
4
 
5
5
  source_root File.expand_path('../templates', __FILE__)
6
6
 
7
-
8
-
9
-
10
7
  require 'rails/generators/active_record'
11
8
 
12
9
  def create_initializer_file
13
10
  template 'initializer.rb', 'config/initializers/avatars_for_rails.rb'
14
11
  end
15
-
16
- def copy_public
17
- directory "public"
18
- end
19
-
20
12
 
21
13
  def self.next_migration_number(dirname)
22
14
  ActiveRecord::Generators::Base.next_migration_number(dirname)
@@ -57,7 +57,7 @@
57
57
  }
58
58
 
59
59
  .file_upload_progress .ui-progressbar-value {
60
- background: url(../images/pbar-ani.gif);
60
+ background: url(/images/pbar-ani.gif);
61
61
  }
62
62
 
63
63
  .file_upload_progress div {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatars_for_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 10
10
- version: 0.0.10
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jaime Castro Montero
@@ -15,12 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-10 00:00:00 +02:00
19
- default_executable:
18
+ date: 2011-06-24 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
21
+ name: foreigner
22
22
  prerelease: false
23
- type: :runtime
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
25
  requirements:
@@ -32,11 +31,11 @@ dependencies:
32
31
  - 9
33
32
  - 1
34
33
  version: 0.9.1
35
- name: foreigner
34
+ type: :runtime
36
35
  version_requirements: *id001
37
36
  - !ruby/object:Gem::Dependency
37
+ name: paperclip
38
38
  prerelease: false
39
- type: :runtime
40
39
  requirement: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
@@ -48,11 +47,11 @@ dependencies:
48
47
  - 3
49
48
  - 4
50
49
  version: 2.3.4
51
- name: paperclip
50
+ type: :runtime
52
51
  version_requirements: *id002
53
52
  - !ruby/object:Gem::Dependency
53
+ name: rmagick
54
54
  prerelease: false
55
- type: :runtime
56
55
  requirement: &id003 !ruby/object:Gem::Requirement
57
56
  none: false
58
57
  requirements:
@@ -64,27 +63,29 @@ dependencies:
64
63
  - 13
65
64
  - 1
66
65
  version: 2.13.1
67
- name: rmagick
66
+ type: :runtime
68
67
  version_requirements: *id003
69
68
  - !ruby/object:Gem::Dependency
69
+ name: rails
70
70
  prerelease: false
71
- type: :development
72
71
  requirement: &id004 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ">="
76
75
  - !ruby/object:Gem::Version
77
- hash: 13
76
+ hash: 15424109
78
77
  segments:
79
78
  - 3
79
+ - 1
80
80
  - 0
81
- - 5
82
- version: 3.0.5
83
- name: rails
81
+ - rc
82
+ - 4
83
+ version: 3.1.0.rc4
84
+ type: :development
84
85
  version_requirements: *id004
85
86
  - !ruby/object:Gem::Dependency
87
+ name: sqlite3-ruby
86
88
  prerelease: false
87
- type: :development
88
89
  requirement: &id005 !ruby/object:Gem::Requirement
89
90
  none: false
90
91
  requirements:
@@ -94,11 +95,11 @@ dependencies:
94
95
  segments:
95
96
  - 0
96
97
  version: "0"
97
- name: sqlite3-ruby
98
+ type: :development
98
99
  version_requirements: *id005
99
100
  - !ruby/object:Gem::Dependency
101
+ name: ruby-debug
100
102
  prerelease: false
101
- type: :development
102
103
  requirement: &id006 !ruby/object:Gem::Requirement
103
104
  none: false
104
105
  requirements:
@@ -110,11 +111,11 @@ dependencies:
110
111
  - 10
111
112
  - 3
112
113
  version: 0.10.3
113
- name: ruby-debug
114
+ type: :development
114
115
  version_requirements: *id006
115
116
  - !ruby/object:Gem::Dependency
117
+ name: rspec-rails
116
118
  prerelease: false
117
- type: :development
118
119
  requirement: &id007 !ruby/object:Gem::Requirement
119
120
  none: false
120
121
  requirements:
@@ -126,11 +127,11 @@ dependencies:
126
127
  - 5
127
128
  - 0
128
129
  version: 2.5.0
129
- name: rspec-rails
130
+ type: :development
130
131
  version_requirements: *id007
131
132
  - !ruby/object:Gem::Dependency
133
+ name: factory_girl
132
134
  prerelease: false
133
- type: :development
134
135
  requirement: &id008 !ruby/object:Gem::Requirement
135
136
  none: false
136
137
  requirements:
@@ -142,11 +143,11 @@ dependencies:
142
143
  - 3
143
144
  - 2
144
145
  version: 1.3.2
145
- name: factory_girl
146
+ type: :development
146
147
  version_requirements: *id008
147
148
  - !ruby/object:Gem::Dependency
149
+ name: forgery
148
150
  prerelease: false
149
- type: :development
150
151
  requirement: &id009 !ruby/object:Gem::Requirement
151
152
  none: false
152
153
  requirements:
@@ -158,11 +159,11 @@ dependencies:
158
159
  - 3
159
160
  - 6
160
161
  version: 0.3.6
161
- name: forgery
162
+ type: :development
162
163
  version_requirements: *id009
163
164
  - !ruby/object:Gem::Dependency
165
+ name: capybara
164
166
  prerelease: false
165
- type: :development
166
167
  requirement: &id010 !ruby/object:Gem::Requirement
167
168
  none: false
168
169
  requirements:
@@ -174,9 +175,9 @@ dependencies:
174
175
  - 3
175
176
  - 9
176
177
  version: 0.3.9
177
- name: capybara
178
+ type: :development
178
179
  version_requirements: *id010
179
- description: A Rails engine that allows any model to act as avatarable, permitting it to have a complete avatar manager with a few options.
180
+ description: A Rails engine that allows any model to act as avatarable, permitting it to have a complete avatar manager with a few options. Adapted to rails 3.1.0
180
181
  email: jaime1988@gmail.com
181
182
  executables: []
182
183
 
@@ -190,6 +191,15 @@ files:
190
191
  - MIT-LICENSE
191
192
  - README.rdoc
192
193
  - Rakefile
194
+ - app/assets/images/pbar-ani.gif
195
+ - app/assets/javascripts/avatars.js
196
+ - app/assets/javascripts/jquery.Jcrop.min.js
197
+ - app/assets/javascripts/jquery.fileupload-ui.js
198
+ - app/assets/javascripts/jquery.fileupload.js
199
+ - app/assets/javascripts/jquery.form.js
200
+ - app/assets/stylesheets/avatars.css
201
+ - app/assets/stylesheets/jquery.Jcrop.css
202
+ - app/assets/stylesheets/jquery.fileupload-ui.css
193
203
  - app/controllers/avatars_controller.rb
194
204
  - app/models/avatar.rb
195
205
  - app/views/avatars/_errors.html.erb
@@ -296,7 +306,6 @@ files:
296
306
  - spec/dummy/script/rails
297
307
  - spec/integration/navigation_spec.rb
298
308
  - spec/spec_helper.rb
299
- has_rdoc: true
300
309
  homepage: http://github.com/ging/avatars_for_rails
301
310
  licenses: []
302
311
 
@@ -326,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
335
  requirements: []
327
336
 
328
337
  rubyforge_project:
329
- rubygems_version: 1.6.2
338
+ rubygems_version: 1.7.2
330
339
  signing_key:
331
340
  specification_version: 3
332
341
  summary: Avatar manager for rails apps.