instant-upload 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 077b3903b3d208cae9fe226e5bd30c3098a54ce8
4
- data.tar.gz: be70494337c3ae874bd1e96237dcbf24c7292006
3
+ metadata.gz: 1e0b8cdbafc7b0c1665369fbb7461e3f9285eeaa
4
+ data.tar.gz: a6ead04a85486223dc677be25e972564cdeb287c
5
5
  SHA512:
6
- metadata.gz: 8e908d3cf67c3f9d5942d9278e1e8286f31b001f488e2949a4e283f0f46b7bd215e07433b014d4de784713034d72c4a35c45ef1bdaf1fd7c554b582ab1c1cca5
7
- data.tar.gz: 0e80b9bfbe5672dca2f737cb04d7a2b9f49904a5df32b4ddcb2707a7e4457a46ebbe2535e2973915614bbac5c8594700a7670a86da04958d33607b69f16a608d
6
+ metadata.gz: 794c2dcf440f64aa0f3ce2747a3bd5beaee55691b60464590b15423d4c36dd793835c7c798910372dc250e1e64f7fbcd5ed98670f99cefada5de3aa8ba4d1e66
7
+ data.tar.gz: c8534e139c6ff0d676f926046ee240c164404800f32e135aa232624132af0ccd6d550eac33d8b54a8748674cbdec9addca52b98765bad75d2162c783964e3327
@@ -21,9 +21,10 @@
21
21
  $fileInput = $uploader.find('input[type="file"]')
22
22
  $fileInput.bind 'change', @drop
23
23
 
24
- $uploader.find('.iu-simple-select').show 0, ->
24
+ $uploader.find('.iu-simple-select').show 0, =>
25
25
  $selectFiles = $uploader.find('.iu-simple-select-files')
26
- offset = $selectFiles.position()
26
+ offset = @element.position()
27
+ $image = $uploader.find('.iu-simple-image')
27
28
 
28
29
  $fileInput.css
29
30
  opacity: 0
@@ -31,13 +32,15 @@
31
32
  position: 'absolute'
32
33
  left: offset.left
33
34
  top: offset.top
34
- width: $selectFiles.width() + 10
35
- height: $selectFiles.height() + 10
36
- 'margin-left': -5
37
- 'margin-top': -25
38
- 'z-index': 2
35
+ width: $image.width()
36
+ height: 1
39
37
  '-ms-filter': '"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"'
40
38
  'filter': 'alpha(opacity=0)'
39
+ 'z-index': 2
40
+
41
+ $selectFiles.on 'click', (e) ->
42
+ e.preventDefault()
43
+ $fileInput.click()
41
44
 
42
45
  @fileinput = $fileInput
43
46
 
@@ -1,3 +1,3 @@
1
1
  module InstantUpload
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instant-upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mariusz Ołownia