simple_form_extension 1.4.6 → 1.4.7

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: 05bd0458464d5c686a94a23e4786edb71fd5bcff
4
- data.tar.gz: d3510e286cbb66ba4aca5de9160c3eb7862ec5c6
3
+ metadata.gz: 3e5e51f5082cd9c76b6a1faffbc5cd674855d3bd
4
+ data.tar.gz: 253c55335c463f3ae34968c92e055454bb7249a6
5
5
  SHA512:
6
- metadata.gz: 73716c243d7050dec75ebab88e86316233d722f07e65756a32a97bfdbed9024d21e2e14da04d6ef4cdfa4ac085dac03028032bad4741f152deec84b78a1278bb
7
- data.tar.gz: 11395f602aea0d79887c06180f6487d21f515fbac12479ad6c3aecde3825f1900486ade9545cdf9e30725fbb092c27e7e807b5ef0e915707f9e01e4f2da55321
6
+ metadata.gz: 690963d83d6723faa9fec6a57379a2f3100e69f9be0f4fa1a885bba7d671a0be2a6e0b29372ac3df1c80a5dddd7111b583ed27b90ccb534053d1eada0d92425c
7
+ data.tar.gz: 55f10f38d9ec42b41c9f25e6efbdd5f680e6276a5354b6914cfa3e1f6c3a4cb436b7b86db6bcfb1748f8e0f17b956dd2673a50447663e8cb03919a857c81e05b
@@ -5,7 +5,7 @@ module SimpleFormExtension
5
5
  input_html_options[:class] << 'form-control'
6
6
 
7
7
  input_html_options[:data] ||= {}
8
- input_html_options[:data][:slider] = true
8
+ input_html_options[:data][:'simple-form-slider'] = true
9
9
 
10
10
  [:min, :max, :step, :orientation, :range, :value].each do |key|
11
11
  if options.key?(key)
@@ -1,3 +1,3 @@
1
1
  module SimpleFormExtension
2
- VERSION = "1.4.6"
2
+ VERSION = "1.4.7"
3
3
  end
@@ -1,7 +1,10 @@
1
1
  class Slider
2
2
  constructor: (@$el) ->
3
- values = @$el.data('slider-value').split(',')
4
- value = if values.length <= 1 then value[0] else (parseInt(value, 10) for value in values)
3
+ value = if (values = @$el.data('slider-value')?.split(','))
4
+ if values.length <= 1
5
+ value[0]
6
+ else
7
+ (parseInt(value, 10) for value in values)
5
8
 
6
9
  if @$el.bootstrapSlider
7
10
  @$el.bootstrapSlider(value: value)
@@ -16,4 +19,4 @@ $.fn.simpleFormSlider = ->
16
19
  $select.data('simple-form:slider', instance)
17
20
 
18
21
  $.simpleForm.onDomReady ($document) ->
19
- $document.find('[data-slider]').simpleFormSlider()
22
+ $document.find('[data-simple-form-slider]').simpleFormSlider()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glyph-fr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails