Jcrop 0.1.0

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.
@@ -0,0 +1,372 @@
1
+ /*! Jcrop.css v2.0.4 - build: 20151117
2
+ * Copyright 2008-2015 Tapmodo Interactive LLC
3
+ * Free software under MIT License
4
+ **/
5
+
6
+ /*
7
+ The outer-most container in a typical Jcrop instance
8
+ If you are having difficulty with formatting related to styles
9
+ on a parent element, place any fixes here or in a like selector
10
+
11
+ You can also style this element if you want to add a border, etc
12
+ A better method for styling can be seen below with .jcrop-light
13
+ (Add a class to the holder and style elements for that extended class)
14
+ */
15
+ .jcrop-active {
16
+ direction: ltr;
17
+ text-align: left;
18
+ box-sizing: border-box;
19
+ /* IE10 touch compatibility */
20
+ -ms-touch-action: none;
21
+ }
22
+ .jcrop-dragging {
23
+ -moz-user-select: none;
24
+ -webkit-user-select: none;
25
+ -ms-user-select: none;
26
+ user-select: none;
27
+ }
28
+ .jcrop-selection {
29
+ z-index: 2;
30
+ }
31
+ .jcrop-selection.jcrop-current {
32
+ z-index: 4;
33
+ }
34
+ /* Selection Borders */
35
+ .jcrop-border {
36
+ background: #ffffff url("<%= image_path('Jcrop/Jcrop.gif') %>");
37
+ line-height: 1px !important;
38
+ font-size: 0 !important;
39
+ overflow: hidden;
40
+ position: absolute;
41
+ filter: alpha(opacity=50) !important;
42
+ opacity: 0.5 !important;
43
+ }
44
+ .jcrop-border.ord-w,
45
+ .jcrop-border.ord-e,
46
+ .jcrop-border.ord-n {
47
+ top: 0px;
48
+ }
49
+ .jcrop-border.ord-n,
50
+ .jcrop-border.ord-s {
51
+ width: 100%;
52
+ height: 1px !important;
53
+ }
54
+ .jcrop-border.ord-w,
55
+ .jcrop-border.ord-e {
56
+ height: 100%;
57
+ width: 1px !important;
58
+ }
59
+ .jcrop-border.ord-e {
60
+ right: -1px;
61
+ }
62
+ .jcrop-border.ord-n {
63
+ top: -1px;
64
+ }
65
+ .jcrop-border.ord-w {
66
+ left: -1px;
67
+ }
68
+ .jcrop-border.ord-s {
69
+ bottom: -1px;
70
+ }
71
+ .jcrop-selection {
72
+ position: absolute;
73
+ }
74
+ .jcrop-box {
75
+ z-index: 2;
76
+ display: block;
77
+ background: none;
78
+ border: none;
79
+ padding: 0;
80
+ margin: 0;
81
+ font-size: 0;
82
+ }
83
+ .jcrop-box:hover {
84
+ background: none;
85
+ }
86
+ .jcrop-box:active {
87
+ background: none;
88
+ }
89
+ .jcrop-box:focus {
90
+ outline: 1px rgba(128, 128, 128, 0.65) dotted;
91
+ }
92
+ .jcrop-active,
93
+ .jcrop-box {
94
+ position: relative;
95
+ }
96
+ .jcrop-box {
97
+ width: 100%;
98
+ height: 100%;
99
+ cursor: move;
100
+ }
101
+ /* Selection Handles */
102
+ .jcrop-handle {
103
+ z-index: 4;
104
+ background-color: rgba(49, 28, 28, 0.58);
105
+ border: 1px #eeeeee solid;
106
+ width: 9px;
107
+ height: 9px;
108
+ font-size: 0;
109
+ position: absolute;
110
+ filter: alpha(opacity=80) !important;
111
+ opacity: 0.8 !important;
112
+ }
113
+ .jcrop-handle.ord-n {
114
+ left: 50%;
115
+ margin-left: -5px;
116
+ margin-top: -5px;
117
+ top: 0;
118
+ cursor: n-resize;
119
+ }
120
+ .jcrop-handle.ord-s {
121
+ bottom: 0;
122
+ left: 50%;
123
+ margin-bottom: -5px;
124
+ margin-left: -5px;
125
+ cursor: s-resize;
126
+ }
127
+ .jcrop-handle.ord-e {
128
+ margin-right: -5px;
129
+ margin-top: -5px;
130
+ right: 0;
131
+ top: 50%;
132
+ cursor: e-resize;
133
+ }
134
+ .jcrop-handle.ord-w {
135
+ left: 0;
136
+ margin-left: -5px;
137
+ margin-top: -5px;
138
+ top: 50%;
139
+ cursor: w-resize;
140
+ }
141
+ .jcrop-handle.ord-nw {
142
+ left: 0;
143
+ margin-left: -5px;
144
+ margin-top: -5px;
145
+ top: 0;
146
+ cursor: nw-resize;
147
+ }
148
+ .jcrop-handle.ord-ne {
149
+ margin-right: -5px;
150
+ margin-top: -5px;
151
+ right: 0;
152
+ top: 0;
153
+ cursor: ne-resize;
154
+ }
155
+ .jcrop-handle.ord-se {
156
+ bottom: 0;
157
+ margin-bottom: -5px;
158
+ margin-right: -5px;
159
+ right: 0;
160
+ cursor: se-resize;
161
+ }
162
+ .jcrop-handle.ord-sw {
163
+ bottom: 0;
164
+ left: 0;
165
+ margin-bottom: -5px;
166
+ margin-left: -5px;
167
+ cursor: sw-resize;
168
+ }
169
+ /* Larger Selection Handles for Touch */
170
+ .jcrop-touch .jcrop-handle {
171
+ z-index: 4;
172
+ background-color: rgba(49, 28, 28, 0.58);
173
+ border: 1px #eeeeee solid;
174
+ width: 18px;
175
+ height: 18px;
176
+ font-size: 0;
177
+ position: absolute;
178
+ filter: alpha(opacity=80) !important;
179
+ opacity: 0.8 !important;
180
+ }
181
+ .jcrop-touch .jcrop-handle.ord-n {
182
+ left: 50%;
183
+ margin-left: -10px;
184
+ margin-top: -10px;
185
+ top: 0;
186
+ cursor: n-resize;
187
+ }
188
+ .jcrop-touch .jcrop-handle.ord-s {
189
+ bottom: 0;
190
+ left: 50%;
191
+ margin-bottom: -10px;
192
+ margin-left: -10px;
193
+ cursor: s-resize;
194
+ }
195
+ .jcrop-touch .jcrop-handle.ord-e {
196
+ margin-right: -10px;
197
+ margin-top: -10px;
198
+ right: 0;
199
+ top: 50%;
200
+ cursor: e-resize;
201
+ }
202
+ .jcrop-touch .jcrop-handle.ord-w {
203
+ left: 0;
204
+ margin-left: -10px;
205
+ margin-top: -10px;
206
+ top: 50%;
207
+ cursor: w-resize;
208
+ }
209
+ .jcrop-touch .jcrop-handle.ord-nw {
210
+ left: 0;
211
+ margin-left: -10px;
212
+ margin-top: -10px;
213
+ top: 0;
214
+ cursor: nw-resize;
215
+ }
216
+ .jcrop-touch .jcrop-handle.ord-ne {
217
+ margin-right: -10px;
218
+ margin-top: -10px;
219
+ right: 0;
220
+ top: 0;
221
+ cursor: ne-resize;
222
+ }
223
+ .jcrop-touch .jcrop-handle.ord-se {
224
+ bottom: 0;
225
+ margin-bottom: -10px;
226
+ margin-right: -10px;
227
+ right: 0;
228
+ cursor: se-resize;
229
+ }
230
+ .jcrop-touch .jcrop-handle.ord-sw {
231
+ bottom: 0;
232
+ left: 0;
233
+ margin-bottom: -10px;
234
+ margin-left: -10px;
235
+ cursor: sw-resize;
236
+ }
237
+ /* Selection Dragbars */
238
+ .jcrop-dragbar {
239
+ font-size: 0;
240
+ position: absolute;
241
+ }
242
+ .jcrop-dragbar.ord-n,
243
+ .jcrop-dragbar.ord-s {
244
+ height: 9px !important;
245
+ width: 100%;
246
+ }
247
+ .jcrop-dragbar.ord-e,
248
+ .jcrop-dragbar.ord-w {
249
+ top: 0px;
250
+ height: 100%;
251
+ width: 9px !important;
252
+ }
253
+ .jcrop-dragbar.ord-n {
254
+ margin-top: -5px;
255
+ cursor: n-resize;
256
+ top: 0px;
257
+ }
258
+ .jcrop-dragbar.ord-s {
259
+ bottom: 0;
260
+ margin-bottom: -5px;
261
+ cursor: s-resize;
262
+ }
263
+ .jcrop-dragbar.ord-e {
264
+ margin-right: -5px;
265
+ right: 0;
266
+ cursor: e-resize;
267
+ }
268
+ .jcrop-dragbar.ord-w {
269
+ margin-left: -5px;
270
+ cursor: w-resize;
271
+ }
272
+ /* Shading panels */
273
+ .jcrop-shades {
274
+ position: relative;
275
+ top: 0;
276
+ left: 0;
277
+ }
278
+ .jcrop-shades div {
279
+ cursor: crosshair;
280
+ }
281
+ /* Various special states */
282
+ .jcrop-noresize .jcrop-dragbar,
283
+ .jcrop-noresize .jcrop-handle {
284
+ display: none;
285
+ }
286
+ .jcrop-selection.jcrop-nodrag .jcrop-box,
287
+ .jcrop-nodrag .jcrop-shades div {
288
+ cursor: default;
289
+ }
290
+ /* The "jcrop-light" class/extension */
291
+ .jcrop-light .jcrop-border {
292
+ background: #ffffff;
293
+ filter: alpha(opacity=70) !important;
294
+ opacity: .70!important;
295
+ }
296
+ .jcrop-light .jcrop-handle {
297
+ background-color: #000000;
298
+ border-color: #ffffff;
299
+ }
300
+ /* The "jcrop-dark" class/extension */
301
+ .jcrop-dark .jcrop-border {
302
+ background: #000000;
303
+ filter: alpha(opacity=70) !important;
304
+ opacity: 0.7 !important;
305
+ }
306
+ .jcrop-dark .jcrop-handle {
307
+ background-color: #ffffff;
308
+ border-color: #000000;
309
+ }
310
+ /* Simple macro to turn off the antlines */
311
+ .solid-line .jcrop-border {
312
+ background: #ffffff;
313
+ }
314
+ .jcrop-thumb {
315
+ position: absolute;
316
+ overflow: hidden;
317
+ z-index: 5;
318
+ }
319
+ /* Fix for twitter bootstrap et al. */
320
+ .jcrop-active img,
321
+ .jcrop-thumb img,
322
+ .jcrop-thumb canvas {
323
+ min-width: none;
324
+ min-height: none;
325
+ max-width: none;
326
+ max-height: none;
327
+ }
328
+ /* Improved multiple selection styles - in progress */
329
+ .jcrop-hl-active .jcrop-border {
330
+ filter: alpha(opacity=20) !important;
331
+ opacity: .20!important;
332
+ }
333
+ .jcrop-hl-active .jcrop-handle {
334
+ filter: alpha(opacity=10) !important;
335
+ opacity: .10!important;
336
+ }
337
+ .jcrop-hl-active .jcrop-selection:hover {
338
+ /*
339
+ .jcrop-handle {
340
+ filter:Alpha(opacity=35)!important;
341
+ opacity:.35!important;
342
+ }
343
+ */
344
+
345
+ }
346
+ .jcrop-hl-active .jcrop-selection:hover .jcrop-border {
347
+ background-color: #ccc;
348
+ filter: alpha(opacity=50) !important;
349
+ opacity: .50!important;
350
+ }
351
+ .jcrop-hl-active .jcrop-selection.jcrop-current .jcrop-border {
352
+ background: #808080 url('<%= image_path('Jcrop/Jcrop.gif') %>');
353
+ opacity: .35!important;
354
+ filter: alpha(opacity=35) !important;
355
+ }
356
+ .jcrop-hl-active .jcrop-selection.jcrop-current .jcrop-handle {
357
+ filter: alpha(opacity=30) !important;
358
+ opacity: .30!important;
359
+ }
360
+ .jcrop-hl-active .jcrop-selection.jcrop-focus .jcrop-border {
361
+ background: url('<%= image_path('Jcrop/Jcrop.gif') %>');
362
+ opacity: .65!important;
363
+ filter: alpha(opacity=65) !important;
364
+ }
365
+ .jcrop-hl-active .jcrop-selection.jcrop-focus .jcrop-handle {
366
+ filter: alpha(opacity=60) !important;
367
+ opacity: .60!important;
368
+ }
369
+ /* Prevent background on button element */
370
+ button.jcrop-box {
371
+ background: none;
372
+ }
data/lib/Jcrop.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "Jcrop/version"
2
+ require "Jcrop/engine"
3
+
4
+ module Jcrop
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,4 @@
1
+ module Jcrop
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module Jcrop
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: Jcrop
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Pouya Gharib Pour
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: A gem for adding Jcrop library to your Rails project.
42
+ email:
43
+ - p.gharibpour@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - Jcrop.gemspec
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - app/assets/images/Jcrop/Jcrop.gif
55
+ - app/assets/javascripts/Jcrop.js
56
+ - app/assets/stylesheets/Jcrop.css.erb
57
+ - lib/Jcrop.rb
58
+ - lib/Jcrop/engine.rb
59
+ - lib/Jcrop/version.rb
60
+ homepage: https://github.com/psparabara/Jcrop
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.5.1
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Jcrop library.
84
+ test_files: []