effective_datatables 4.36.1 → 4.37.0
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: 65762c9c87f1788ec63c7416237b71bccd9b6ed3f5c17f2a13e0f03a42278867
|
|
4
|
+
data.tar.gz: 6eef5d9930eb3d153f2eff69fbe8fecd3068543cd3fa32053a3b9054d65fca12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 987b5ae60d844786ed4d0a7040035921d30251fc8e7d4312c25c69c6ae6d69ff4516c37b1ed486ce5ff7d25b36e0528605c5209af719e0313633d62ed56c6962
|
|
7
|
+
data.tar.gz: 585a6c409ca5c76959fde7038332f638915a7b1713b3669dee51b86fe0c9a939db7a1961f28d8d49125801e5942dd5c0bed65ce3876f4a7aa01ad88fed5c446d
|
|
@@ -44,8 +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
|
-
|
|
48
|
-
action = { action: :new, class:
|
|
47
|
+
btn_class = EffectiveDatatables.new_action_button_class || 'btn-sm btn-success'
|
|
48
|
+
action = { action: :new, class: "btn #{btn_class}", 'data-remote': true }
|
|
49
49
|
|
|
50
50
|
if column[:actions][:new].kind_of?(Hash) # This might be active_record_array_collection?
|
|
51
51
|
actions = action.merge(column[:actions][:new])
|
|
@@ -101,7 +101,7 @@ module Effective
|
|
|
101
101
|
action: false,
|
|
102
102
|
as: :actions,
|
|
103
103
|
compute: nil,
|
|
104
|
-
btn_class: (btn_class || 'btn-sm btn-outline-primary'),
|
|
104
|
+
btn_class: (btn_class || EffectiveDatatables.default_button_class || 'btn-sm btn-outline-primary'),
|
|
105
105
|
col_class: col_class,
|
|
106
106
|
csv: false,
|
|
107
107
|
format: (format if block_given?),
|
|
@@ -30,6 +30,10 @@ EffectiveDatatables.setup do |config|
|
|
|
30
30
|
# Default class used on the <table> tag
|
|
31
31
|
config.html_class = 'table table-hover'
|
|
32
32
|
|
|
33
|
+
# These are the button classes
|
|
34
|
+
# config.default_button_class = 'btn-outline-primary' # default class when btn_class option is unspecified
|
|
35
|
+
# config.new_action_button_class = 'btn-success' # overriding class on new action
|
|
36
|
+
|
|
33
37
|
# Log search/sort information to the console
|
|
34
38
|
config.debug = true
|
|
35
39
|
|
data/lib/effective_datatables.rb
CHANGED
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.
|
|
4
|
+
version: 4.37.0
|
|
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: 2026-03-
|
|
11
|
+
date: 2026-03-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|