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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 409a99e8dc9284b103bbbcd90ef5e66e4945c4fe
4
- data.tar.gz: 5e320731bec22af5f939b6dd35c9358df9e41b08
3
+ metadata.gz: 7ab95f2d266beb9b172ec2604fb67e0620c55a75
4
+ data.tar.gz: 660a6d40c9050609b2bd53a439a2e2586db2abec
5
5
  SHA512:
6
- metadata.gz: 3d568242347b2c0656e993305a296284fb0f2731f4d2f4177725f992db7891bdf5e5f873b52cb57b0301c0b0807cb90917147d3a42abb59d8932ff7e1c0a50f5
7
- data.tar.gz: a5147ebee2cc69002e0da8e7682e9fe84909da9e7726ea3a61a0887df2e644617324bd36066b1e36a99b1a385b596dc48118fde79bfd3ee85bcacd747eb867dc
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 > tbody {
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
@@ -126,6 +126,8 @@ module Effective
126
126
  length = values.length
127
127
  values = values.reject { |value| value.nil? }
128
128
 
129
+ return BLANK if [:id, :year].include?(column[:name])
130
+
129
131
  case aggregate[:name]
130
132
  when :total
131
133
  if [:percentage].include?(column[:as])
@@ -1,8 +1,10 @@
1
- - if show_action && EffectiveDatatables.authorized?(self, :show, resource)
2
- = show_icon_to effective_resource.action_path(:show, resource)
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 edit_action && EffectiveDatatables.authorized?(self, :edit, resource)
5
- = edit_icon_to effective_resource.action_path(:edit, resource)
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
- = destroy_icon_to effective_resource.action_path(:destroy, resource), data: { method: :delete, confirm: "Delete #{resource}?" }
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}?" }
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.0.0'.freeze
2
+ VERSION = '4.0.1'.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: 4.0.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-07 00:00:00.000000000 Z
11
+ date: 2018-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails