jquery-datatables 1.10.17 → 1.10.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +26 -9
  4. data/app/assets/javascripts/datatables/dataTables.bootstrap4.js +2 -2
  5. data/app/assets/javascripts/datatables/dataTables.dataTables.js +37 -0
  6. data/app/assets/javascripts/datatables/dataTables.semanticui.js +7 -3
  7. data/app/assets/javascripts/datatables/jquery.dataTables.js +3 -3
  8. data/app/assets/javascripts/datatables/plugins/api/average.js +0 -1
  9. data/app/assets/javascripts/datatables/plugins/api/sum.js +9 -10
  10. data/app/assets/javascripts/datatables/plugins/pagination/input.js +203 -203
  11. data/app/assets/javascripts/datatables/plugins/search/{alphabetSearch.js → dataTables.alphabetSearch.js} +81 -50
  12. data/app/assets/javascripts/datatables/plugins/sorting/currency.js +36 -0
  13. data/app/assets/javascripts/datatables/plugins/sorting/date-uk.js +42 -0
  14. data/app/assets/javascripts/datatables/plugins/sorting/file-size.js +2 -1
  15. data/app/assets/javascripts/datatables/plugins/sorting/formatted-numbers.js +40 -0
  16. data/app/assets/javascripts/datatables/plugins/sorting/ip-address.js +74 -73
  17. data/app/assets/javascripts/datatables/plugins/sorting/num-html.js +38 -0
  18. data/app/assets/javascripts/datatables/plugins/sorting/numeric-comma.js +37 -0
  19. data/app/assets/javascripts/datatables/plugins/type-detection/currency.js +40 -0
  20. data/app/assets/javascripts/datatables/plugins/type-detection/date-uk.js +19 -0
  21. data/app/assets/javascripts/datatables/plugins/type-detection/file-size.js +20 -0
  22. data/app/assets/javascripts/datatables/plugins/type-detection/formatted-num.js +28 -0
  23. data/app/assets/javascripts/datatables/plugins/type-detection/ip-address.js +18 -0
  24. data/app/assets/javascripts/datatables/plugins/type-detection/num-html.js +56 -0
  25. data/app/assets/javascripts/datatables/plugins/type-detection/numeric-comma.js +40 -0
  26. data/app/assets/stylesheets/datatables/dataTables.bootstrap4.scss +1 -1
  27. data/app/assets/stylesheets/datatables/dataTables.semanticui.scss +1 -1
  28. data/app/assets/stylesheets/datatables/plugins/search/dataTables.alphabetSearch.bootstrap.css +53 -0
  29. data/app/assets/stylesheets/datatables/plugins/search/dataTables.alphabetSearch.css +83 -0
  30. data/jquery-datatables.gemspec +3 -5
  31. data/lib/generators/jquery/datatables/templates/javascripts/initializer.js.tt +11 -0
  32. data/lib/generators/jquery/datatables/templates/views/index.html.erb +1 -1
  33. data/lib/generators/jquery/datatables/templates/views/index.html.haml +12 -0
  34. data/lib/jquery-datatables/version.rb +1 -1
  35. metadata +19 -18
  36. data/app/assets/stylesheets/datatables/plugins/search/alphabetSearch.css +0 -43
@@ -18,12 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
-
22
21
  spec.add_runtime_dependency 'sass', '>= 3.5.2'
23
22
  spec.add_runtime_dependency 'autoprefixer-rails', '>= 6.0.3'
24
-
25
- spec.add_development_dependency 'sprockets-rails', '~> 2.3'
23
+
26
24
  spec.add_development_dependency 'jquery-rails', '~> 3.1'
27
- spec.add_development_dependency "bundler", "~> 1.7"
28
- spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency 'bundler', '~> 1.7'
26
+ spec.add_development_dependency 'rake', '~> 10.0'
29
27
  end
@@ -23,8 +23,19 @@ $(document).on('preInit.dt', function(e, settings) {
23
23
  });
24
24
 
25
25
 
26
+ // init on turbolinks load
26
27
  $(document).on('turbolinks:load', function() {
27
28
  if (!$.fn.DataTable.isDataTable("table[id^=dttb-]")) {
28
29
  $("table[id^=dttb-]").DataTable();
29
30
  }
30
31
  });
32
+
33
+ // turbolinks cache fix
34
+ $(document).on('turbolinks:before-cache', function() {
35
+ var dataTable = $($.fn.dataTable.tables(true)).DataTable();
36
+ if (dataTable !== null) {
37
+ dataTable.clear();
38
+ dataTable.destroy();
39
+ return dataTable = null;
40
+ }
41
+ });
@@ -1,6 +1,6 @@
1
1
  <h1><%= plural_table_name.titleize %></h1>
2
2
 
3
- <table class="responsive nowrap table table-hover" id="dttb-<%= plural_table_name %>" data-sort="true" data-source="#{url_for(format: :json)}">
3
+ <table class="responsive nowrap table table-hover" id="dttb-<%= plural_table_name %>" data-sort="true" data-source="<%%= url_for(format: :json)%>">
4
4
  <thead>
5
5
  <tr>
6
6
  <% attributes.reject(&:password_digest?).each do |attribute| -%>
@@ -0,0 +1,12 @@
1
+ h1 Listing <%= plural_table_name %>
2
+
3
+ table#dttb.responsive.nowrap.table.table-hover data-sort="true" data-source="#{url_for(format: :json)}"
4
+ thead
5
+ tr
6
+ <% attributes.reject(&:password_digest?).each do |attribute| -%>
7
+ th data-data="<%= attribute.name %>" <%= attribute.human_name %>
8
+ <% end -%>
9
+ th data-data="url" data-orderable="false" data-class-name="all" data-searchable="false" class="skip-export" width="100px"
10
+
11
+
12
+ = link_to 'New <%= human_name %>', new_<%= singular_table_name %>_path
@@ -1,6 +1,6 @@
1
1
  module Jquery
