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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e5e51f5082cd9c76b6a1faffbc5cd674855d3bd
|
4
|
+
data.tar.gz: 253c55335c463f3ae34968c92e055454bb7249a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,7 +1,10 @@
|
|
1
1
|
class Slider
|
2
2
|
constructor: (@$el) ->
|
3
|
-
values = @$el.data('slider-value')
|
4
|
-
|
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.
|
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-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|