ct_table_for 1.0.3 → 1.0.4

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
  SHA256:
3
- metadata.gz: 8523e2f6dcca42b3caa3386475ecfbba0ade1498db465cae2f2b34fb72744fd9
4
- data.tar.gz: b8645c2b0e39f1e95f2cfbcfdbc843b1f06742ae6f860786733a4d632b1e141c
3
+ metadata.gz: 35f88964e733b7e5d6a5c549a266c35cefd54971fe00937114f6cd70b8cd3dc0
4
+ data.tar.gz: 1e941e3020dfd09e63a0f8d7d776f6bbe8b4556ec96b568d62d258a724608028
5
5
  SHA512:
6
- metadata.gz: 36d7fa6124d9c5770c4d962a724aeb1610143e1e928893e68f01c9028d67f65cd2e6854474b70fcc5b11b4e2cb8a59a26fbfe3c67ae9388eee364943720a864b
7
- data.tar.gz: 0e663abfedee72114e061fdcf240ad3111062601e4f8f08a5c84252ef2e98ccbc65f9950cd0dedd491b70f60e85c1938176ec829037d08b5cdb5d465ed7bbe95
6
+ metadata.gz: 1ed74339d7b949db47cfdf9645910924063e44597745413c835d1f02b6f679532a679e882cd06484ce56a9182a44c6691fe9529c78305bb4af76942e15692ee7
7
+ data.tar.gz: 7c2c694adff037159c3e643bc49581fff62ce7ae052b250acc345f77570ef8776f7053f1049d61c59082cce0ffb41368329a28361961770edb5272a85d7a1995
data/README.md CHANGED
@@ -84,6 +84,7 @@ CtTableFor.setup do |config|
84
84
  config.table_for_truncate_length = 50
85
85
  config.table_for_truncate_separator = " "
86
86
  config.table_for_truncate_omission = "..."
87
+ config.table_for_td_default_prefix_class = "td-item"
87
88
  end
88
89
  ```
89
90
  You can also define the breakpoint in your `sass` before importing `table_for`:
@@ -110,7 +110,7 @@ module CtTableFor
110
110
  nil
111
111
  end
112
112
 
113
- html << %Q{<td data-title="#{model.human_attribute_name("#{attribute}")}">}
113
+ html << %Q{<td data-title="#{model.human_attribute_name("#{attribute}")}" class="#{CtTableFor.table_for_td_default_prefix_class}-#{attribute}">}
114
114
  case value
115
115
  when NilClass
116
116
  html << %Q{<i class="fa fa-minus text-muted"></i>}
@@ -179,7 +179,7 @@ module CtTableFor
179
179
  def table_for_actions(record, options: {} )
180
180
  return "" if options[:actions].blank?
181
181
  html = ""
182
- html << %Q{<td data-link-enabled="false">}
182
+ html << %Q{<td data-link-enabled="false" class="#{CtTableFor.table_for_td_default_prefix_class}-actions">}
183
183
  html << %Q{<div class="btn-group btn-group-sm" role="group" aria-label="#{I18n.t(:actions, scope: [:table_for]).capitalize}">}
184
184
  nesting = (options[:actions][:premodel] || []) + [record]
185
185
  buttons = options[:actions][:buttons].map{ |b| b.split("|")}
@@ -12,6 +12,7 @@ module CtTableFor
12
12
  mattr_accessor :table_for_truncate_length
13
13
  mattr_accessor :table_for_truncate_separator
14
14
  mattr_accessor :table_for_truncate_omission
15
+ mattr_accessor :table_for_td_default_prefix_class
15
16
 
16
17
  self.table_for_wrapper_default_class = "table-responsive"
17
18
  self.table_for_default_class = "table table-striped table-bordered table-condensed table-hover"
@@ -25,6 +26,7 @@ module CtTableFor
25
26
  self.table_for_truncate_length = 50
26
27
  self.table_for_truncate_separator = " "
27
28
  self.table_for_truncate_omission = "..."
29
+ self.table_for_td_default_prefix_class = "td-item"
28
30
  end
29
31
 
30
32
  # this function maps the vars from your app into your engine
@@ -1,3 +1,3 @@
1
1
  module CtTableFor
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ct_table_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustí B.R.
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-08-27 00:00:00.000000000 Z
13
+ date: 2019-09-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails