simple_form_extension 1.3.18 → 1.3.19
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: 1e7907bb88ab31cbf0dc3f5b0e354e8a3d1dd0cb
|
4
|
+
data.tar.gz: dcaaf0a5c20b1037a1cb2068e0e01a926e151665
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b738ce0dd70b0bdf4487842b8f7a912fc4ddffcf1b7a8a852683f4e4fd040d251e5eecf244edd6038b53b1d383c4d425faeb669d28e9fc37bfb6f73ad63ad7e
|
7
|
+
data.tar.gz: f435ccac86f3182910428bc43fdc9c1a675f8698a3253dd1e174669cf880e1efe5c62428760c1c0aeadb0e1ae8e56c2b7722ce559fc3f5df6319d9c5b5cfe908
|
@@ -83,3 +83,25 @@ $.fn.simpleFormSelectize = (options = {}) ->
|
|
83
83
|
|
84
84
|
$.simpleForm.onDomReady ($document) ->
|
85
85
|
$document.find('[data-selectize]').simpleFormSelectize()
|
86
|
+
|
87
|
+
|
88
|
+
# Fix for allowEmptyOption issue
|
89
|
+
#
|
90
|
+
# See : https://github.com/selectize/selectize.js/issues/967
|
91
|
+
#
|
92
|
+
hash_key = (value) ->
|
93
|
+
if typeof value == 'undefined' or value == null
|
94
|
+
return null
|
95
|
+
if typeof value == 'boolean'
|
96
|
+
return if value then '1' else '0'
|
97
|
+
value + ''
|
98
|
+
|
99
|
+
$.extend window.Selectize.prototype, registerOption: (data) ->
|
100
|
+
key = hash_key(data[@settings.valueField])
|
101
|
+
# Line 1187 of src/selectize.js should be changed
|
102
|
+
# if (!key || this.options.hasOwnProperty(key)) return false;
|
103
|
+
if typeof key == 'undefined' or key == null or @options.hasOwnProperty(key)
|
104
|
+
return false
|
105
|
+
data.$order = data.$order or ++@order
|
106
|
+
@options[key] = data
|
107
|
+
key
|
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.3.
|
4
|
+
version: 1.3.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glyph-fr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|