effective_datatables 4.24.1 → 4.25.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/dataTables/dataTables.bootstrap4.scss +0 -6
- data/app/helpers/effective_datatables_helper.rb +9 -1
- data/app/helpers/effective_datatables_private_helper.rb +1 -1
- data/app/models/effective/effective_datatable/collection.rb +4 -2
- data/config/locales/en.yml +1 -0
- data/config/locales/es.yml +1 -0
- data/config/locales/nl.yml +1 -0
- data/lib/effective_datatables/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83eb9275dcc75a256e935ee3ee51fdd515535fcf8457ce529df51243c2d96a8f
|
4
|
+
data.tar.gz: e5b94011f906b2630fb589a9b663dba4f7502f5f6a8bffae6f9b1b1860fe1de3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a4ea51c92b53fce4dd5fba110e5040361f25d3902899c98ec825726da533012d5f7c9cba9902fed3d6472b5d0632be906d3300f706198007480bab8386fab4c
|
7
|
+
data.tar.gz: 3dda47408ab035642b4597a7a46f415568272c780691600974498ab3d3885c839f488bb7cf4cf7a00b88d1b8f70985edb446f2b727eba2c617559ea7a31fdf2b
|
@@ -269,12 +269,6 @@ table.dataTable.nowrap th,
|
|
269
269
|
table.dataTable.nowrap td {
|
270
270
|
white-space: nowrap;
|
271
271
|
}
|
272
|
-
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) {
|
273
|
-
background-color: transparent;
|
274
|
-
}
|
275
|
-
table.dataTable > tbody > tr {
|
276
|
-
background-color: transparent;
|
277
|
-
}
|
278
272
|
table.dataTable > tbody > tr.selected > * {
|
279
273
|
box-shadow: inset 0 0 0 9999px rgb(2, 117, 216);
|
280
274
|
box-shadow: inset 0 0 0 9999px rgb(2, 117, 216);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# These are expected to be called by a developer. They are part of the datatables DSL.
|
4
4
|
module EffectiveDatatablesHelper
|
5
|
-
def render_datatable(datatable, input_js: {}, buttons: true, charts: true, download: nil, entries: true, filters: true, inline: false, namespace: nil, pagination: true, search: true, simple: false, sort: true)
|
5
|
+
def render_datatable(datatable, input_js: {}, buttons: true, charts: true, download: nil, entries: true, filters: true, inline: false, namespace: nil, pagination: true, search: true, simple: false, short: false, sort: true)
|
6
6
|
raise 'expected datatable to be present' unless datatable
|
7
7
|
raise 'expected input_js to be a Hash' unless input_js.kind_of?(Hash)
|
8
8
|
|
@@ -14,6 +14,10 @@ module EffectiveDatatablesHelper
|
|
14
14
|
buttons = charts = download = entries = filters = pagination = search = sort = false
|
15
15
|
end
|
16
16
|
|
17
|
+
if short
|
18
|
+
entries = pagination = false
|
19
|
+
end
|
20
|
+
|
17
21
|
datatable.attributes[:inline] = true if inline
|
18
22
|
datatable.attributes[:sortable] = false unless sort
|
19
23
|
datatable.attributes[:searchable] = false unless search
|
@@ -108,6 +112,10 @@ module EffectiveDatatablesHelper
|
|
108
112
|
render_datatable(datatable, simple: true)
|
109
113
|
end
|
110
114
|
|
115
|
+
def render_short_datatable(datatable)
|
116
|
+
render_datatable(datatable, short: true)
|
117
|
+
end
|
118
|
+
|
111
119
|
def inline_datatable?
|
112
120
|
params[:_datatable_id].present? && params[:_datatable_attributes].present?
|
113
121
|
end
|
@@ -184,7 +184,7 @@ module EffectiveDatatablesPrivateHelper
|
|
184
184
|
buttons: true,
|
185
185
|
checked: value,
|
186
186
|
feedback: false,
|
187
|
-
label: false,
|
187
|
+
label: (datatable._filters.present? ? t("effective_datatables.display") : false),
|
188
188
|
required: false,
|
189
189
|
wrapper: { class: 'form-group col-auto'}
|
190
190
|
}.merge(opts.except(:checked, :value))
|
@@ -45,8 +45,10 @@ module Effective
|
|
45
45
|
raise "Unsupported collection. Expecting an ActiveRecord relation, an Array of ActiveRecord objects, or an Array of Arrays [[1, 'foo'], [2, 'bar']]"
|
46
46
|
end
|
47
47
|
|
48
|
-
|
49
|
-
|
48
|
+
if _collection_apply_scope
|
49
|
+
_scopes.each do |scope, _|
|
50
|
+
raise "invalid scope: :#{scope}. The collection must respond to :#{scope}" unless collection.respond_to?(scope)
|
51
|
+
end
|
50
52
|
end
|
51
53
|
end
|
52
54
|
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/nl.yml
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.25.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: 2024-
|
11
|
+
date: 2024-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.5.6
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Uniquely powerful server-side searching, sorting and filtering of any ActiveRecord
|