effective_bootstrap 1.14.14 → 1.14.16

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
  SHA256:
3
- metadata.gz: d24661035aefda568e36bd05da600c648106f9d8848cf451fb05507ae6c8d34b
4
- data.tar.gz: 7b7255fad5bbebe43bd5c7e751c26444fa32e2eee36d0a73df174d8a6c61b578
3
+ metadata.gz: 971258b7b4cd24b4e66eee2ad49d34fbc8410eccf69292d8a07a449729897262
4
+ data.tar.gz: 9c0c7ae82c414877381c712fb243ebb215fba1cc8eac38d53b43a6823d3a1ee6
5
5
  SHA512:
6
- metadata.gz: f67ec2cc997cd11a97c447c851eaee940e93bd0702d9218d8cc6f8c5af5c3649326cd3c3abfc9877bdf0ca04ffae7bb367c7c79e124db848bf72e9e5ebba6491
7
- data.tar.gz: 7aa8297e0a5c2a7fdbea857301abdd05641f4b96f047a6fa2f2bee8be40f6d66196c1ef917695e048c9936333bea8aec802e89777c2b73a5b718d573671c3f9d
6
+ metadata.gz: 4281a1cbb4bfe79f8463aef11e03b0b280cbb72c2b5f38277efcac3a2295a8b3e7ffc3a4067ce812c888fe5a7d2f1616b74f3e9dad1b4658f27dcc2bae0c317a
7
+ data.tar.gz: f5f68d26b0c28ff2f213e7b9fc0dfbf224d2ffd12c678ee2433570973cebe7a128d26362aea3fb67a51052d131937a802399cf231ea28478450340e05d9a5f2f
@@ -20,10 +20,11 @@ $(document).on 'direct-upload:end', (event) ->
20
20
  # Rails UJS fix
21
21
  $obj.closest('form').find('[type=submit][data-confirm]').data('confirmed', true)
22
22
 
23
+ # Disabled, to rule out trouble
23
24
  # Remove any empty [] inputs after upload
24
- $obj.closest('.form-group').find('input').each (i, input) ->
25
- $input = $(input)
26
- $input.remove() unless $input.val()
25
+ # $obj.closest('.form-group').find('input').each (i, input) ->
26
+ # $input = $(input)
27
+ # $input.remove() unless $input.val()
27
28
 
28
29
  $(document).on 'change', "input[type='file'][data-click-submit]", (event) ->
29
30
  $(event.currentTarget).closest('form').find('button[type=submit],input[type=submit]').first().click()
@@ -11,4 +11,6 @@ ul.nav.nav-tabs { margin-bottom: 1rem; }
11
11
  // cursor on disabled radios
12
12
  .custom-control-input:disabled ~ .custom-control-label { cursor: no-drop; }
13
13
  .custom-control-input:disabled ~ .custom-control-label::after { cursor: no-drop; }
14
- .custom-control-input:disabled ~ .custom-control-label::before { cursor: no-drop; }
14
+ .custom-control-input:disabled ~ .custom-control-label::before { cursor: no-drop; }
15
+
16
+ .effective-table-summary th { width: 200px; }
@@ -40,7 +40,7 @@ module Effective
40
40
  content = content.except(*except) if except.present?
41
41
  content = content.except(*filtered) if filtered.present?
42
42
 
43
- content_tag(:table, class: options.fetch(:class, 'table table-striped table-hover')) do
43
+ content_tag(:table, class: options.fetch(:class, 'table table-sm table-striped table-hover effective-table-summary')) do
44
44
  content_tag(:tbody, content.values.join.html_safe)
45
45
  end
46
46
  end
@@ -27,8 +27,8 @@ module Effective
27
27
 
28
28
  # Render method
29
29
  def to_html(&block)
30
- content_tag(:tr) do
31
- content_tag(:td, label_content) + content_tag(:td, content.presence || '-')
30
+ content_tag(:tr, class: "effective-table-summary-#{label_content.parameterize}") do
31
+ content_tag(:th, label_content) + content_tag(:td, content.presence || '-')
32
32
  end
33
33
  end
34
34
 
@@ -4,11 +4,19 @@ module Effective
4
4
  module TableRows
5
5
  class Boolean < Effective::TableRow
6
6
 
7
+ def to_html(&block)
8
+ content_tag(:tr, class: "effective-table-summary-#{label_content.parameterize}") do
9
+ content_tag(:td, colspan: 2) do
10
+ content_tag(:span, content.presence || '-') + label_content
11
+ end
12
+ end
13
+ end
14
+
7
15
  def content
8
16
  if value
9
- template.badge('YES')
17
+ template.badge('Yes', class: 'badge badge-primary mr-2')
10
18
  else
11
- template.badge('NO', class: 'badge badge-light')
19
+ template.badge('No', class: 'badge badge-secondary mr-2')
12
20
  end
13
21
  end
14
22
 
@@ -5,8 +5,8 @@ module Effective
5
5
  class ContentFor < Effective::TableRow
6
6
 
7
7
  def to_html(&block)
8
- content_tag(:tr) do
9
- content_tag(:td, label_content) + content_tag(:td, template.capture(&block))
8
+ content_tag(:tr, class: "effective-table-summary-#{label_content.parameterize}") do
9
+ content_tag(:th, label_content) + content_tag(:td, template.capture(&block))
10
10
  end
11
11
  end
12
12
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '1.14.14'.freeze
2
+ VERSION = '1.14.16'.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: 1.14.14
4
+ version: 1.14.16
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: 2023-08-24 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails