effective_bootstrap 0.0.12 → 0.0.13
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: 4af69c9c4a9ae59f62bedf31c4cdbe3a4e737a9b
|
4
|
+
data.tar.gz: 8e8deb930540714b3cf8a5f925ff4071203641bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 136e7e09f5a6dbd8b1a646c79c80ae0df121a2a58dbe3c2c4aaa52f8aded515d6c07b4e3215938156809f8914f5e908f1bfbfe2febc00c1821f3919ea2c21108
|
7
|
+
data.tar.gz: a12111fae308ef8504516805bd37d5d40004633133a255b77cf9a3b4f7e3b047f4ca94ce84dfcd3fe74da7254a5aef080412fd8c761bdc6cfecf86cf3a9757c4
|
@@ -13,7 +13,7 @@
|
|
13
13
|
.form-actions-inline.justify-content-end {
|
14
14
|
margin-left: 0.5em;
|
15
15
|
|
16
|
-
svg {
|
16
|
+
> svg {
|
17
17
|
position: absolute;
|
18
18
|
left: -1.6em;
|
19
19
|
}
|
@@ -22,7 +22,7 @@
|
|
22
22
|
.form-actions-inline.justify-content-start {
|
23
23
|
margin-right: 0.5em;
|
24
24
|
|
25
|
-
svg {
|
25
|
+
> svg {
|
26
26
|
position: absolute;
|
27
27
|
right: -1.6em;
|
28
28
|
}
|
@@ -3,13 +3,20 @@ module Effective
|
|
3
3
|
class Save < Effective::FormInput
|
4
4
|
|
5
5
|
def to_html(&block)
|
6
|
-
content_tag(:button,
|
6
|
+
content_tag(:button, options[:input]) do
|
7
|
+
icon_name.present? ? (icon(icon_name) + name) : name
|
8
|
+
end
|
7
9
|
end
|
8
10
|
|
9
11
|
def input_html_options
|
10
12
|
{ class: 'btn btn-primary', type: 'submit', name: 'commit', value: name }
|
11
13
|
end
|
12
14
|
|
15
|
+
def icon_name
|
16
|
+
return @icon unless @icon.nil?
|
17
|
+
@icon = options[:input].delete(:icon) || ''.html_safe
|
18
|
+
end
|
19
|
+
|
13
20
|
end
|
14
21
|
end
|
15
22
|
end
|
@@ -11,7 +11,15 @@ module Effective
|
|
11
11
|
icon('check', style: 'display: none;'),
|
12
12
|
icon('x', style: 'display: none;'),
|
13
13
|
icon('spinner'),
|
14
|
-
(
|
14
|
+
(
|
15
|
+
if block_given?
|
16
|
+
capture(&block)
|
17
|
+
else
|
18
|
+
content_tag(:button, options[:input]) do
|
19
|
+
icon_name.present? ? (icon(icon_name) + name) : name
|
20
|
+
end
|
21
|
+
end
|
22
|
+
)
|
15
23
|
]
|
16
24
|
|
17
25
|
(left? ? tags.reverse.join : tags.join).html_safe
|
@@ -69,6 +77,11 @@ module Effective
|
|
69
77
|
@right = (options.delete(:right) || false)
|
70
78
|
end
|
71
79
|
|
80
|
+
def icon_name
|
81
|
+
return @icon unless @icon.nil?
|
82
|
+
@icon = options[:input].delete(:icon) || ''.html_safe
|
83
|
+
end
|
84
|
+
|
72
85
|
def feedback_options
|
73
86
|
# case layout
|
74
87
|
# when :inline
|
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.0.
|
4
|
+
version: 0.0.13
|
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-04
|
11
|
+
date: 2018-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|