activeadmin_blaze_theme 0.4.8 → 0.4.9

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: 588cf6e0f16f2711032a031e7f5f560de3a51587
4
- data.tar.gz: f9a06e5703b389427d7b7f8e7c2aa4bc13575935
3
+ metadata.gz: 47b9d220f11559bbb09bdc9e4faf5482a1ed1c95
4
+ data.tar.gz: 65e0d2d4c5f7e3c398b16025dd315ed8bf3abc11
5
5
  SHA512:
6
- metadata.gz: cd9750659109d28003d3f5186895b5fae934e9ab99b6588f04099eb57d57b0ff044e2a14354aa2ae4e4b46b02729bacc5a2b7e2c8b5600b73fd32c6d2b50ecc0
7
- data.tar.gz: d1d85f5af657b0cba4ea6a974949239ec7cb071073cc7fe36356ef2d5ac27854e4a788cb1065e1977441be51ac92c1370893e167d23af055d5b62a5b2ddcd1dd
6
+ metadata.gz: d4dd61b2614ea8e633e662661f1e98811901d124d7cf2cef894829c438dea7b06a98eb4c972e232935a23d900d21a419acfe6aed0011a1eada3140a7a4be43a5
7
+ data.tar.gz: c817bb41dfb53b48037e700d9e45799aa388a69d2c8e1703f520f8f91f925899ba9e97cc1a27fd16ad4d523c8e2025bcde1f6398f17267fe7adf6fafe7cf1594
data/README.md CHANGED
@@ -96,6 +96,10 @@ To change toggle color:
96
96
 
97
97
  Available: `c-toggle--brand, c-toggle--info, c-toggle--warning, c-toggle--success, c-toggle--error`
98
98
 
99
+ Standard checkbox with label on the left:
100
+
101
+ `f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }`
102
+
99
103
  ## Blaze widgets
100
104
 
101
105
  See components avaible in Blaze CSS [docs](http://blazecss.com/components/buttons/).
@@ -134,6 +138,10 @@ Show - sidebar on the left:
134
138
 
135
139
  ![edit](screenshot3.jpg)
136
140
 
141
+ ## Do you like it? Star it!
142
+
143
+ If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
144
+
137
145
  ## Contributors
138
146
 
139
147
  - [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
@@ -133,6 +133,12 @@ body.active_admin {
133
133
  label {
134
134
  display: inline-block;
135
135
  }
136
+ .field_with_errors {
137
+ display: inline;
138
+ }
139
+ .inline-errors {
140
+ margin-top: 0;
141
+ }
136
142
  }
137
143
 
138
144
  // filter forms
@@ -683,12 +689,23 @@ body.active_admin {
683
689
  }
684
690
 
685
691
  // dialogs
686
- .ui-dialog > .ui-dialog-buttonpane button.ui-button {
687
- @extend .button-base;
688
- margin-right: 10px;
689
- &:hover {
690
- background-image: none;
692
+ .ui-dialog {
693
+ button.ui-button {
694
+ @extend .button-base;
695
+ // margin-right: 10px;
696
+ &:hover {
697
+ background-image: none;
698
+ }
699
+ }
700
+ .ui-dialog-titlebar {
701
+ display: flex;
702
+ justify-content: space-between;
703
+ > * {
704
+ align-self: center
705
+ }
691
706
  }
707
+ // .ui-dialog-buttonset
708
+ // text-align: right
692
709
  }
693
710
 
694
711
  // footer
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminBlazeTheme
2
- VERSION = '0.4.8'
2
+ VERSION = '0.4.9'
3
3
  end
@@ -22,7 +22,8 @@ module Formtastic
22
22
 
23
23
  def toggle_label
24
24
  builder.label(
25
- method
25
+ method,
26
+ label_text
26
27
  )
27
28
  end
28
29
 
@@ -35,11 +36,12 @@ module Formtastic
35
36
  end
36
37
 
37
38
  def label_html_options
38
- super.merge( for: input_html_options[:id], class: ['c-toggle', input_html_options[:toggle_class] ] - ['label'] )
39
+ classes = input_html_options[:simple_checkbox] ? [] : [ 'c-toggle', input_html_options[:toggle_class] ]
40
+ super.merge( for: input_html_options[:id], class: classes - ['label'] )
39
41
  end
40
42
 
41
43
  def label_with_embedded_checkbox
42
- check_box_html << "" << toggle_html # << label_text
44
+ check_box_html << "" << ( input_html_options[:simple_checkbox] ? '' : toggle_html ) # << label_text
43
45
  end
44
46
 
45
47
  def toggle_html
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_blaze_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-13 00:00:00.000000000 Z
11
+ date: 2017-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.5.2
128
+ rubygems_version: 2.6.13
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: ActiveAdmin Blaze Theme