2
2
  module Datatables
3
- VERSION = "1.10.17"
3
+ VERSION = "1.10.18"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.17
4
+ version: 1.10.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - mkhairi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-21 00:00:00.000000000 Z
11
+ date: 2018-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 6.0.3
41
- - !ruby/object:Gem::Dependency
42
- name: sprockets-rails
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2.3'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.3'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: jquery-rails
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -114,6 +100,7 @@ files:
114
100
  - app/assets/javascripts/datatables/dataTables.bootstrap.js
115
101
  - app/assets/javascripts/datatables/dataTables.bootstrap2.js
116
102
  - app/assets/javascripts/datatables/dataTables.bootstrap4.js
103
+ - app/assets/javascripts/datatables/dataTables.dataTables.js
117
104
  - app/assets/javascripts/datatables/dataTables.foundation.js
118
105
  - app/assets/javascripts/datatables/dataTables.jqueryui.js
119
106
  - app/assets/javascripts/datatables/dataTables.material.js
@@ -204,9 +191,21 @@ files:
204
191
  - app/assets/javascripts/datatables/plugins/api/average.js
205
192
  - app/assets/javascripts/datatables/plugins/api/sum.js
206
193
  - app/assets/javascripts/datatables/plugins/pagination/input.js
207
- - app/assets/javascripts/datatables/plugins/search/alphabetSearch.js
194
+ - app/assets/javascripts/datatables/plugins/search/dataTables.alphabetSearch.js
195
+ - app/assets/javascripts/datatables/plugins/sorting/currency.js
196
+ - app/assets/javascripts/datatables/plugins/sorting/date-uk.js
208
197
  - app/assets/javascripts/datatables/plugins/sorting/file-size.js
198
+ - app/assets/javascripts/datatables/plugins/sorting/formatted-numbers.js
209
199
  - app/assets/javascripts/datatables/plugins/sorting/ip-address.js
200
+ - app/assets/javascripts/datatables/plugins/sorting/num-html.js
201
+ - app/assets/javascripts/datatables/plugins/sorting/numeric-comma.js
202
+ - app/assets/javascripts/datatables/plugins/type-detection/currency.js
203
+ - app/assets/javascripts/datatables/plugins/type-detection/date-uk.js
204
+ - app/assets/javascripts/datatables/plugins/type-detection/file-size.js
205
+ - app/assets/javascripts/datatables/plugins/type-detection/formatted-num.js
206
+ - app/assets/javascripts/datatables/plugins/type-detection/ip-address.js
207
+ - app/assets/javascripts/datatables/plugins/type-detection/num-html.js
208
+ - app/assets/javascripts/datatables/plugins/type-detection/numeric-comma.js
210
209
  - app/assets/media/swf/flashExport.swf
211
210
  - app/assets/stylesheets/datatables/dataTables.bootstrap.scss
212
211
  - app/assets/stylesheets/datatables/dataTables.bootstrap2.scss
@@ -285,7 +284,8 @@ files:
285
284
  - app/assets/stylesheets/datatables/extensions/Select/select.jqueryui.scss
286
285
  - app/assets/stylesheets/datatables/extensions/Select/select.semanticui.scss
287
286
  - app/assets/stylesheets/datatables/jquery.dataTables.scss
288
- - app/assets/stylesheets/datatables/plugins/search/alphabetSearch.css
287
+ - app/assets/stylesheets/datatables/plugins/search/dataTables.alphabetSearch.bootstrap.css
288
+ - app/assets/stylesheets/datatables/plugins/search/dataTables.alphabetSearch.css
289
289
  - jquery-datatables.gemspec
290
290
  - lib/generators/jquery/datatables/install_generator.rb
291
291
  - lib/generators/jquery/datatables/templates/javascripts/bootstrap.js.tt
@@ -306,6 +306,7 @@ files:
306
306
  - lib/generators/jquery/datatables/templates/stylesheets/semanticui.scss.tt
307
307
  - lib/generators/jquery/datatables/templates/stylesheets/uikit.scss.tt
308
308
  - lib/generators/jquery/datatables/templates/views/index.html.erb
309
+ - lib/generators/jquery/datatables/templates/views/index.html.haml
309
310
  - lib/generators/jquery/datatables/templates/views/index.html.slim
310
311
  - lib/generators/jquery/datatables/templates/views/index.json.jbuilder
311
312
  - lib/jquery-datatables.rb
@@ -1,43 +0,0 @@
1
- div.alphabet {
2
- position: relative;
3
- display: table;
4
- width: 100%;
5
- margin-bottom: 1em;
6
- }
7
-
8
- div.alphabet span {
9
- display: table-cell;
10
- color: #3174c7;
11
- cursor: pointer;
12
- text-align: center;
13
- width: 3.5%;
14
- }
15
-
16
- div.alphabet span:hover {
17
- text-decoration: underline;
18
- }
19
-
20
- div.alphabet span.active {
21
- color: black;
22
- }
23
-
24
- div.alphabet span.empty {
25
- color: red;
26
- }
27
-
28
- div.alphabet_info {
29
- display: block;
30
- position: absolute;
31
- background-color: #111;
32
- border-radius: 3px;
33
- color: white;
34
- top: 2em;
35
- height: 1.8em;
36
- padding-top: 0.4em;
37
- text-align: center;
38
- z-index: 1;
39
- }
40
-
41
- tr.alphabet_group, tr.alphabet_group:hover {
42
- background-color: rgba(0,0,0,0.15) !important;
43
- }