effective_datatables 2.3.7 → 2.3.8

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
  SHA1:
3
- metadata.gz: 6ca8480bd1fc0b8b6ce17677000451d9c2263ae9
4
- data.tar.gz: 0ccccbff17c090a4db2352ef6dda2bc2a5329fcc
3
+ metadata.gz: 8497b5523a489dc7a7b27a161203782080c6c95a
4
+ data.tar.gz: edfd807e2a1032d6bf3724200ba37fdc37626937
5
5
  SHA512:
6
- metadata.gz: b34b443779f993fb1d4c12aac1ad207f64d27fe8d703e1cba1099125e903d492e113f7285273e3736e0d99da1f6397c70dab6fb6814c487fd4324ab3264eb44b
7
- data.tar.gz: 5c3ee003f8f72b423464bb02a0788702315c6294a81e045e4a3bb9fb5e3b5008a5e71b74218e44d0d836691e4d6461976cf0af1679aba98b75a8ec0448cec848
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, 'Dana', 'Janssen', 'dana@agilestyle.com'],
222
- [2, 'Ashley', 'Janssen', 'ashley@agilestyle.com'],
223
- [3, 'Matthew', 'Riemer', 'matthew@agilestyle.com'],
224
- [4, 'Stephen', 'Brown', 'stephen@agilestyle.com'],
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)
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '2.3.7'.freeze
2
+ VERSION = '2.3.8'.freeze
3
3
  end
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.7
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-18 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails