bootstrap_builders 0.0.41 → 0.0.42
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 +4 -4
- data/lib/bootstrap_builders/button.rb +6 -1
- data/lib/bootstrap_builders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8e9ae030633c1fc5858c0b77da8f6219103a15e
|
|
4
|
+
data.tar.gz: 2bac18993e504f5896107219aeb4d0132686026d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0de061935d6d9c48b3fcba1304f67f91c42a2f8e64ccee76c4ba9a051af3e9c5dc0e4e241532bef3c99b0c655b4d9826071fcf1325f9bf6a8fdd50868f777461
|
|
7
|
+
data.tar.gz: 75944a0b4f9fc6fc4219d0f220da1a6bd907e3815cab25742beaa0c00f87f20cae4661067fec72cba72bd862e4e378c7c27ec4c1aa89f85cab3bc476aafb3519
|
|
@@ -40,10 +40,11 @@ class BootstrapBuilders::Button
|
|
|
40
40
|
|
|
41
41
|
def classes
|
|
42
42
|
unless @classes
|
|
43
|
-
@classes = BootstrapBuilders::ClassAttributeHandler.new(class: ["btn"
|
|
43
|
+
@classes = BootstrapBuilders::ClassAttributeHandler.new(class: ["btn"])
|
|
44
44
|
@classes.add("btn-xs") if @mini
|
|
45
45
|
@classes.add(@class) if @class
|
|
46
46
|
@classes.add("bb-btn-responsive") if @args[:responsive]
|
|
47
|
+
add_default_as_default
|
|
47
48
|
@classes.add("btn-block") if @args[:block]
|
|
48
49
|
@classes.add("btn-danger") if @args[:danger]
|
|
49
50
|
@classes.add("btn-info") if @args[:info]
|
|
@@ -102,6 +103,10 @@ class BootstrapBuilders::Button
|
|
|
102
103
|
|
|
103
104
|
private
|
|
104
105
|
|
|
106
|
+
def add_default_as_default
|
|
107
|
+
@classes.add("btn-default") if !@args[:danger] && !@args[:info] && !@args[:primary] && !@args[:warning]
|
|
108
|
+
end
|
|
109
|
+
|
|
105
110
|
def can?
|
|
106
111
|
authorize_object = can_object
|
|
107
112
|
return true if !authorize_object || !@args[:can_type]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bootstrap_builders
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.42
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kaspernj
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-06-
|
|
11
|
+
date: 2017-06-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|