effective_bootstrap 1.19.5 → 1.19.7

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
  SHA256:
3
- metadata.gz: 54480bca1b55ba06862068927925c85e9d734b2df5b34ba6503c2ce546d963eb
4
- data.tar.gz: db078edad7c0e73f97710c194f2c6d5427909c964294d9905e12e1f68de44ce2
3
+ metadata.gz: 9947a20aa2f55ed6864c960d2c68ca11faf44e7b12ba0916c76d2146dc690e20
4
+ data.tar.gz: 96793613daec126b2380c138ceb52f2cc25875ac31024176758cb782955fbef5
5
5
  SHA512:
6
- metadata.gz: f6c4e4d56f25032f8ec64e59325d0c510ef740aa429168a624b16a5e876ef3071fea2402c4030f5a370961aef1bade55c5957a79d95aafe3e3f0bb289b22f701
7
- data.tar.gz: b2ad7fbc5f58a8c28aa0cdfef5624d27af619326c2b811f578527e732bbd72ae760d37537435cdda480aaba7f5828eca208d79ec3743b6a47ec63851eba5a928
6
+ metadata.gz: aac4222008bbeb80553e9d757e866ea065c4a3560266673cea6c70412404b1d8687af86123f4c5141f695560cd94a9d0d71cd837481338d8e5e76dfe649ffa80
7
+ data.tar.gz: c6a2867e85f499bad0a820a11342ecbc266a357474eff8ef4fc834d37224d0f9d688602ab9561ea436a4d5ec4bd0ab057f391f611bfa0eed23f5a0a494d9fc4c
@@ -157,7 +157,13 @@ module Effective
157
157
  insert = render_insert() if add? && reorder?
158
158
  end
159
159
 
160
- content_tag(:div, insert + render_fields(content, remove + reorder), class: 'has-many-fields')
160
+ opts = if resource.marked_for_destruction? && resource.errors.blank?
161
+ { class: 'has-many-fields marked-for-destruction', style: 'display: none;' }
162
+ else
163
+ { class: 'has-many-fields' }
164
+ end
165
+
166
+ content_tag(:div, insert + render_fields(content, remove + reorder), opts)
161
167
  end
162
168
 
163
169
  def render_fields(content, remove)
@@ -5,9 +5,10 @@ module Effective
5
5
  class PercentField < Effective::TableRow
6
6
 
7
7
  def content
8
- template.number_to_percentage(value) if value.present?
8
+ return unless value.present?
9
+ str = value.kind_of?(Integer) ? ('%.3f' % (value / 1000.0)) : value.to_s
10
+ str.gsub('.000', '') + '%'
9
11
  end
10
-
11
12
  end
12
13
  end
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '1.19.5'.freeze
2
+ VERSION = '1.19.7'.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.19.5
4
+ version: 1.19.7
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: 2024-09-20 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails