auto_select2 0.5.6 → 0.5.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: e2207b662cf090eeb3ae8876b52e687438495206
4
- data.tar.gz: c9cff1f31e48956dd2c0a4948e1d488598e828b1
3
+ metadata.gz: d5d8050b98475d9f40dc0fcdb44095529f9e5a29
4
+ data.tar.gz: cf477c641e81a173d9523a71f7c8339f927814cd
5
5
  SHA512:
6
- metadata.gz: 696c97944f1934960ed4a9fe5db862079a52f3218f831063cde536108358cbb27e6bab2c6980fef657a3df5caa261b1cd6c8a7ad9b4ff4c4ecced0ed1a51f5f0
7
- data.tar.gz: 6c5840823c32a840ff9a8565bed8c159a9c86bb9b186b8343a92b3450e3fa080f5f70271c330b19c12d1f68a197ea763741f0f9fbea487a010cf4641f7b620e3
6
+ metadata.gz: 45e9362048eef7c3f7ec86a2cd9a27cb7917c1e1f6f9fed0f8fd230a1e2218cc254a51e8109cb2b301b2cf02bfef55040c6387ca385785633b19986174ebaf8a
7
+ data.tar.gz: 997d97b0e89bc2fbb6ad18cd727ce40d3b8d0d275e50c385753cf0ab7491b41345651f361483a4c1858adb97c8f47d75b73d8da66454d05735d7cd8c71fc5ff8
@@ -1,3 +1,3 @@
1
1
  module AutoSelect2
2
- VERSION = '0.5.6'
2
+ VERSION = '0.5.7'
3
3
  end
@@ -13,9 +13,17 @@ jQuery ($) ->
13
13
  s2FullOptions = $.extend({}, s2DefaultOptions)
14
14
  else
15
15
  s2FullOptions = $.extend({}, s2DefaultOptions, s2UserOptions)
16
+ customFormatSelection = s2UserOptions.formatSelection
17
+ customFormatResult = s2UserOptions.formatResult
16
18
 
17
- $input.select2(s2FullOptions)
19
+ if customFormatSelection isnt `undefined` && (window[customFormatSelection] isnt `undefined`)
20
+ formatSelectionFunc = window[customFormatSelection]
21
+ if (customFormatResult isnt `undefined`) && (window[customFormatResult] isnt `undefined`)
22
+ formatResultFunc = window[customFormatResult]
23
+
24
+ s2FullOptions = $.extend({}, s2FullOptions, {formatSelection: formatSelectionFunc, formatResult: formatResultFunc})
18
25
 
26
+ $input.select2(s2FullOptions)
19
27
  return
20
28
  return
21
29
  initAutoStaticSelect2()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_select2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Lisichkin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-23 00:00:00.000000000 Z
12
+ date: 2017-03-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project:
153
- rubygems_version: 2.5.1
153
+ rubygems_version: 2.6.8
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Base methods for wrapping a Select2 and easy initialize it.