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: dc2b7f7947e4a4c7cc6e61f6484d4d7609208e14
4
- data.tar.gz: 52e933aa3b9b7e200f43e3b57245611c629a2af6
3
+ metadata.gz: 11596c6d69a1ed9a607ab7224e6515680270c7b4
4
+ data.tar.gz: db6aa20e13bda9c06c29d9e01fea676786e4b7ee
5
5
  SHA512:
6
- metadata.gz: 5be8ab22d8b8a17792e9f198f247f6a3701696705ba749759014cdc29e5d6409c65f56db038529d7d24e708ebe9a43769c366e67a3a3b52092d03069dddb4898
7
- data.tar.gz: c649790da71059f3e5347781aa5cf650069fc5ceace440255f9054c2d146a129da7e354c58d4ec37390f01fb6e6c77e22c55702f993e43c3a7a041c898d4073e
6
+ metadata.gz: 5a76e90d8992874962fe6d64b6d99964f206425fe9f6a0b7f5604ff4a26975550a390cb43f0c7bc5642595963ee7cc64db8099731e684bb406ee04a5f3907956
7
+ data.tar.gz: 35bef35c9c43343b544b8d1dc0d5189a18603d7a41cfbac54e7e3a281ba0a9bed39a71d037f5e70f8eea0b1f77d2f0567b09edb2fe9934e50796fbff297218a9
@@ -1,3 +1,3 @@
1
1
  module SimpleFormFileinput
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -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 btn-default ' + className + '"></a>').parent().prepend($('<span></span>').html(buttonWord));
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);
@@ -18,4 +18,4 @@
18
18
  $(document).ready(function(){
19
19
  $('input[type=file]').bootstrapFileInput();
20
20
  });
21
- })(jQuery);
21
+ })(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.7
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-08-31 00:00:00.000000000 Z
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.2.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