effective_bootstrap 0.1.6 → 0.1.7

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: 5438b717e13e5703e1bb97a43ec8db0c95cd2287
4
- data.tar.gz: 7d0dfc9261e7eea03ed664e722a9ea806da3ab80
3
+ metadata.gz: 0c4cc9bb8d5533bc1807d040baf108b8edc4d1be
4
+ data.tar.gz: 9a398f27371dc2fe8b2b71d2037d0822f67f2608
5
5
  SHA512:
6
- metadata.gz: 0b2cae0e0461a12d394f3c465e8a47db3697dd14aaa572bd47511635d786b05c65f3b32f036d11400afa72eeedc94ba3d004a500b81721b88e8c3ae8572e44b9
7
- data.tar.gz: 61f1b929c27c8080b62a7fc2dee5afa722c84b7ff95c689675f278f3fee55f8bcb97c233a04925923866724782fff0d07879cae8cd84b26ab70e9d28b9695937
6
+ metadata.gz: a4679a2e6593d5ae5c3d698bb99da104e72ca89dfac4da1fb3536e33500cc514bfeac67b02dfee12767d7716c8a87a08a0f4d8aa9e18e43a6c36e7beab270aff
7
+ data.tar.gz: e0d6a2697f01fd98e22514077bb510a8a43f2a2ff9445627ef44b315dfd7cae297e3a635e323604384cc997cbddb689b2d18225c26d8a99946da60388f5333d4
@@ -12,6 +12,12 @@ formatWithHtml = (data, container) ->
12
12
  else
13
13
  data.text
14
14
 
15
+ matchWithHtml = (params, data) ->
16
+ return data if $.trim(params.term) == ''
17
+ return null unless data.element?
18
+
19
+ if $(data.element.getAttribute('data-html')).text().indexOf(params.term) > -1 then data else null
20
+
15
21
  (this.EffectiveBootstrap || {}).effective_select = ($element, options) ->
16
22
  switch options['template']
17
23
  when 'glyphicon'
@@ -20,6 +26,7 @@ formatWithHtml = (data, container) ->
20
26
  when 'html'
21
27
  options['templateResult'] = formatWithHtml
22
28
  options['templateSelection'] = formatWithHtml
29
+ options['matcher'] = matchWithHtml
23
30
 
24
31
  $select = $element.select2(options)
25
32
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-13 00:00:00.000000000 Z
11
+ date: 2018-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails