effective_datatables 4.8.15 → 4.8.16

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
  SHA256:
3
- metadata.gz: 21c974538c4d1f563649f55c956ee568196acb3db15e7555c4aad0d0c2da9a2b
4
- data.tar.gz: '0159f6dd253f33578b0d897268ce302cc0302af5ff6b7f097f905b75bb1100fa'
3
+ metadata.gz: cb1dc8f3ac21b885c37e56552192568b059350efcdcd7bd79784d87d91a4bee3
4
+ data.tar.gz: 46094ee0a00e9246b8dde73c2c9ab4f531c84a287f2cd7db7da467cc0dab6d92
5
5
  SHA512:
6
- metadata.gz: 92fb13082dcbed02030a1238830f6e3341825fb80cba2636306244405ff0fbbfd4bd2e05dead6bf61cc63de7ea59f544dd566e007bb91ecdc8a9e6b9d8d3df25
7
- data.tar.gz: 821d5f2cb5707cc5001dac816fd6f85d4e6a39d48dae724b236975f1b647cbb0cbad3ac48c41701dcc91cf6510da1854ad316620796c9f5c10fecc9417babb98
6
+ metadata.gz: 51f91cf414121df572748ce03da5732b53011ad113db667b95284276f9ec628ec12ff0f8f614567ab88c770f9fa674059c6b8ca9a1ab1a5701e4dd8dbd509c2f
7
+ data.tar.gz: 1fbacd63b25ba9ba0556ccfec605a07ff5a3c6e5ddfc8da6dc723e66bfc4a72cb0d9c97d796a4acdb419e7fa5d1a2c8b8ec760bb4df77dbcee9b79708fce235d
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2019 Code and Effect Inc.
1
+ Copyright 2021 Code and Effect Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -16,7 +16,7 @@ flash = (message, status = '') ->
16
16
  timeout = $processing.data('timeout')
17
17
  clearTimeout(timeout) if timeout
18
18
 
19
- delay = (if status == 'danger' then 4000 else 1500)
19
+ delay = (if status == 'danger' then 4000 else 1000)
20
20
 
21
21
  $processing.html(message).data('timeout', setTimeout( =>
22
22
  $processing.html('Processing...')
@@ -123,7 +123,6 @@ beforeNew = ($action) ->
123
123
 
124
124
  # Append spinner and show Processing
125
125
  $th.append($table.data('spinner'))
126
- $table.DataTable().flash()
127
126
  $table.one 'draw.dt', (event) ->
128
127
  $th.find('a').show().siblings('svg').remove() if event.target == event.currentTarget
129
128
 
@@ -152,7 +151,6 @@ beforeEdit = ($action) ->
152
151
 
153
152
  # Append spinner and show Processing
154
153
  $td.append($table.data('spinner'))
155
- $table.DataTable().flash()
156
154
 
157
155
  afterEdit = ($action) ->
158
156
  $tr = $action.closest('tr')
@@ -1,6 +1,6 @@
1
1
  # These are expected to be called by a developer. They are part of the datatables DSL.
2
2
  module EffectiveDatatablesHelper
3
- def render_datatable(datatable, input_js: {}, buttons: true, charts: true, entries: true, filters: true, inline: false, pagination: true, search: true, simple: false, sort: true)
3
+ def render_datatable(datatable, input_js: {}, buttons: true, charts: true, entries: true, filters: true, inline: false, namespace: nil, pagination: true, search: true, simple: false, sort: true)
4
4
  raise 'expected datatable to be present' unless datatable
5
5
  raise 'expected input_js to be a Hash' unless input_js.kind_of?(Hash)
6
6
 
@@ -10,6 +10,7 @@ module EffectiveDatatablesHelper
10
10
 
11
11
  datatable.attributes[:inline] = true if inline
12
12
  datatable.attributes[:sortable] = false unless sort
13
+ datatable.attributes[:namespace] = namespace if namespace
13
14
 
14
15
  datatable.view ||= self
15
16
 
@@ -187,9 +187,3 @@ module Effective
187
187
 
188
188
  end
189
189
  end
190
-
191
- # [
192
- # [1, 'title 1'],
193
- # [2, 'title 2'],
194
- # [3, 'title 3']
195
- # ]
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.8.15'.freeze
2
+ VERSION = '4.8.16'.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.8.15
4
+ version: 4.8.16
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: 2021-01-21 00:00:00.000000000 Z
11
+ date: 2021-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -129,11 +129,9 @@ files:
129
129
  - app/assets/stylesheets/effective_datatables.scss
130
130
  - app/assets/stylesheets/effective_datatables/_overrides.bootstrap4.scss
131
131
  - app/controllers/effective/datatables_controller.rb
132
- - app/datatables/effective_style_guide_datatable.rb
133
132
  - app/helpers/effective_datatables_controller_helper.rb
134
133
  - app/helpers/effective_datatables_helper.rb
135
134
  - app/helpers/effective_datatables_private_helper.rb
136
- - app/models/effective/access_denied.rb
137
135
  - app/models/effective/datatable.rb
138
136
  - app/models/effective/datatable_column.rb
139
137
  - app/models/effective/datatable_column_tool.rb
@@ -163,7 +161,6 @@ files:
163
161
  - app/views/effective/datatables/_resource_column.html.haml
164
162
  - app/views/effective/datatables/_spacer_template.html
165
163
  - app/views/effective/datatables/index.html.haml
166
- - app/views/effective/style_guide/_effective_datatables.html.haml
167
164
  - config/effective_datatables.rb
168
165
  - config/locales/en.yml
169
166
  - config/locales/es.yml
@@ -1,45 +0,0 @@
1
- class EffectiveStyleGuideDatatable < Effective::Datatable
2
- datatable do
3
- length 10
4
-
5
- col :id
6
- col :material, search: { collection: ['Stainless Steel', 'Copper', 'Cast Iron', 'Composite'] }
7
- col :bowl, search: { collection: ['Single Bowl', 'Double Bowl', 'Triple Bowl'] }
8
- col :name
9
- col :date, as: :date
10
- end
11
-
12
- # Set the permission check to the same as Effective::StyleGuide
13
- def collection_class
14
- defined?(Effective::StyleGuide) ? Effective::StyleGuide : super
15
- end
16
-
17
- collection do
18
- now = Time.zone.now
19
- [
20
- [1, 'Stainless Steel', 'Single Bowl', 'KOHLER Staccato', (now + 1.day)],
21
- [2, 'Stainless Steel', 'Double Bowl', 'KOHLER Vault Undercounter', (now + 1.day)],
22
- [3, 'Stainless Steel', 'Triple Bowl', 'KRAUS All-In-One', (now + 1.day)],
23
- [4, 'Stainless Steel', 'Single Bowl', 'KOHLER Vault Dual Mount', (now + 1.day)],
24
- [5, 'Stainless Steel', 'Single Bowl', 'KRAUS All-In-One Undermount', (now + 2.days)],
25
- [6, 'Stainless Steel', 'Double Bowl', 'Glacier Bay All-in-One', (now + 2.days)],
26
- [7, 'Stainless Steel', 'Single Bowl', 'Elkay Neptune', (now + 2.days)],
27
- [8, 'Copper', 'Single Bowl', 'ECOSINKS Apron Front Dual Mount', (now + 2.days)],
28
- [9, 'Copper', 'Double Bowl', 'ECOSINKS Dual Mount Front Hammered', (now + 2.days)],
29
- [10, 'Copper', 'Triple Bowl', 'Glarier Bay Undermount', (now + 3.days)],
30
- [11, 'Copper', 'Single Bowl', 'Whitehaus Undermount', (now + 3.days)],
31
- [12, 'Copper', 'Double Bowl', 'Belle Foret Apron Front', (now + 3.days)],
32
- [13, 'Copper', 'Double Bowl', 'Pegasus Dual Mount', (now + 3.days)],
33
- [14, 'Cast Iron', 'Double Bowl', 'KOHLER Whitehaven', (now + 3.days)],
34
- [15, 'Cast Iron', 'Triple Bowl', 'KOHLER Hartland', (now + 3.days)],
35
- [16, 'Cast Iron', 'Single Bowl', 'KOHLER Cape Dory Undercounter', (now + 4.days)],
36
- [17, 'Cast Iron', 'Double Bowl', 'KOLER Bakersfield', (now + 4.days)],
37
- [18, 'Cast Iron', 'Double Bowl', 'American Standard Offset', (now + 4.days)],
38
- [19, 'Cast Iron', 'Single Bowl', 'Brookfield Top', (now + 4.days)],
39
- [20, 'Composite', 'Single Bowl', 'Blanco Diamond Undermount', (now + 5.days)],
40
- [21, 'Composite', 'Double Bowl', 'Mont Blanc Waterbrook', (now + 5.days)],
41
- [22, 'Composite', 'Triple Bowl', 'Pegasus Triple Mount', (now + 5.days)],
42
- [23, 'Composite', 'Single Bowl', 'Swanstone Dual Mount', (now + 5.days)]
43
- ]
44
- end
45
- end
@@ -1,17 +0,0 @@
1
- unless defined?(Effective::AccessDenied)
2
- module Effective
3
- class AccessDenied < StandardError
4
- attr_reader :action, :subject
5
-
6
- def initialize(message = nil, action = nil, subject = nil)
7
- @message = message
8
- @action = action
9
- @subject = subject
10
- end
11
-
12
- def to_s
13
- @message || I18n.t(:'unauthorized.default', :default => 'Access Denied')
14
- end
15
- end
16
- end
17
- end
@@ -1 +0,0 @@
1
- = render_datatable(EffectiveStyleGuideDatatable.new)