simple_strap_file 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/app/inputs/file_input.rb +4 -3
- data/lib/simple_strap_file/version.rb +1 -1
- data/simple_strap_file.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f457f7cda35f4b6caeb6a9ba1cb308cc8c9f9bef
|
|
4
|
+
data.tar.gz: 895a765ad9623fc84d30a861ab7b8bd15a5dcfaa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b714a95dc6268b50bbd119503fa78d78f8957be816098b9895d22a9f5cc83cded4be5596695a8df2b7417838f1618a47209dc9f289a56758c38d1f4f0967b76
|
|
7
|
+
data.tar.gz: 3225469d1ef8430c8a538b7c9668e32c711c9614a562447e189ea7f02e2038c4e9b314987e8716f9107977320356aac93267bd2a79c904544a6209787cad787a
|
data/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
[](http://badge.fury.io/rb/simple_strap_file)
|
|
2
2
|
|
|
3
|
+
# SimpleStrapFile
|
|
3
4
|
[Simple Form](https://github.com/plataformatec/simple_form) component that provides a pretty file input using [Twitter Bootstrap](http://getbootstrap.com/) for styling.
|
|
4
5
|
|
|
5
6
|
> Based on ['Whipping File Inputs Into Shape with Bootstrap 3'](http://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3/) by [Cory LaViska](https://twitter.com/claviska).
|
data/app/inputs/file_input.rb
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
class FileInput < SimpleForm::Inputs::FileInput
|
|
2
2
|
# http://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3/
|
|
3
3
|
def input(wrapper_options=nil)
|
|
4
|
-
|
|
4
|
+
merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
|
|
5
|
+
template.content_tag(:div, class: 'input-group') do
|
|
5
6
|
(template.content_tag(:span, class: 'input-group-btn') do
|
|
6
7
|
template.content_tag(:span, class: 'btn btn-primary btn-file') do
|
|
7
|
-
@builder.file_field(attribute_name) + raw('Browse…')
|
|
8
|
+
@builder.file_field(attribute_name, merged_input_options) + raw('Browse…')
|
|
8
9
|
end
|
|
9
10
|
end) +
|
|
10
|
-
template.tag(:input, class: 'form-control', type: 'text'
|
|
11
|
+
template.tag(:input, input_html_options.merge({class: 'form-control', type: 'text'}))
|
|
11
12
|
end
|
|
12
13
|
end
|
|
13
14
|
end
|
data/simple_strap_file.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.email = ["mike.c.cowan@gmail.com"]
|
|
11
11
|
|
|
12
12
|
spec.summary = "Simple Form component that provides a pretty file input using Bootstrap"
|
|
13
|
-
spec.description = "Brings
|
|
13
|
+
spec.description = "Brings Simple Form file inputs in line with the other Bootstrap themed fields"
|
|
14
14
|
spec.homepage = "https://github.com/michaelcowan/simple-strap-file"
|
|
15
15
|
spec.license = "MIT"
|
|
16
16
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_strap_file
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Cowan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-02-
|
|
11
|
+
date: 2015-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -52,7 +52,8 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.1'
|
|
55
|
-
description: Brings
|
|
55
|
+
description: Brings Simple Form file inputs in line with the other Bootstrap themed
|
|
56
|
+
fields
|
|
56
57
|
email:
|
|
57
58
|
- mike.c.cowan@gmail.com
|
|
58
59
|
executables: []
|