effective_datatables 2.11.2 → 2.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/effective_datatables/scopes.js.coffee +8 -2
- data/app/assets/stylesheets/effective_datatables/_overrides.scss.erb +0 -1
- data/app/helpers/effective_datatables_helper.rb +4 -4
- data/app/views/effective/datatables/_scopes.html.haml +3 -3
- 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: 672de368787ac30eb2d42e8bfcde9cba24a61e98
|
4
|
+
data.tar.gz: fe3cb8fd151b68c9da65fd9f81fb949fa86caead
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdffcce1d831eb5d0e27a5242257647a717d043ee64799d264b3bbdd31b6b460c70a05b9ad14294fa981bfd9dd78c44310e1cf153428e25dc943656d2bfb945e
|
7
|
+
data.tar.gz: b831ffff4efc8d3b154e4d93747d155d90037b874293ffb786d3c2daaf8fcc4ed750ef59ff11da74dddc3ea2757d3af35c71b013210b035825b5942db91bde33
|
data/README.md
CHANGED
@@ -501,7 +501,7 @@ datatable do
|
|
501
501
|
bulk_actions_column do
|
502
502
|
bulk_action 'Approve all', bulk_approve_posts_path, data: {confirm: 'Approve all selected posts?'}
|
503
503
|
bulk_action_divider
|
504
|
-
bulk_action 'Send emails', bulk_email_posts_path, data
|
504
|
+
bulk_action 'Send emails', bulk_email_posts_path, data: {confirm: 'Really send emails?'}
|
505
505
|
end
|
506
506
|
|
507
507
|
...
|
@@ -1,3 +1,9 @@
|
|
1
|
-
$(document).on 'click', 'a[data-
|
1
|
+
$(document).on 'click', 'a[data-clear-form]', (event) ->
|
2
2
|
event.preventDefault()
|
3
|
-
$(event.currentTarget).closest('form').trigger('
|
3
|
+
$(event.currentTarget).closest('form').trigger('clear')
|
4
|
+
|
5
|
+
$(document).on 'clear', '.effective-datatable-scopes form', (event) ->
|
6
|
+
$(this).find('.radio.active').removeClass('active');
|
7
|
+
$(this).find(':radio').prop('checked', false);
|
8
|
+
$('form.form-inline input:not([type=submit])').val('');
|
9
|
+
$(this).submit()
|
@@ -49,7 +49,6 @@ table.dataTable.sort-hidden thead .sorting_desc { background-image: none; }
|
|
49
49
|
|
50
50
|
// Filter bar
|
51
51
|
table.dataTable .form-group { width: 100%; margin-left: 0px; margin-right: 0px; }
|
52
|
-
table.dataTable input { width: 100%; }
|
53
52
|
table.dataTable select { width: 100%; }
|
54
53
|
table.dataTable .form-control { width: 100%; }
|
55
54
|
table.dataTable .form-group.datatable_filter_bulk_actions { margin-left: 4px; }
|
@@ -7,8 +7,8 @@ module EffectiveDatatablesHelper
|
|
7
7
|
datatable.view ||= self
|
8
8
|
|
9
9
|
begin
|
10
|
-
EffectiveDatatables.authorized?(controller, :index, datatable.collection_class) || raise(
|
11
|
-
rescue => e
|
10
|
+
EffectiveDatatables.authorized?(controller, :index, datatable.collection_class) || raise(Effective::AccessDenied)
|
11
|
+
rescue Effective::AccessDenied => e
|
12
12
|
return content_tag(:p, "You are not authorized to view this datatable. (cannot :index, #{datatable.collection_class})")
|
13
13
|
end
|
14
14
|
|
@@ -23,8 +23,8 @@ module EffectiveDatatablesHelper
|
|
23
23
|
datatable.simple = true
|
24
24
|
|
25
25
|
begin
|
26
|
-
EffectiveDatatables.authorized?(controller, :index, datatable.collection_class) || raise(
|
27
|
-
rescue => e
|
26
|
+
EffectiveDatatables.authorized?(controller, :index, datatable.collection_class) || raise(Effective::AccessDenied)
|
27
|
+
rescue Effective::AccessDenied => e
|
28
28
|
return content_tag(:p, "You are not authorized to view this datatable. (cannot :index, #{datatable.collection_class})})")
|
29
29
|
end
|
30
30
|
|
@@ -16,6 +16,6 @@
|
|
16
16
|
- else
|
17
17
|
= form.input name, options[:filter]
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
.btn-group
|
20
|
+
= form.submit 'Filter', class: 'btn btn-primary', 'data-disable-with' => 'Submitting...'
|
21
|
+
= link_to 'Clear', '#', class: 'btn btn-default', 'data-clear-form' => true
|
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.
|
4
|
+
version: 2.12.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: 2017-
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|