smart_table 0.0.10 → 0.0.11

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: 02b6b707547d6895fed29be80288c8bb004904a36bfd14b5aae306c52563556e
4
- data.tar.gz: c83da251e1459742653d182e4cbd95a89b8f3be4725563311a403632768573a5
3
+ metadata.gz: f9cea6bc67e401e50f426c16511c169bb200d70e0cd62a12bb631d1b53b6c4d0
4
+ data.tar.gz: 3347a4426f70eb1d77404177cb9825b836351e54f9dfaf85b048191668889e3e
5
5
  SHA512:
6
- metadata.gz: fccaee458a10f48c746cb7cb624c7ff2abc08aeb7de123f138e642b505c18d7dad6d7bf937f3bc0f08b1058b5c3cdf56bcb38b1c9db2bc9ec6ff18fc1882b676
7
- data.tar.gz: 757ba343b60f07cd1f77fda2e0138216de563bdfea3ccd2f517a093d0e68758d445bf86b748d7a65bca4d35bbb82ee3bb5418766b6a04750a8b8f17fc336f7dd
6
+ metadata.gz: b26e856a7fce2cbd9768875d7c0495a1b8e876f29d95059e9412eeb1e05f0127c859624db21c5a8a5ad70cde8152584a3c10736c218544e05b9324b7c94bacfd
7
+ data.tar.gz: b251447515d889366ec6b4d46028076e5f5a9615421b61e39f29c511a05f3c0f34f684b57e18db07c7a6bda96f67c309f06c00d287fbe29c5ce2d29e16ba11fc
data/README.md CHANGED
@@ -191,3 +191,5 @@ $(document).on('ready smart_table:ajax_update', function(event) {
191
191
  // do whatever here
192
192
  });
193
193
  ```
194
+
195
+ Also, if you use turbolinks, consider listening to the event `turbolinks:load` too, so your javascript code will also run when the page is first loaded via a turbolinks visit.
@@ -45,7 +45,7 @@ SmartTable.setupSmartTableInScope = function(selector) {
45
45
  // On page load, we setup all JS elements on the whole document
46
46
  SmartTable.onPageLoad(function(event) {
47
47
  SmartTable.setupSmartTableInScope();
48
- })
48
+ });
49
49
 
50
50
  // Gets the current page url and merges some query parameters to this url. If a
51
51
  // certain parameter already exists, it is overwritten. If the value of the
@@ -38,7 +38,7 @@ module SmartTable
38
38
 
39
39
  html_elements << content_tag(:div, class: 'text-center') do
40
40
  # call to Kaminari view helper
41
- page_entries_info(paginatable_array, entry_name: record_model_name.pluralize.downcase)
41
+ page_entries_info(paginatable_array, entry_name: record_model_name.pluralize(I18n.locale).downcase)
42
42
  end
43
43
 
44
44
  html_elements.join.html_safe
@@ -75,14 +75,15 @@ module SmartTable
75
75
  end
76
76
 
77
77
  link_url = current_request_url_with_merged_query_params(SORT_PARAM => "#{attribute} #{next_sort_order}")
78
- link_to link_url, class: 'smart-table-link', data: {smart_table_remote_link: (true if get_cached_smart_table_params.remote)} do
78
+ link_class = "smart-table-link smart-table-sort-link smart-table-sort-link-#{attribute}"
79
+ link_to link_url, class: link_class, data: {smart_table_remote_link: (true if get_cached_smart_table_params.remote)} do
79
80
  text.html_safe + ' ' + (
80
81
  if current_sort_attribute == attribute && current_sort_order == 'asc'
81
- "<span class='fa fa-sort-down'></span>".html_safe
82
+ "<span class='fa fa-sort-down smart-link-sort-arrow-asc'></span>".html_safe
82
83
  elsif current_sort_attribute == attribute && current_sort_order == 'desc'
83
- "<span class='fa fa-sort-up'></span>".html_safe
84
+ "<span class='fa fa-sort-up smart-link-sort-arrow-desc'></span>".html_safe
84
85
  else
85
- "<span class='fa fa-sort'></span>".html_safe
86
+ "<span class='fa fa-sort smart-link-sort-arrow-unsorted'></span>".html_safe
86
87
  end
87
88
  )
88
89
  end
@@ -124,7 +125,7 @@ module SmartTable
124
125
 
125
126
  content_tag(:div, class: 'text-center') do
126
127
  (
127
- record_model_name.pluralize + ' ' +
128
+ record_model_name.pluralize(I18n.locale) + ' ' +
128
129
  I18n.t('smart_table.per_page') + ': ' +
129
130
  page_sizes.map do |page_size|
130
131
  human_page_size = (page_size == SHOW_ALL ? I18n.t('smart_table.show_all') : page_size.to_s)
@@ -1,3 +1,3 @@
1
1
  module SmartTable
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrique Gubert
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -186,6 +186,7 @@ files:
186
186
  - "./lib/smart_table/config.rb"
187
187
  - "./lib/smart_table/engine.rb"
188
188
  - "./lib/smart_table/version.rb"
189
+ - "./smart_table-0.0.10.gem"
189
190
  - "./smart_table-0.0.7.gem"
190
191
  - "./smart_table-0.0.8.gem"
191
192
  - "./smart_table-0.0.9.gem"