effective_bootstrap 0.3.11 → 0.3.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a413a43fe8afc26a398fada64c130819a1914a46
|
4
|
+
data.tar.gz: 62bb5c67a83990375e733cbc30ed4a712638ae65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41ac345f9d6b0d8a6ba4488e14cf1fb9fe81b7fa79f010accabe30f006cf76d5f5150cd2b0ebcf6f8659d43d3a3a87b1f3f900cc06b68a36e448c9fbd5076947
|
7
|
+
data.tar.gz: b05a8b54efe3aaeb1bc556c9fafcf125210c3e020de2a70fd807665be56dd6f653a557800126d973ef69864772f7edc0c51ebbc60b2a60b2b30c276ec0b2b707
|
@@ -19,9 +19,21 @@ module Effective
|
|
19
19
|
|
20
20
|
def build_check_box_wrap(&block)
|
21
21
|
if custom?
|
22
|
-
content_tag(:div, yield,
|
22
|
+
content_tag(:div, yield, options[:wrapper])
|
23
23
|
else
|
24
|
-
content_tag(:div, yield,
|
24
|
+
content_tag(:div, yield, options[:wrapper])
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def wrapper_options
|
29
|
+
if custom? && inline?
|
30
|
+
{ class: 'form-group custom-control custom-checkbox custom-control-inline' }
|
31
|
+
elsif custom?
|
32
|
+
{ class: 'form-group custom-control custom-checkbox' }
|
33
|
+
elsif inline?
|
34
|
+
{ class: 'form-check form-check-inline' }
|
35
|
+
else
|
36
|
+
{ class: 'form-check' }
|
25
37
|
end
|
26
38
|
end
|
27
39
|
|
@@ -45,7 +57,7 @@ module Effective
|
|
45
57
|
|
46
58
|
def inline? # default false
|
47
59
|
return @inline unless @inline.nil?
|
48
|
-
@inline = (options[:input].delete(:inline) == true)
|
60
|
+
@inline = ((options[:input] || {}).delete(:inline) == true)
|
49
61
|
end
|
50
62
|
|
51
63
|
def custom? # default true
|
@@ -29,11 +29,14 @@ module Effective
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def input_js_options
|
32
|
+
placeholder = options.delete(:placeholder)
|
33
|
+
placeholder = '' if placeholder == false
|
34
|
+
|
32
35
|
opts = {
|
33
36
|
theme: 'bootstrap',
|
34
37
|
minimumResultsForSearch: 6,
|
35
38
|
width: 'style',
|
36
|
-
placeholder: (
|
39
|
+
placeholder: (placeholder || 'Please choose'),
|
37
40
|
allowClear: (true if include_blank?),
|
38
41
|
tokenSeparators: ([',', ';', '\n', '\t'] if tags?),
|
39
42
|
tags: (true if tags?),
|
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.3.
|
4
|
+
version: 0.3.12
|
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: 2019-01-
|
11
|
+
date: 2019-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|