effective_datatables 4.0.0 → 4.0.1
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/app/assets/stylesheets/effective_datatables/_overrides.scss +8 -1
- data/app/controllers/effective/datatables_controller.rb +4 -1
- data/app/models/effective/effective_datatable/compute.rb +2 -0
- data/app/views/effective/datatables/_actions_column.html.haml +8 -6
- 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: 7ab95f2d266beb9b172ec2604fb67e0620c55a75
|
4
|
+
data.tar.gz: 660a6d40c9050609b2bd53a439a2e2586db2abec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cf189eda6e9c86068a481b5eb5c5fff224e82d396791ed79f8d76b96bb6b7e89de5639723ac207fd4926ded919fc4c656918d3ca30c46d71c4f2f60dfe45e03
|
7
|
+
data.tar.gz: e459bd93a775506e1e660f8b47f2dd4a1c6f8820abb10c7bcc9b30d6969ad15c2431833862b6a8e77a327c8cc79410036cc1dfb83b52b59e584b1c4662d257f4
|
@@ -123,11 +123,17 @@ table.dataTable.simple > thead {
|
|
123
123
|
}
|
124
124
|
|
125
125
|
// Column specific adjustments
|
126
|
-
table.dataTable
|
126
|
+
table.dataTable {
|
127
127
|
td.col-price { text-align: right; }
|
128
128
|
td.col-decimal { text-align: right; }
|
129
129
|
td.col-right { text-align: right; }
|
130
130
|
|
131
|
+
tfoot {
|
132
|
+
.col-price { text-align: right; }
|
133
|
+
.col-decimal { text-align: right; }
|
134
|
+
.col-right { text-align: right; }
|
135
|
+
}
|
136
|
+
|
131
137
|
td.col-actions {
|
132
138
|
white-space: nowrap;
|
133
139
|
}
|
@@ -141,4 +147,5 @@ table.dataTable > tbody {
|
|
141
147
|
td {
|
142
148
|
p { margin-bottom: 0em; }
|
143
149
|
}
|
150
|
+
|
144
151
|
}
|
@@ -13,9 +13,12 @@ module Effective
|
|
13
13
|
render json: @datatable.to_json
|
14
14
|
rescue => e
|
15
15
|
EffectiveDatatables.authorized?(self, :index, @datatable.try(:collection_class))
|
16
|
-
|
17
16
|
render json: error_json(e)
|
17
|
+
|
18
|
+
ExceptionNotifier.notify_exception(e) if defined?(ExceptionNotifier)
|
19
|
+
raise e if Rails.env.development?
|
18
20
|
end
|
21
|
+
|
19
22
|
end
|
20
23
|
|
21
24
|
private
|
@@ -1,8 +1,10 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
= dropdown(variation: :dropleft) do
|
2
|
+
- if edit_action && EffectiveDatatables.authorized?(self, :edit, resource)
|
3
|
+
= dropdown_link_to 'Edit', effective_resource.action_path(:edit, resource), title: "Edit #{resource}"
|
3
4
|
|
4
|
-
- if
|
5
|
-
|
5
|
+
- if show_action && EffectiveDatatables.authorized?(self, :show, resource)
|
6
|
+
= dropdown_link_to 'View', effective_resource.action_path(:show, resource), title: resource.to_s
|
6
7
|
|
7
|
-
- if destroy_action && EffectiveDatatables.authorized?(self, :destroy, resource)
|
8
|
-
|
8
|
+
- if destroy_action && EffectiveDatatables.authorized?(self, :destroy, resource)
|
9
|
+
= dropdown_link_to "Delete #{resource}", effective_resource.action_path(:destroy, resource),
|
10
|
+
title: "Delete #{resource}", data: { method: :delete, confirm: "Delete #{resource}?" }
|
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.0.
|
4
|
+
version: 4.0.1
|
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: 2018-03-
|
11
|
+
date: 2018-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|