simple_form_fileinput 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/lib/generators/simple_form_fileinput/install/install_generator.rb +3 -0
- data/lib/generators/simple_form_fileinput/install/templates/simple_form_fileinput.rb +0 -0
- data/lib/simple_form_fileinput/version.rb +1 -1
- data/lib/simple_form_fileinput.rb +0 -0
- data/simple_form_fileinput.gemspec +0 -0
- data/vendor/assets/javascripts/simple_form_fileinput/bootstrap.file-input.js +0 -0
- data/vendor/assets/javascripts/simple_form_fileinput/enhancements.js.coffee +22 -12
- data/vendor/assets/javascripts/simple_form_fileinput/init.js +0 -0
- data/vendor/assets/stylesheets/simple_form_fileinput/enhancements.css.scss +10 -0
- data/vendor/assets/stylesheets/simple_form_fileinput/init.css +12 -0
- metadata +15 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3ecb1963ec1856c09aac1d36963f27654eeab5b
|
4
|
+
data.tar.gz: 5b152a87c0fa0ec6775446a4867e8c5e2cb9e3f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fc95738fa40fcdd5686516a16497c52d181b3bddd43badec5b6f3502c6fe4ff81c87a90584f91d85701776f8609d6ace4f6c2cc53e856744aff3e09ea8bca06
|
7
|
+
data.tar.gz: 28b651196be3a0931f5223dd84e211e60fe04404539e94aa23adfe75dc017dedaf0c8c9f71b8381cea4e9f9ef93d094623c634f9796ceaf0788e0cf30602f5d8
|
data/.gitignore
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
@@ -14,6 +14,9 @@ module SimpleFormFileinput
|
|
14
14
|
inject_into_file 'app/assets/javascripts/application.js', :before => '//= require_tree .' do
|
15
15
|
"//= require simple_form_fileinput/init\n"
|
16
16
|
end
|
17
|
+
inject_into_file 'app/assets/stylesheets/application.css', :before => ' *= require_self' do
|
18
|
+
" *= require simple_form_fileinput/enhancements\n"
|
19
|
+
end
|
17
20
|
end
|
18
21
|
|
19
22
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,14 +1,24 @@
|
|
1
1
|
$ ->
|
2
|
+
# The plugin code
|
3
|
+
$.fn.draghover = (options)->
|
4
|
+
@each ->
|
5
|
+
collection = $()
|
6
|
+
self = $(@)
|
7
|
+
self.on "dragenter", (e)->
|
8
|
+
self.trigger "draghoverstart" if collection.length is 0
|
9
|
+
collection = collection.add(e.target)
|
10
|
+
self.on "dragleave drop", (e)->
|
11
|
+
collection = collection.not(e.target)
|
12
|
+
self.trigger "draghoverend" if collection.length is 0
|
13
|
+
|
2
14
|
$(document).ready ->
|
3
|
-
$(
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
console.log e
|
14
|
-
$(@).removeClass('file-hovering')
|
15
|
+
$(window).draghover().on
|
16
|
+
draghoverstart: ->
|
17
|
+
$('.file-input-wrapper').addClass('file-in-window')
|
18
|
+
draghoverend: ->
|
19
|
+
$('.file-input-wrapper').removeClass('file-in-window')
|
20
|
+
$('.file-input-wrapper input[type=file]').draghover().on
|
21
|
+
draghoverstart: ->
|
22
|
+
$(@).parent().addClass('file-hovering')
|
23
|
+
draghoverend: ->
|
24
|
+
$(@).parent().removeClass('file-hovering')
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_tree ./simple_form_fileinput/enhancements
|
12
|
+
*= require_self
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_fileinput
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- smit1625
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: railties
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simple_form
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Beautifies the default file input for SimpleForm
|
@@ -73,7 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
77
77
|
- Gemfile
|
78
78
|
- LICENSE.txt
|
79
79
|
- README.md
|
@@ -86,6 +86,8 @@ files:
|
|
86
86
|
- vendor/assets/javascripts/simple_form_fileinput/bootstrap.file-input.js
|
87
87
|
- vendor/assets/javascripts/simple_form_fileinput/enhancements.js.coffee
|
88
88
|
- vendor/assets/javascripts/simple_form_fileinput/init.js
|
89
|
+
- vendor/assets/stylesheets/simple_form_fileinput/enhancements.css.scss
|
90
|
+
- vendor/assets/stylesheets/simple_form_fileinput/init.css
|
89
91
|
homepage: ''
|
90
92
|
licenses:
|
91
93
|
- MIT
|
@@ -96,12 +98,12 @@ require_paths:
|
|
96
98
|
- lib
|
97
99
|
required_ruby_version: !ruby/object:Gem::Requirement
|
98
100
|
requirements:
|
99
|
-
- -
|
101
|
+
- - ">="
|
100
102
|
- !ruby/object:Gem::Version
|
101
103
|
version: '0'
|
102
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
105
|
requirements:
|
104
|
-
- -
|
106
|
+
- - ">="
|
105
107
|
- !ruby/object:Gem::Version
|
106
108
|
version: '0'
|
107
109
|
requirements: []
|