effective_datatables 4.32.1 → 4.32.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a698faa322e964f9e59f527c958bbcba3b67af487e89656f057514169eabd222
|
4
|
+
data.tar.gz: '085d9a598ed1f4a4cf40762a890a18bb24ec4e7af73f4bb2f64a242fe34880c5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b35b553118ec141057f13edb66b7e0d87b1afca3ab7df3e8ebed8c785fcbd06233cffa859b418aad9afb111b87aa73e86afc08041a1bc14aa09b341693551c68
|
7
|
+
data.tar.gz: 3fc70e65b0e53942b8a9cc4270e16bd5f7a22bbec0cd49a204a402f3bf955fe5bd278d5bf405000e8d23a8d062916540b6e5006605d14fce345cf9b0bbaa43c5
|
@@ -44,7 +44,8 @@ module EffectiveDatatablesPrivateHelper
|
|
44
44
|
def datatable_new_resource_button(datatable, name, column)
|
45
45
|
return unless datatable.inline? && (column[:actions][:new] != false)
|
46
46
|
|
47
|
-
|
47
|
+
# Override the default btn_class and use this one
|
48
|
+
action = { action: :new, class: 'btn btn-sm btn-success', 'data-remote': true }
|
48
49
|
|
49
50
|
if column[:actions][:new].kind_of?(Hash) # This might be active_record_array_collection?
|
50
51
|
actions = action.merge(column[:actions][:new])
|
@@ -201,13 +201,15 @@ module Effective
|
|
201
201
|
# Nothing to do. We're just a string search.
|
202
202
|
elsif search[:as] == :select && search[:collection].kind_of?(Array)
|
203
203
|
# Nothing to do. We already loaded the custom parameterized collection above.
|
204
|
-
elsif array_collection? && opts[:resource].present?
|
204
|
+
elsif opts[:visible] && array_collection? && opts[:resource].present?
|
205
205
|
# Assigns { as: :select, collection: [...] }
|
206
206
|
search.reverse_merge!(search_resource.search_form_field(name, collection.first[opts[:index]]))
|
207
|
-
|
207
|
+
elsif opts[:visible]
|
208
208
|
# Load the defaults from effective_resources
|
209
209
|
# Assigns { as: :string } or { as: :select, collection: [...] }
|
210
210
|
search.reverse_merge!(search_resource.search_form_field(name, opts[:as]))
|
211
|
+
else
|
212
|
+
search.reverse_merge!({ as: :string })
|
211
213
|
end
|
212
214
|
|
213
215
|
# Assign default search operation
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_datatables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.32.
|
4
|
+
version: 4.32.3
|
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: 2025-04-
|
11
|
+
date: 2025-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|