avatars_for_rails 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/Gemfile.lock +4 -4
- data/README.rdoc +17 -5
- data/app/controllers/avatars_controller.rb +11 -11
- data/app/models/avatar.rb +0 -1
- data/app/views/avatars/_errors.html.erb +2 -3
- data/app/views/avatars/_list.html.erb +8 -17
- data/app/views/avatars/_new.html.erb +4 -2
- data/app/views/avatars/update.js.erb +3 -0
- data/avatars_for_rails.gemspec +2 -2
- data/config/locales/en.yml +1 -1
- data/lib/avatars_for_rails.rb +8 -7
- data/lib/generators/avatars_for_rails/templates/initializer.rb +1 -8
- data/lib/generators/avatars_for_rails/templates/public/javascripts/jquery.fileupload-ui.js +333 -63
- data/lib/generators/avatars_for_rails/templates/public/javascripts/jquery.fileupload.js +654 -173
- data/lib/generators/avatars_for_rails/templates/public/stylesheets/jquery.fileupload-ui.css +88 -21
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/config/initializers/avatars_for_rails.rb +3 -4
- metadata +5 -5
@@ -1,4 +1,16 @@
|
|
1
|
-
|
1
|
+
@charset 'UTF-8';
|
2
|
+
/*
|
3
|
+
* jQuery File Upload Plugin CSS 4.1
|
4
|
+
* https://github.com/blueimp/jQuery-File-Upload
|
5
|
+
*
|
6
|
+
* Copyright 2010, Sebastian Tschan
|
7
|
+
* https://blueimp.net
|
8
|
+
*
|
9
|
+
* Licensed under the MIT license:
|
10
|
+
* http://creativecommons.org/licenses/MIT/
|
11
|
+
*/
|
12
|
+
|
13
|
+
form.file_upload {
|
2
14
|
position: relative;
|
3
15
|
overflow: hidden;
|
4
16
|
direction: ltr;
|
@@ -9,36 +21,37 @@
|
|
9
21
|
-moz-border-radius: 10px;
|
10
22
|
-webkit-border-radius: 10px;
|
11
23
|
border-radius: 10px;
|
12
|
-
width:
|
13
|
-
height:
|
14
|
-
line-height:
|
24
|
+
width: 15em;
|
25
|
+
height: 2.5em;
|
26
|
+
line-height: 2.5em;
|
15
27
|
background: palegreen;
|
16
28
|
border: 1px solid limegreen;
|
17
29
|
}
|
18
30
|
|
19
|
-
.file_upload_small {
|
20
|
-
width:
|
21
|
-
height:
|
22
|
-
line-height:
|
23
|
-
font-size:
|
31
|
+
form.file_upload_small {
|
32
|
+
width: 15em;
|
33
|
+
height: 2.5em;
|
34
|
+
line-height: 2.5em;
|
35
|
+
font-size: 100%;
|
24
36
|
background: palegreen;
|
25
37
|
border: 1px solid limegreen;
|
26
38
|
}
|
27
39
|
|
28
|
-
.file_upload_large {
|
40
|
+
form.file_upload_large {
|
29
41
|
width: 100%;
|
30
|
-
height:
|
31
|
-
line-height:
|
32
|
-
font-size:
|
42
|
+
height: 7em;
|
43
|
+
line-height: 7em;
|
44
|
+
font-size: 2em;
|
33
45
|
background: palegreen;
|
34
46
|
border: 1px solid limegreen;
|
35
47
|
}
|
36
48
|
|
37
|
-
.file_upload_highlight
|
49
|
+
form.file_upload_highlight,
|
50
|
+
form.file_upload:hover {
|
38
51
|
background: lawngreen;
|
39
52
|
}
|
40
53
|
|
41
|
-
.file_upload input {
|
54
|
+
form.file_upload input {
|
42
55
|
position: absolute;
|
43
56
|
top: 0;
|
44
57
|
right: 0;
|
@@ -50,21 +63,75 @@
|
|
50
63
|
-o-transform: translate(-300px, -300px) scale(10);
|
51
64
|
-moz-transform: translate(-800px, 0) scale(10);
|
52
65
|
cursor: pointer;
|
66
|
+
height: 100%;
|
67
|
+
}
|
68
|
+
|
69
|
+
:root form.file_upload input {
|
70
|
+
height: auto;
|
53
71
|
}
|
54
72
|
|
55
|
-
.file_upload
|
73
|
+
form.file_upload button,
|
74
|
+
.no-js .file_upload_label,
|
75
|
+
.no-js .file_upload_overall_progress,
|
76
|
+
.no-js .file_upload_buttons {
|
56
77
|
display: none;
|
57
78
|
}
|
58
79
|
|
59
|
-
.
|
60
|
-
|
80
|
+
.file_upload .file_upload_label,
|
81
|
+
.file_upload .file_upload_overall_progress,
|
82
|
+
.file_upload .file_upload_buttons {
|
83
|
+
display: block;
|
84
|
+
}
|
85
|
+
|
86
|
+
.file_upload img {
|
87
|
+
border: none;
|
88
|
+
}
|
89
|
+
|
90
|
+
.progressbar, .progressbar div {
|
91
|
+
border: 1px solid #aaa;
|
92
|
+
-moz-border-radius: 4px;
|
93
|
+
-webkit-border-radius: 4px;
|
94
|
+
border-radius: 4px;
|
95
|
+
}
|
96
|
+
|
97
|
+
.progressbar div {
|
98
|
+
width: 100%;
|
99
|
+
height: 100%;
|
100
|
+
margin: -1px;
|
101
|
+
}
|
102
|
+
|
103
|
+
.file_upload_progress .ui-progressbar-value,
|
104
|
+
.file_upload_overall_progress .ui-progressbar-value,
|
105
|
+
.progressbar div {
|
106
|
+
background: url(pbar-ani.gif);
|
61
107
|
}
|
62
108
|
|
63
109
|
.file_upload_progress div {
|
64
110
|
width: 150px;
|
65
|
-
height:
|
111
|
+
height: 17px;
|
66
112
|
}
|
67
113
|
|
68
|
-
.
|
69
|
-
|
114
|
+
.file_upload_overall_progress div {
|
115
|
+
width: 350px;
|
116
|
+
height: 17px;
|
117
|
+
}
|
118
|
+
|
119
|
+
.file_upload .file_name {
|
120
|
+
padding: 0 10px;
|
121
|
+
font-size: 1.1em;
|
122
|
+
}
|
123
|
+
|
124
|
+
.file_upload .file_size {
|
125
|
+
padding: 0 10px 0 0;
|
126
|
+
text-align: right;
|
127
|
+
font-size: 1.1em;
|
128
|
+
}
|
129
|
+
|
130
|
+
.file_upload .files,
|
131
|
+
.file_upload_overall_progress {
|
132
|
+
margin: 10px 0;
|
133
|
+
}
|
134
|
+
|
135
|
+
.file_upload .ui-widget {
|
136
|
+
font-size: 1em;
|
70
137
|
}
|
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jaime Castro Montero
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-28 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: foreigner
|
@@ -71,7 +71,7 @@ dependencies:
|
|
71
71
|
requirement: &id004 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
hash: 13
|
77
77
|
segments:
|