simple_form_fileinput 0.0.7 → 0.0.8
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11596c6d69a1ed9a607ab7224e6515680270c7b4
|
4
|
+
data.tar.gz: db6aa20e13bda9c06c29d9e01fea676786e4b7ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a76e90d8992874962fe6d64b6d99964f206425fe9f6a0b7f5604ff4a26975550a390cb43f0c7bc5642595963ee7cc64db8099731e684bb406ee04a5f3907956
|
7
|
+
data.tar.gz: 35bef35c9c43343b544b8d1dc0d5189a18603d7a41cfbac54e7e3a281ba0a9bed39a71d037f5e70f8eea0b1f77d2f0567b09edb2fe9934e50796fbff297218a9
|
@@ -35,10 +35,15 @@
|
|
35
35
|
if (!!$elem.attr('class')) {
|
36
36
|
className = ' ' + $elem.attr('class');
|
37
37
|
}
|
38
|
+
// Maybe some fields don't need to be standardized.
|
39
|
+
if (typeof $elem.attr('data-bfi-class') != 'undefined') {
|
40
|
+
className += ' ' + $elem.data('bfi-class');
|
41
|
+
}
|
42
|
+
if (className.length == 0) className = 'btn-default';
|
38
43
|
|
39
44
|
// Now we're going to wrap that input field with a Bootstrap button.
|
40
45
|
// The input will actually still be there, it will just be float above and transparent (done with the CSS).
|
41
|
-
$elem.wrap('<a class="file-input-wrapper btn
|
46
|
+
$elem.wrap('<a class="file-input-wrapper btn ' + className + '"></a>').parent().prepend($('<span></span>').html(buttonWord));
|
42
47
|
})
|
43
48
|
|
44
49
|
// After we have found all of the file inputs let's apply a listener for tracking the mouse movement.
|
@@ -126,4 +131,4 @@
|
|
126
131
|
'</style>';
|
127
132
|
$('link[rel=stylesheet]').eq(0).before(cssHtml);
|
128
133
|
|
129
|
-
})(jQuery);
|
134
|
+
})(jQuery);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- smit1625
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.4.5.1
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Uses bootstrap-fileinput to enhance SimpleForm's default datetime input
|