glebtv-rails-uploader 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +241 -0
- data/Rakefile +26 -0
- data/app/assets/javascripts/uploader/application.js +9 -0
- data/app/assets/javascripts/uploader/rails_admin.js +25 -0
- data/app/assets/stylesheets/uploader/application.css +7 -0
- data/app/controllers/uploader/attachments_controller.rb +67 -0
- data/app/views/rails_admin/main/_form_rails_uploader.haml +10 -0
- data/app/views/uploader/default/_container.html.erb +67 -0
- data/app/views/uploader/default/_download.html.erb +17 -0
- data/app/views/uploader/default/_upload.html.erb +14 -0
- data/config/locales/en.yml +5 -0
- data/config/locales/ru.yml +5 -0
- data/config/locales/uk.yml +5 -0
- data/config/routes.rb +7 -0
- data/lib/file_size_validator.rb +66 -0
- data/lib/glebtv-rails-uploader.rb +3 -0
- data/lib/uploader.rb +35 -0
- data/lib/uploader/asset.rb +47 -0
- data/lib/uploader/engine.rb +25 -0
- data/lib/uploader/fileuploads.rb +109 -0
- data/lib/uploader/helpers/field_tag.rb +100 -0
- data/lib/uploader/helpers/form_builder.rb +16 -0
- data/lib/uploader/helpers/form_tag_helper.rb +16 -0
- data/lib/uploader/hooks/active_record.rb +5 -0
- data/lib/uploader/hooks/formtastic.rb +14 -0
- data/lib/uploader/hooks/simple_form.rb +9 -0
- data/lib/uploader/rails_admin/field.rb +28 -0
- data/lib/uploader/version.rb +3 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/article.rb +7 -0
- data/spec/dummy/app/models/asset.rb +27 -0
- data/spec/dummy/app/models/picture.rb +5 -0
- data/spec/dummy/app/uploaders/picture_uploader.rb +55 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +58 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/migrate/20120508093416_create_assets.rb +19 -0
- data/spec/dummy/db/migrate/20120508093830_create_articles.rb +10 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories/articles.rb +8 -0
- data/spec/factories/assets.rb +11 -0
- data/spec/factories/files/rails.png +0 -0
- data/spec/fileuploads_spec.rb +57 -0
- data/spec/requests/attachments_controller_spec.rb +38 -0
- data/spec/spec_helper.rb +52 -0
- data/spec/uploader_spec.rb +18 -0
- data/vendor/assets/images/uploader/but_del_tag2.png +0 -0
- data/vendor/assets/images/uploader/ico_attach.png +0 -0
- data/vendor/assets/images/uploader/preloader.gif +0 -0
- data/vendor/assets/images/uploader/progressBarFillBg.png +0 -0
- data/vendor/assets/javascripts/uploader/jquery.fileupload-ip.js +160 -0
- data/vendor/assets/javascripts/uploader/jquery.fileupload-ui.js +637 -0
- data/vendor/assets/javascripts/uploader/jquery.fileupload.js +904 -0
- data/vendor/assets/javascripts/uploader/jquery.iframe-transport.js +171 -0
- data/vendor/assets/javascripts/uploader/jquery.ui.widget.js +282 -0
- data/vendor/assets/javascripts/uploader/load-image.min.js +1 -0
- data/vendor/assets/javascripts/uploader/locales/en.js +27 -0
- data/vendor/assets/javascripts/uploader/locales/ru.js +27 -0
- data/vendor/assets/javascripts/uploader/locales/uk.js +27 -0
- data/vendor/assets/javascripts/uploader/tmpl.min.js +1 -0
- data/vendor/assets/stylesheets/uploader/default.css +214 -0
- data/vendor/assets/stylesheets/uploader/jquery.fileupload-ui.css +30 -0
- metadata +317 -0
@@ -0,0 +1 @@
|
|
1
|
+
(function(a){"use strict";var b=function(a,c,d){var e=document.createElement("img"),f,g;return e.onerror=c,e.onload=function(){g&&b.revokeObjectURL(g),c(b.scale(e,d))},window.Blob&&a instanceof Blob||window.File&&a instanceof File?f=g=b.createObjectURL(a):f=a,f?(e.src=f,e):b.readFile(a,function(a){e.src=a})},c=window.createObjectURL&&window||window.URL&&URL||window.webkitURL&&webkitURL;b.scale=function(a,b){b=b||{};var c=document.createElement("canvas"),d=Math.max((b.minWidth||a.width)/a.width,(b.minHeight||a.height)/a.height);return d>1&&(a.width=parseInt(a.width*d,10),a.height=parseInt(a.height*d,10)),d=Math.min((b.maxWidth||a.width)/a.width,(b.maxHeight||a.height)/a.height),d<1&&(a.width=parseInt(a.width*d,10),a.height=parseInt(a.height*d,10)),!b.canvas||!c.getContext?a:(c.width=a.width,c.height=a.height,c.getContext("2d").drawImage(a,0,0,a.width,a.height),c)},b.createObjectURL=function(a){return c?c.createObjectURL(a):!1},b.revokeObjectURL=function(a){return c?c.revokeObjectURL(a):!1},b.readFile=function(a,b){if(window.FileReader&&FileReader.prototype.readAsDataURL){var c=new FileReader;return c.onload=function(a){b(a.target.result)},c.readAsDataURL(a),c}return!1},typeof define!="undefined"&&define.amd?define(function(){return b}):a.loadImage=b})(this);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery File Upload Plugin Localization Example 6.5
|
3
|
+
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
+
*
|
5
|
+
* Copyright 2012, Sebastian Tschan
|
6
|
+
* https://blueimp.net
|
7
|
+
*
|
8
|
+
* Licensed under the MIT license:
|
9
|
+
* http://www.opensource.org/licenses/MIT
|
10
|
+
*/
|
11
|
+
|
12
|
+
window.locale = {
|
13
|
+
"fileupload": {
|
14
|
+
"errors": {
|
15
|
+
"maxFileSize": "File is too big",
|
16
|
+
"minFileSize": "File is too small",
|
17
|
+
"acceptFileTypes": "Filetype not allowed",
|
18
|
+
"maxNumberOfFiles": "Max number of files exceeded",
|
19
|
+
"uploadedBytes": "Uploaded bytes exceed file size",
|
20
|
+
"emptyResult": "Empty file upload result"
|
21
|
+
},
|
22
|
+
"error": "Error",
|
23
|
+
"start": "Start",
|
24
|
+
"cancel": "Cancel",
|
25
|
+
"destroy": "Delete"
|
26
|
+
}
|
27
|
+
};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery File Upload Plugin Localization Example 6.5
|
3
|
+
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
+
*
|
5
|
+
* Copyright 2012, Sebastian Tschan
|
6
|
+
* https://blueimp.net
|
7
|
+
*
|
8
|
+
* Licensed under the MIT license:
|
9
|
+
* http://www.opensource.org/licenses/MIT
|
10
|
+
*/
|
11
|
+
|
12
|
+
window.locale = {
|
13
|
+
"fileupload": {
|
14
|
+
"errors": {
|
15
|
+
"maxFileSize": "Файл слишком велик",
|
16
|
+
"minFileSize": "Файл слишком мал",
|
17
|
+
"acceptFileTypes": "Тип файла не допускается",
|
18
|
+
"maxNumberOfFiles": "Превышено максимальное количество файлов",
|
19
|
+
"uploadedBytes": "Превышен максимальный размер файла",
|
20
|
+
"emptyResult": "Пустой результат загрузки файла"
|
21
|
+
},
|
22
|
+
"error": "Ошибка",
|
23
|
+
"start": "Старт",
|
24
|
+
"cancel": "Отмена",
|
25
|
+
"destroy": "Удалить"
|
26
|
+
}
|
27
|
+
};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/*
|
2
|
+
* jQuery File Upload Plugin Localization Example 6.5
|
3
|
+
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
+
*
|
5
|
+
* Copyright 2012, Sebastian Tschan
|
6
|
+
* https://blueimp.net
|
7
|
+
*
|
8
|
+
* Licensed under the MIT license:
|
9
|
+
* http://www.opensource.org/licenses/MIT
|
10
|
+
*/
|
11
|
+
|
12
|
+
window.locale = {
|
13
|
+
"fileupload": {
|
14
|
+
"errors": {
|
15
|
+
"maxFileSize": "Файл занадто великий",
|
16
|
+
"minFileSize": "Файл занадто малий",
|
17
|
+
"acceptFileTypes": "Тип файлу не допускається",
|
18
|
+
"maxNumberOfFiles": "Перевищено максимальну кількість файлів",
|
19
|
+
"uploadedBytes": "Перевищено максимальний розмір файлу",
|
20
|
+
"emptyResult": "Порожній результат завантаження файлу"
|
21
|
+
},
|
22
|
+
"error": "Помилка",
|
23
|
+
"start": "Старт",
|
24
|
+
"cancel": "Скасувати",
|
25
|
+
"destroy": "Знищити"
|
26
|
+
}
|
27
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(a){"use strict";var b=function(a,c){var d=/[^\w\-\.:]/.test(a)?new Function(b.arg+",tmpl","var _e=tmpl.encode"+b.helper+",_s='"+a.replace(b.regexp,b.func)+"';return _s;"):b.cache[a]=b.cache[a]||b(b.load(a));return c?d(c,b):function(a){return d(a,b)}};b.cache={},b.load=function(a){return document.getElementById(a).innerHTML},b.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,b.func=function(a,b,c,d,e,f){if(b)return{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[a]||"\\"+a;if(c)return c==="="?"'+_e("+d+")+'":"'+("+d+"||'')+'";if(e)return"';";if(f)return"_s+='"},b.encReg=/[<>&"'\x00]/g,b.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"},b.encode=function(a){return String(a||"").replace(b.encReg,function(a){return b.encMap[a]||""})},b.arg="o",b.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}",typeof define=="function"&&define.amd?define(function(){return b}):a.tmpl=b})(this);
|
@@ -0,0 +1,214 @@
|
|
1
|
+
.uploader-dnd-area {
|
2
|
+
border: 1px dashed #ccc;
|
3
|
+
padding: 15px 0px 15px 20px;
|
4
|
+
color: #b1b1b1;
|
5
|
+
overflow: hidden;
|
6
|
+
}
|
7
|
+
.uploader-dnd-area:active {
|
8
|
+
border-color: #d169d9;
|
9
|
+
}
|
10
|
+
.uploader-dnd-area:active .uploader-dnd-hints .uploader-dnd-hint {
|
11
|
+
color: #d169d9;
|
12
|
+
}
|
13
|
+
.uploader-dnd-hints {
|
14
|
+
text-align: center;
|
15
|
+
padding: 30px 0;
|
16
|
+
overflow: hidden;
|
17
|
+
clear: both;
|
18
|
+
}
|
19
|
+
.uploader-dnd-hints .uploader-button {
|
20
|
+
margin: 0 20px 0 200px;
|
21
|
+
width: 222px;
|
22
|
+
float: left;
|
23
|
+
}
|
24
|
+
.uploader-dnd-hints .uploader-dnd-hint {
|
25
|
+
float: left;
|
26
|
+
line-height: 30px;
|
27
|
+
font-size: 12px;
|
28
|
+
}
|
29
|
+
.uploader-dnd-hints .uploader-dnd-hint span {
|
30
|
+
padding: 10px 30px;
|
31
|
+
background: url(/assets/uploader/ico_attach.png) no-repeat 9px center;
|
32
|
+
}
|
33
|
+
.uploader-dnd-hints input.uploader {
|
34
|
+
height: 31px;
|
35
|
+
line-height: 31px;
|
36
|
+
}
|
37
|
+
.uploader-button {
|
38
|
+
background: #972da0;
|
39
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#982da1', endColorstr='#892891');
|
40
|
+
background: -webkit-linear-gradient(left top, left bottom, #982da1, #892891);
|
41
|
+
background: -moz-linear-gradient(top, #982da1, #892891);
|
42
|
+
background: -o-linear-gradient(top, #982da1, #892891);
|
43
|
+
background: -ms-linear-gradient(top, #982da1, #892891);
|
44
|
+
border: solid 1px #5f1c65;
|
45
|
+
border-radius: 2px;
|
46
|
+
-moz-border-radius: 2px;
|
47
|
+
padding: 0 15px;
|
48
|
+
margin: 0 3px 3px;
|
49
|
+
color: #fff;
|
50
|
+
font-size: 12px;
|
51
|
+
font-family: MyriadPro, Arial, Helvetica, sans-serif;
|
52
|
+
font-weight: bold;
|
53
|
+
text-shadow: 0 1px 0 #000;
|
54
|
+
cursor: pointer;
|
55
|
+
height: 31px;
|
56
|
+
width: 222px;
|
57
|
+
}
|
58
|
+
.uploader-button div {
|
59
|
+
height: 31px;
|
60
|
+
width: 222px;
|
61
|
+
display: table-cell;
|
62
|
+
text-align: center;
|
63
|
+
vertical-align: middle;
|
64
|
+
}
|
65
|
+
|
66
|
+
.uploader-button:hover {
|
67
|
+
background: #972da0;
|
68
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#90179a', endColorstr='#7d2485');
|
69
|
+
background: -webkit-linear-gradient(left top, left bottom, #90179a, #7d2485);
|
70
|
+
background: -moz-linear-gradient(top, #90179a, #7d2485);
|
71
|
+
background: -o-linear-gradient(top, #90179a, #7d2485);
|
72
|
+
background: -ms-linear-gradient(top, #90179a, #7d2485);
|
73
|
+
-moz-box-shadow: 0 1px 3px #aaa;
|
74
|
+
-webkit-box-shadow: 0 1px 3px #aaa;
|
75
|
+
box-shadow: 0 1px 3px #aaa;
|
76
|
+
}
|
77
|
+
.uploader-button:active {
|
78
|
+
background: #8e1898;
|
79
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#8e1898', endColorstr='#7f2387');
|
80
|
+
background: -webkit-linear-gradient(left top, left bottom, #8e1898, #7f2387);
|
81
|
+
background: -moz-linear-gradient(top, #8e1898, #7f2387);
|
82
|
+
background: -o-linear-gradient(top, #8e1898, #7f2387);
|
83
|
+
background: -ms-linear-gradient(top, #8e1898, #7f2387);
|
84
|
+
-moz-box-shadow: inset 0 0 4px #5f1c65;
|
85
|
+
-webkit-box-shadow: inset 0 0 4px #5f1c65;
|
86
|
+
box-shadow: inset 0 0 4px #5f1c65;
|
87
|
+
}
|
88
|
+
.uploader-button::-moz-focus-inner {
|
89
|
+
border: 1px dotted transparent;
|
90
|
+
}
|
91
|
+
.uploader-button.gray {
|
92
|
+
background: #f4f4f4;
|
93
|
+
border: solid 1px #dbdbdb;
|
94
|
+
color: #616161;
|
95
|
+
text-shadow: none;
|
96
|
+
}
|
97
|
+
.uploader-button.gray:hover {
|
98
|
+
background: #f3f3f3;
|
99
|
+
border: solid 1px #c6c6c6;
|
100
|
+
color: #444;
|
101
|
+
-webkit-box-shadow: 0 3px 3px -1px #e6e6e6;
|
102
|
+
-moz-box-shadow: 0 3px 3px -1px #e6e6e6;
|
103
|
+
box-shadow: 0 3px 3px -1px #e6e6e6;
|
104
|
+
}
|
105
|
+
.uploader-button.gray:active {
|
106
|
+
border: 1px solid #ccc;
|
107
|
+
-webkit-box-shadow: 0 0 3px #ccc inset !important;
|
108
|
+
-moz-box-shadow : 0 0 3px #ccc inset !important;
|
109
|
+
-o-box-shadow : 0 0 3px #ccc inset !important;
|
110
|
+
box-shadow : 0 0 3px #ccc inset !important;
|
111
|
+
background-color: #e9e9e9 !important;
|
112
|
+
color: #444;
|
113
|
+
}
|
114
|
+
input[disabled].uploader-button {
|
115
|
+
background: #d2aad6 !important;
|
116
|
+
border: solid 1px #bfa4c1 !important;
|
117
|
+
-webkit-box-shadow: none !important;
|
118
|
+
-moz-box-shadow : none !important;
|
119
|
+
-o-box-shadow : none !important;
|
120
|
+
box-shadow : none !important;
|
121
|
+
text-shadow: none;
|
122
|
+
cursor: default;
|
123
|
+
}
|
124
|
+
input[disabled].uploader-button.gray {
|
125
|
+
background: #f4f4f4 !important;
|
126
|
+
border: solid 1px #dbdbdb !important;
|
127
|
+
-webkit-box-shadow: none !important;
|
128
|
+
-moz-box-shadow : none !important;
|
129
|
+
-o-box-shadow : none !important;
|
130
|
+
box-shadow : none !important;
|
131
|
+
color: #616161 !important;
|
132
|
+
cursor: default;
|
133
|
+
}
|
134
|
+
|
135
|
+
.uploader-dnd-area .attach_item {
|
136
|
+
width: 242px;
|
137
|
+
height: 50px;
|
138
|
+
border: 1px solid #cccccd;
|
139
|
+
padding: 19px;
|
140
|
+
position: relative;
|
141
|
+
float: left;
|
142
|
+
margin: 0 20px 20px 0;
|
143
|
+
background: white;
|
144
|
+
}
|
145
|
+
.uploader-dnd-area .attach_item:hover {
|
146
|
+
-moz-box-shadow: 0 0 2px #ccc;
|
147
|
+
-webkit-box-shadow: 0 0 2px #ccc;
|
148
|
+
box-shadow: 0 0 2px #ccc;
|
149
|
+
}
|
150
|
+
.uploader-dnd-area .attach_item:active {
|
151
|
+
-moz-box-shadow: 0 0 5px #d2d2d2;
|
152
|
+
-webkit-box-shadow: 0 0 5px #d2d2d2;
|
153
|
+
box-shadow: 0 0 5px #d2d2d2;
|
154
|
+
border: solid 1px #cf63d8;
|
155
|
+
}
|
156
|
+
|
157
|
+
.uploader-dnd-area .attach_item a.del_btn {
|
158
|
+
width: 19px;
|
159
|
+
height: 19px;
|
160
|
+
display: block;
|
161
|
+
position: absolute;
|
162
|
+
top: -10px;
|
163
|
+
right: -10px;
|
164
|
+
background: url(/assets/uploader/but_del_tag2.png) no-repeat top left;
|
165
|
+
}
|
166
|
+
.uploader-dnd-area .attach_item .del_btn:hover {
|
167
|
+
background-position: bottom left;
|
168
|
+
}
|
169
|
+
|
170
|
+
.uploader-dnd-area .attach_item .thumbnail {
|
171
|
+
width: 50px;
|
172
|
+
height: 50px;
|
173
|
+
float: left;
|
174
|
+
overflow: hidden;
|
175
|
+
background-color: #f3f3f3;
|
176
|
+
}
|
177
|
+
.uploader-dnd-area .attach_item .thumbnail .preloader {
|
178
|
+
border: 1px solid #E5E5E5;
|
179
|
+
padding: 10px;
|
180
|
+
}
|
181
|
+
.uploader-dnd-area .attach_item .infoHolder {
|
182
|
+
float: right;
|
183
|
+
width: 180px;
|
184
|
+
overflow: hidden;
|
185
|
+
}
|
186
|
+
.uploader-dnd-area .attach_item .fileName {
|
187
|
+
color: #000;
|
188
|
+
font-size: 14px;
|
189
|
+
height: 18px;
|
190
|
+
overflow: hidden;
|
191
|
+
}
|
192
|
+
.uploader-dnd-area .attach_item.loading .fileName {
|
193
|
+
color: #B1B1B1;
|
194
|
+
}
|
195
|
+
.uploader-dnd-area .attach_item .fileWeight {
|
196
|
+
font-size: 12px;
|
197
|
+
}
|
198
|
+
.uploader-dnd-area .attach_item .progressBar {
|
199
|
+
display: none;
|
200
|
+
position: absolute;
|
201
|
+
bottom: 19px;
|
202
|
+
width: 173px;
|
203
|
+
height: 8px;
|
204
|
+
border: 1px solid #cccccc;
|
205
|
+
padding: 1px;
|
206
|
+
}
|
207
|
+
.uploader-dnd-area .attach_item .progressBar .fill {
|
208
|
+
height: 8px;
|
209
|
+
background: url(/assets/uploader/progressBarFillBg.png) repeat-x;
|
210
|
+
}
|
211
|
+
|
212
|
+
.uploader-dnd-area .attach_item.loading .progressBar {
|
213
|
+
display: block;
|
214
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
@charset 'UTF-8';
|
2
|
+
/*
|
3
|
+
* jQuery File Upload UI Plugin CSS 6.3
|
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://www.opensource.org/licenses/MIT
|
11
|
+
*/
|
12
|
+
|
13
|
+
.fileinput-button {
|
14
|
+
position: relative;
|
15
|
+
overflow: hidden;
|
16
|
+
float: left;
|
17
|
+
}
|
18
|
+
.fileinput-button input.uploader {
|
19
|
+
position: absolute;
|
20
|
+
top: 0;
|
21
|
+
right: 0;
|
22
|
+
margin: 0;
|
23
|
+
border: solid transparent;
|
24
|
+
border-width: 0 0 100px 200px;
|
25
|
+
opacity: 0;
|
26
|
+
filter: alpha(opacity=0);
|
27
|
+
-moz-transform: translate(-300px, 0) scale(4);
|
28
|
+
direction: ltr;
|
29
|
+
cursor: pointer;
|
30
|
+
}
|
metadata
ADDED
@@ -0,0 +1,317 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: glebtv-rails-uploader
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.8
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- GlebTv
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-27 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: sqlite3
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: carrierwave
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rails
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - '='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 3.2.13
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.2.13
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: mini_magick
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: jquery-rails
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rspec-rails
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 2.12.1
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 2.12.1
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: factory_girl_rails
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 3.2.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 3.2.0
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: database_cleaner
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: fuubar
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
description: Rails HTML5 FileUpload helpers
|
159
|
+
email: glebtv@gmail.com
|
160
|
+
executables: []
|
161
|
+
extensions: []
|
162
|
+
extra_rdoc_files:
|
163
|
+
- README.md
|
164
|
+
files:
|
165
|
+
- app/views/uploader/default/_download.html.erb
|
166
|
+
- app/views/uploader/default/_container.html.erb
|
167
|
+
- app/views/uploader/default/_upload.html.erb
|
168
|
+
- app/views/rails_admin/main/_form_rails_uploader.haml
|
169
|
+
- app/assets/stylesheets/uploader/application.css
|
170
|
+
- app/assets/javascripts/uploader/application.js
|
171
|
+
- app/assets/javascripts/uploader/rails_admin.js
|
172
|
+
- app/controllers/uploader/attachments_controller.rb
|
173
|
+
- lib/uploader/helpers/form_builder.rb
|
174
|
+
- lib/uploader/helpers/field_tag.rb
|
175
|
+
- lib/uploader/helpers/form_tag_helper.rb
|
176
|
+
- lib/uploader/asset.rb
|
177
|
+
- lib/uploader/fileuploads.rb
|
178
|
+
- lib/uploader/hooks/formtastic.rb
|
179
|
+
- lib/uploader/hooks/active_record.rb
|
180
|
+
- lib/uploader/hooks/simple_form.rb
|
181
|
+
- lib/uploader/rails_admin/field.rb
|
182
|
+
- lib/uploader/engine.rb
|
183
|
+
- lib/uploader/version.rb
|
184
|
+
- lib/glebtv-rails-uploader.rb
|
185
|
+
- lib/uploader.rb
|
186
|
+
- lib/file_size_validator.rb
|
187
|
+
- config/locales/ru.yml
|
188
|
+
- config/locales/en.yml
|
189
|
+
- config/locales/uk.yml
|
190
|
+
- config/routes.rb
|
191
|
+
- vendor/assets/stylesheets/uploader/jquery.fileupload-ui.css
|
192
|
+
- vendor/assets/stylesheets/uploader/default.css
|
193
|
+
- vendor/assets/javascripts/uploader/jquery.fileupload-ui.js
|
194
|
+
- vendor/assets/javascripts/uploader/load-image.min.js
|
195
|
+
- vendor/assets/javascripts/uploader/locales/uk.js
|
196
|
+
- vendor/assets/javascripts/uploader/locales/en.js
|
197
|
+
- vendor/assets/javascripts/uploader/locales/ru.js
|
198
|
+
- vendor/assets/javascripts/uploader/jquery.fileupload.js
|
199
|
+
- vendor/assets/javascripts/uploader/tmpl.min.js
|
200
|
+
- vendor/assets/javascripts/uploader/jquery.iframe-transport.js
|
201
|
+
- vendor/assets/javascripts/uploader/jquery.fileupload-ip.js
|
202
|
+
- vendor/assets/javascripts/uploader/jquery.ui.widget.js
|
203
|
+
- vendor/assets/images/uploader/progressBarFillBg.png
|
204
|
+
- vendor/assets/images/uploader/ico_attach.png
|
205
|
+
- vendor/assets/images/uploader/but_del_tag2.png
|
206
|
+
- vendor/assets/images/uploader/preloader.gif
|
207
|
+
- MIT-LICENSE
|
208
|
+
- Rakefile
|
209
|
+
- README.md
|
210
|
+
- spec/dummy/script/rails
|
211
|
+
- spec/dummy/db/migrate/20120508093416_create_assets.rb
|
212
|
+
- spec/dummy/db/migrate/20120508093830_create_articles.rb
|
213
|
+
- spec/dummy/Rakefile
|
214
|
+
- spec/dummy/README.rdoc
|
215
|
+
- spec/dummy/public/favicon.ico
|
216
|
+
- spec/dummy/public/404.html
|
217
|
+
- spec/dummy/public/422.html
|
218
|
+
- spec/dummy/public/500.html
|
219
|
+
- spec/dummy/config/boot.rb
|
220
|
+
- spec/dummy/config/environments/development.rb
|
221
|
+
- spec/dummy/config/environments/production.rb
|
222
|
+
- spec/dummy/config/environments/test.rb
|
223
|
+
- spec/dummy/config/database.yml
|
224
|
+
- spec/dummy/config/locales/en.yml
|
225
|
+
- spec/dummy/config/routes.rb
|
226
|
+
- spec/dummy/config/initializers/inflections.rb
|
227
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
228
|
+
- spec/dummy/config/initializers/secret_token.rb
|
229
|
+
- spec/dummy/config/initializers/mime_types.rb
|
230
|
+
- spec/dummy/config/initializers/session_store.rb
|
231
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
232
|
+
- spec/dummy/config/application.rb
|
233
|
+
- spec/dummy/config/environment.rb
|
234
|
+
- spec/dummy/app/helpers/application_helper.rb
|
235
|
+
- spec/dummy/app/models/picture.rb
|
236
|
+
- spec/dummy/app/models/article.rb
|
237
|
+
- spec/dummy/app/models/asset.rb
|
238
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
239
|
+
- spec/dummy/app/uploaders/picture_uploader.rb
|
240
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
241
|
+
- spec/dummy/app/assets/javascripts/application.js
|
242
|
+
- spec/dummy/app/controllers/application_controller.rb
|
243
|
+
- spec/dummy/config.ru
|
244
|
+
- spec/factories/articles.rb
|
245
|
+
- spec/factories/files/rails.png
|
246
|
+
- spec/factories/assets.rb
|
247
|
+
- spec/requests/attachments_controller_spec.rb
|
248
|
+
- spec/spec_helper.rb
|
249
|
+
- spec/uploader_spec.rb
|
250
|
+
- spec/fileuploads_spec.rb
|
251
|
+
homepage: https://github.com/glebtv/rails-uploader
|
252
|
+
licenses: []
|
253
|
+
post_install_message:
|
254
|
+
rdoc_options: []
|
255
|
+
require_paths:
|
256
|
+
- lib
|
257
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
258
|
+
none: false
|
259
|
+
requirements:
|
260
|
+
- - ! '>='
|
261
|
+
- !ruby/object:Gem::Version
|
262
|
+
version: '0'
|
263
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
|
+
none: false
|
265
|
+
requirements:
|
266
|
+
- - ! '>='
|
267
|
+
- !ruby/object:Gem::Version
|
268
|
+
version: '0'
|
269
|
+
requirements: []
|
270
|
+
rubyforge_project: rails-uploader
|
271
|
+
rubygems_version: 1.8.22
|
272
|
+
signing_key:
|
273
|
+
specification_version: 3
|
274
|
+
summary: Rails file upload implementation with jQuery-File-Upload
|
275
|
+
test_files:
|
276
|
+
- spec/dummy/script/rails
|
277
|
+
- spec/dummy/db/migrate/20120508093416_create_assets.rb
|
278
|
+
- spec/dummy/db/migrate/20120508093830_create_articles.rb
|
279
|
+
- spec/dummy/Rakefile
|
280
|
+
- spec/dummy/README.rdoc
|
281
|
+
- spec/dummy/public/favicon.ico
|
282
|
+
- spec/dummy/public/404.html
|
283
|
+
- spec/dummy/public/422.html
|
284
|
+
- spec/dummy/public/500.html
|
285
|
+
- spec/dummy/config/boot.rb
|
286
|
+
- spec/dummy/config/environments/development.rb
|
287
|
+
- spec/dummy/config/environments/production.rb
|
288
|
+
- spec/dummy/config/environments/test.rb
|
289
|
+
- spec/dummy/config/database.yml
|
290
|
+
- spec/dummy/config/locales/en.yml
|
291
|
+
- spec/dummy/config/routes.rb
|
292
|
+
- spec/dummy/config/initializers/inflections.rb
|
293
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
294
|
+
- spec/dummy/config/initializers/secret_token.rb
|
295
|
+
- spec/dummy/config/initializers/mime_types.rb
|
296
|
+
- spec/dummy/config/initializers/session_store.rb
|
297
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
298
|
+
- spec/dummy/config/application.rb
|
299
|
+
- spec/dummy/config/environment.rb
|
300
|
+
- spec/dummy/app/helpers/application_helper.rb
|
301
|
+
- spec/dummy/app/models/picture.rb
|
302
|
+
- spec/dummy/app/models/article.rb
|
303
|
+
- spec/dummy/app/models/asset.rb
|
304
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
305
|
+
- spec/dummy/app/uploaders/picture_uploader.rb
|
306
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
307
|
+
- spec/dummy/app/assets/javascripts/application.js
|
308
|
+
- spec/dummy/app/controllers/application_controller.rb
|
309
|
+
- spec/dummy/config.ru
|
310
|
+
- spec/factories/articles.rb
|
311
|
+
- spec/factories/files/rails.png
|
312
|
+
- spec/factories/assets.rb
|
313
|
+
- spec/requests/attachments_controller_spec.rb
|
314
|
+
- spec/spec_helper.rb
|
315
|
+
- spec/uploader_spec.rb
|
316
|
+
- spec/fileuploads_spec.rb
|
317
|
+
has_rdoc:
|