effective_datatables 2.3.7 → 2.3.8
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 +4 -4
- data/README.md +15 -9
- data/app/models/effective/effective_datatable/dsl.rb +1 -1
- data/lib/effective_datatables/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8497b5523a489dc7a7b27a161203782080c6c95a
|
4
|
+
data.tar.gz: edfd807e2a1032d6bf3724200ba37fdc37626937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a9f16f1d2248b4f8b80003427a6a6a44bd4c48e5fa2084ae664158d60dd9df55cda4a6642bff2ee33c04a4f54f6dde092987a2ea164eee0b9d1a75c225e6399
|
7
|
+
data.tar.gz: c000ddce0633521ea5cb132af6a8a8e6a15a098bf7f5948d65f7bcc782fbe7ab18251889c5da1e17d7e7d411a006316bc722c35e5c70f81a29a7b48874750c59
|
data/README.md
CHANGED
@@ -218,13 +218,10 @@ module Effective
|
|
218
218
|
|
219
219
|
def collection
|
220
220
|
[
|
221
|
-
[1, '
|
222
|
-
[2, '
|
223
|
-
[3, '
|
224
|
-
[4, '
|
225
|
-
[5, 'Warren', 'Uhrich', 'warren@agilestyle.com'],
|
226
|
-
[6, 'Dallas', 'Meidinger', 'dallas@agilestyle.com'],
|
227
|
-
[7, 'Nathan', 'Feaver', 'nathan@agilestyle.com']
|
221
|
+
[1, 'June', 'Huang', 'june@einstein.com'],
|
222
|
+
[2, 'Leo', 'Stubbs', 'leo@einstein.com'],
|
223
|
+
[3, 'Quincy', 'Pompey', 'quincy@einstein.com'],
|
224
|
+
[4, 'Annie', 'Wojcik', 'annie@einstein.com'],
|
228
225
|
]
|
229
226
|
end
|
230
227
|
|
@@ -315,6 +312,7 @@ The following options control the display behaviour of the column:
|
|
315
312
|
:visible => true|false # Hide this column at startup. Column visbility can be changed on the frontend. By default, hidden column filter terms are ignored.
|
316
313
|
:width => '100%'|'100px' # Set the width of this column. Can be set on one, all or some of the columns. If using percentages, should never add upto more than 100%
|
317
314
|
:class => 'col-example' # Adds an html class to the column's TH and all TD elements. Add more than one class with 'example col-example something'
|
315
|
+
:responsivePriority => 0 # Set which columns collapse when the table is shrunk down. 10000 is the default value.
|
318
316
|
```
|
319
317
|
|
320
318
|
### Filtering Options
|
@@ -431,6 +429,14 @@ filterable # whether the dataTable is filterable
|
|
431
429
|
|
432
430
|
Creates a column with links to this resource's Show, Edit and Destroy actions.
|
433
431
|
|
432
|
+
Sets `responsivePriority: 0` so the column is last to collapse when the table is shrunk down.
|
433
|
+
|
434
|
+
Override the default actions by passing your own partial:
|
435
|
+
|
436
|
+
```ruby
|
437
|
+
actions_column partial: 'admin/posts/actions'
|
438
|
+
```
|
439
|
+
|
434
440
|
Optionally uses the authorization method (below) to determine if the `current_user` has permission for each of these actions.
|
435
441
|
|
436
442
|
See the `config/initializers/effective_datatable.rb` file for more information.
|
@@ -455,9 +461,9 @@ The `bulk_action` method is just an alias for `link_to`, so all the same options
|
|
455
461
|
|
456
462
|
```ruby
|
457
463
|
bulk_actions_column do
|
458
|
-
bulk_action 'Approve all', bulk_approve_posts_path, data: { confirm: 'Approve all selected posts?' }
|
464
|
+
bulk_action 'Approve all', bulk_approve_posts_path, data: { method: :post, confirm: 'Approve all selected posts?' }
|
459
465
|
bulk_action_divider
|
460
|
-
bulk_action 'Send emails', bulk_email_posts_path, data : { confirm: 'Really send emails?' }
|
466
|
+
bulk_action 'Send emails', bulk_email_posts_path, data : { method: :post, confirm: 'Really send emails?' }
|
461
467
|
end
|
462
468
|
```
|
463
469
|
|
@@ -45,10 +45,10 @@ module Effective
|
|
45
45
|
sortable: false,
|
46
46
|
filter: false,
|
47
47
|
responsivePriority: 0,
|
48
|
-
partial_local: :resource,
|
49
48
|
partial_locals: { show_action: show, edit_action: edit, destroy_action: destroy, unarchive_action: unarchive }
|
50
49
|
}.merge(options)
|
51
50
|
|
51
|
+
opts[:partial_local] ||= :resource unless opts[:partial].present?
|
52
52
|
opts[:partial] ||= '/effective/datatables/actions_column' unless (block_given? || proc.present?)
|
53
53
|
|
54
54
|
table_column(name, opts, proc, &block)
|
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: 2.3.
|
4
|
+
version: 2.3.8
|
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: 2016-04-
|
11
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|