paper_cropper 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +127 -0
- data/lib/assets/javascripts/paper_cropper.js +149 -0
- data/lib/assets/stylesheets/paper_cropper.css +7 -0
- data/lib/paper_cropper/engine.rb +4 -0
- data/lib/paper_cropper/helpers.rb +66 -0
- data/lib/paper_cropper/logger.rb +6 -0
- data/lib/paper_cropper/model_extension.rb +129 -0
- data/lib/paper_cropper/reg_exp.rb +6 -0
- data/lib/paper_cropper/schema.rb +76 -0
- data/lib/paper_cropper/version.rb +12 -0
- data/lib/paper_cropper.rb +7 -0
- data/lib/paperclip_processors/paper_cropper.rb +31 -0
- data/vendor/assets/images/Jcrop.gif +0 -0
- data/vendor/assets/javascripts/cropper.js +3556 -0
- data/vendor/assets/stylesheets/cropper.css +357 -0
- metadata +102 -0
@@ -0,0 +1,357 @@
|
|
1
|
+
/*!
|
2
|
+
* Cropper.js v0.7.2
|
3
|
+
* https://github.com/fengyuanchen/cropperjs
|
4
|
+
*
|
5
|
+
* Copyright (c) 2015-2016 Fengyuan Chen
|
6
|
+
* Released under the MIT license
|
7
|
+
*
|
8
|
+
* Date: 2016-06-08T12:25:05.932Z
|
9
|
+
*/
|
10
|
+
.cropper-container {
|
11
|
+
font-size: 0;
|
12
|
+
line-height: 0;
|
13
|
+
|
14
|
+
position: relative;
|
15
|
+
|
16
|
+
-ms-user-select: none;
|
17
|
+
user-select: none;
|
18
|
+
|
19
|
+
direction: ltr !important;
|
20
|
+
-ms-touch-action: none;
|
21
|
+
touch-action: none;
|
22
|
+
-webkit-tap-highlight-color: transparent;
|
23
|
+
-webkit-touch-callout: none;
|
24
|
+
}
|
25
|
+
|
26
|
+
.cropper-container img {
|
27
|
+
display: block;
|
28
|
+
|
29
|
+
width: 100%;
|
30
|
+
min-width: 0 !important;
|
31
|
+
max-width: none !important;
|
32
|
+
height: 100%;
|
33
|
+
min-height: 0 !important;
|
34
|
+
max-height: none !important;
|
35
|
+
|
36
|
+
image-orientation: 0deg !important;
|
37
|
+
}
|
38
|
+
|
39
|
+
.cropper-wrap-box,
|
40
|
+
.cropper-canvas,
|
41
|
+
.cropper-drag-box,
|
42
|
+
.cropper-crop-box,
|
43
|
+
.cropper-modal {
|
44
|
+
position: absolute;
|
45
|
+
top: 0;
|
46
|
+
right: 0;
|
47
|
+
bottom: 0;
|
48
|
+
left: 0;
|
49
|
+
}
|
50
|
+
|
51
|
+
.cropper-wrap-box {
|
52
|
+
overflow: hidden;
|
53
|
+
}
|
54
|
+
|
55
|
+
.cropper-drag-box {
|
56
|
+
opacity: 0;
|
57
|
+
background-color: #fff;
|
58
|
+
}
|
59
|
+
|
60
|
+
.cropper-modal {
|
61
|
+
opacity: .5;
|
62
|
+
background-color: #000;
|
63
|
+
}
|
64
|
+
|
65
|
+
.cropper-view-box {
|
66
|
+
display: block;
|
67
|
+
overflow: hidden;
|
68
|
+
|
69
|
+
width: 100%;
|
70
|
+
height: 100%;
|
71
|
+
|
72
|
+
outline: 1px solid #39f;
|
73
|
+
outline-color: rgba(51, 153, 255, .75);
|
74
|
+
}
|
75
|
+
|
76
|
+
.cropper-dashed {
|
77
|
+
position: absolute;
|
78
|
+
|
79
|
+
display: block;
|
80
|
+
|
81
|
+
opacity: .5;
|
82
|
+
border: 0 dashed #eee;
|
83
|
+
}
|
84
|
+
|
85
|
+
.cropper-dashed.dashed-h {
|
86
|
+
top: 33.33333%;
|
87
|
+
left: 0;
|
88
|
+
|
89
|
+
width: 100%;
|
90
|
+
height: 33.33333%;
|
91
|
+
|
92
|
+
border-top-width: 1px;
|
93
|
+
border-bottom-width: 1px;
|
94
|
+
}
|
95
|
+
|
96
|
+
.cropper-dashed.dashed-v {
|
97
|
+
top: 0;
|
98
|
+
left: 33.33333%;
|
99
|
+
|
100
|
+
width: 33.33333%;
|
101
|
+
height: 100%;
|
102
|
+
|
103
|
+
border-right-width: 1px;
|
104
|
+
border-left-width: 1px;
|
105
|
+
}
|
106
|
+
|
107
|
+
.cropper-center {
|
108
|
+
position: absolute;
|
109
|
+
top: 50%;
|
110
|
+
left: 50%;
|
111
|
+
|
112
|
+
display: block;
|
113
|
+
|
114
|
+
width: 0;
|
115
|
+
height: 0;
|
116
|
+
|
117
|
+
opacity: .75;
|
118
|
+
}
|
119
|
+
|
120
|
+
.cropper-center:before,
|
121
|
+
.cropper-center:after {
|
122
|
+
position: absolute;
|
123
|
+
|
124
|
+
display: block;
|
125
|
+
|
126
|
+
content: ' ';
|
127
|
+
|
128
|
+
background-color: #eee;
|
129
|
+
}
|
130
|
+
|
131
|
+
.cropper-center:before {
|
132
|
+
top: 0;
|
133
|
+
left: -3px;
|
134
|
+
|
135
|
+
width: 7px;
|
136
|
+
height: 1px;
|
137
|
+
}
|
138
|
+
|
139
|
+
.cropper-center:after {
|
140
|
+
top: -3px;
|
141
|
+
left: 0;
|
142
|
+
|
143
|
+
width: 1px;
|
144
|
+
height: 7px;
|
145
|
+
}
|
146
|
+
|
147
|
+
.cropper-face,
|
148
|
+
.cropper-line,
|
149
|
+
.cropper-point {
|
150
|
+
position: absolute;
|
151
|
+
|
152
|
+
display: block;
|
153
|
+
|
154
|
+
width: 100%;
|
155
|
+
height: 100%;
|
156
|
+
|
157
|
+
opacity: .1;
|
158
|
+
}
|
159
|
+
|
160
|
+
.cropper-face {
|
161
|
+
top: 0;
|
162
|
+
left: 0;
|
163
|
+
|
164
|
+
background-color: #fff;
|
165
|
+
}
|
166
|
+
|
167
|
+
.cropper-line {
|
168
|
+
background-color: #39f;
|
169
|
+
}
|
170
|
+
|
171
|
+
.cropper-line.line-e {
|
172
|
+
top: 0;
|
173
|
+
right: -3px;
|
174
|
+
|
175
|
+
width: 5px;
|
176
|
+
|
177
|
+
cursor: e-resize;
|
178
|
+
}
|
179
|
+
|
180
|
+
.cropper-line.line-n {
|
181
|
+
top: -3px;
|
182
|
+
left: 0;
|
183
|
+
|
184
|
+
height: 5px;
|
185
|
+
|
186
|
+
cursor: n-resize;
|
187
|
+
}
|
188
|
+
|
189
|
+
.cropper-line.line-w {
|
190
|
+
top: 0;
|
191
|
+
left: -3px;
|
192
|
+
|
193
|
+
width: 5px;
|
194
|
+
|
195
|
+
cursor: w-resize;
|
196
|
+
}
|
197
|
+
|
198
|
+
.cropper-line.line-s {
|
199
|
+
bottom: -3px;
|
200
|
+
left: 0;
|
201
|
+
|
202
|
+
height: 5px;
|
203
|
+
|
204
|
+
cursor: s-resize;
|
205
|
+
}
|
206
|
+
|
207
|
+
.cropper-point {
|
208
|
+
width: 5px;
|
209
|
+
height: 5px;
|
210
|
+
|
211
|
+
opacity: .75;
|
212
|
+
background-color: #39f;
|
213
|
+
}
|
214
|
+
|
215
|
+
.cropper-point.point-e {
|
216
|
+
top: 50%;
|
217
|
+
right: -3px;
|
218
|
+
|
219
|
+
margin-top: -3px;
|
220
|
+
|
221
|
+
cursor: e-resize;
|
222
|
+
}
|
223
|
+
|
224
|
+
.cropper-point.point-n {
|
225
|
+
top: -3px;
|
226
|
+
left: 50%;
|
227
|
+
|
228
|
+
margin-left: -3px;
|
229
|
+
|
230
|
+
cursor: n-resize;
|
231
|
+
}
|
232
|
+
|
233
|
+
.cropper-point.point-w {
|
234
|
+
top: 50%;
|
235
|
+
left: -3px;
|
236
|
+
|
237
|
+
margin-top: -3px;
|
238
|
+
|
239
|
+
cursor: w-resize;
|
240
|
+
}
|
241
|
+
|
242
|
+
.cropper-point.point-s {
|
243
|
+
bottom: -3px;
|
244
|
+
left: 50%;
|
245
|
+
|
246
|
+
margin-left: -3px;
|
247
|
+
|
248
|
+
cursor: s-resize;
|
249
|
+
}
|
250
|
+
|
251
|
+
.cropper-point.point-ne {
|
252
|
+
top: -3px;
|
253
|
+
right: -3px;
|
254
|
+
|
255
|
+
cursor: ne-resize;
|
256
|
+
}
|
257
|
+
|
258
|
+
.cropper-point.point-nw {
|
259
|
+
top: -3px;
|
260
|
+
left: -3px;
|
261
|
+
|
262
|
+
cursor: nw-resize;
|
263
|
+
}
|
264
|
+
|
265
|
+
.cropper-point.point-sw {
|
266
|
+
bottom: -3px;
|
267
|
+
left: -3px;
|
268
|
+
|
269
|
+
cursor: sw-resize;
|
270
|
+
}
|
271
|
+
|
272
|
+
.cropper-point.point-se {
|
273
|
+
right: -3px;
|
274
|
+
bottom: -3px;
|
275
|
+
|
276
|
+
width: 20px;
|
277
|
+
height: 20px;
|
278
|
+
|
279
|
+
cursor: se-resize;
|
280
|
+
|
281
|
+
opacity: 1;
|
282
|
+
}
|
283
|
+
|
284
|
+
.cropper-point.point-se:before {
|
285
|
+
position: absolute;
|
286
|
+
right: -50%;
|
287
|
+
bottom: -50%;
|
288
|
+
|
289
|
+
display: block;
|
290
|
+
|
291
|
+
width: 200%;
|
292
|
+
height: 200%;
|
293
|
+
|
294
|
+
content: ' ';
|
295
|
+
|
296
|
+
opacity: 0;
|
297
|
+
background-color: #39f;
|
298
|
+
}
|
299
|
+
|
300
|
+
@media (min-width: 768px) {
|
301
|
+
.cropper-point.point-se {
|
302
|
+
width: 15px;
|
303
|
+
height: 15px;
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
307
|
+
@media (min-width: 992px) {
|
308
|
+
.cropper-point.point-se {
|
309
|
+
width: 10px;
|
310
|
+
height: 10px;
|
311
|
+
}
|
312
|
+
}
|
313
|
+
|
314
|
+
@media (min-width: 1200px) {
|
315
|
+
.cropper-point.point-se {
|
316
|
+
width: 5px;
|
317
|
+
height: 5px;
|
318
|
+
|
319
|
+
opacity: .75;
|
320
|
+
}
|
321
|
+
}
|
322
|
+
|
323
|
+
.cropper-invisible {
|
324
|
+
opacity: 0;
|
325
|
+
}
|
326
|
+
|
327
|
+
.cropper-bg {
|
328
|
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
|
329
|
+
}
|
330
|
+
|
331
|
+
.cropper-hide {
|
332
|
+
position: absolute;
|
333
|
+
|
334
|
+
display: block;
|
335
|
+
|
336
|
+
width: 0;
|
337
|
+
height: 0;
|
338
|
+
}
|
339
|
+
|
340
|
+
.cropper-hidden {
|
341
|
+
display: none !important;
|
342
|
+
}
|
343
|
+
|
344
|
+
.cropper-move {
|
345
|
+
cursor: move;
|
346
|
+
}
|
347
|
+
|
348
|
+
.cropper-crop {
|
349
|
+
cursor: crosshair;
|
350
|
+
}
|
351
|
+
|
352
|
+
.cropper-disabled .cropper-drag-box,
|
353
|
+
.cropper-disabled .cropper-face,
|
354
|
+
.cropper-disabled .cropper-line,
|
355
|
+
.cropper-disabled .cropper-point {
|
356
|
+
cursor: not-allowed;
|
357
|
+
}
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: paper_cropper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Coditramuntana
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jquery-rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: paperclip
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
description: Integration with paperclip and cropper js for crop images and upload
|
56
|
+
it
|
57
|
+
email:
|
58
|
+
- info@coditramuntana.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- README.md
|
64
|
+
- lib/assets/javascripts/paper_cropper.js
|
65
|
+
- lib/assets/stylesheets/paper_cropper.css
|
66
|
+
- lib/paper_cropper.rb
|
67
|
+
- lib/paper_cropper/engine.rb
|
68
|
+
- lib/paper_cropper/helpers.rb
|
69
|
+
- lib/paper_cropper/logger.rb
|
70
|
+
- lib/paper_cropper/model_extension.rb
|
71
|
+
- lib/paper_cropper/reg_exp.rb
|
72
|
+
- lib/paper_cropper/schema.rb
|
73
|
+
- lib/paper_cropper/version.rb
|
74
|
+
- lib/paperclip_processors/paper_cropper.rb
|
75
|
+
- vendor/assets/images/Jcrop.gif
|
76
|
+
- vendor/assets/javascripts/cropper.js
|
77
|
+
- vendor/assets/stylesheets/cropper.css
|
78
|
+
homepage: https://gitlab.coditdev.net/gems/paper_cropper
|
79
|
+
licenses:
|
80
|
+
- MIT
|
81
|
+
metadata: {}
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubyforge_project:
|
98
|
+
rubygems_version: 2.5.1
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: Cropper js with paperclip integration
|
102
|
+
test_files: []
|