jquery-datatables 1.10.16 → 1.10.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -0
- data/app/assets/javascripts/datatables/dataTables.foundation.js +2 -2
- data/app/assets/javascripts/datatables/dataTables.uikit.js +1 -1
- data/app/assets/javascripts/datatables/extensions/AutoFill/autoFill.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/AutoFill/dataTables.autoFill.js +52 -12
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.colVis.js +4 -8
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.flash.js +17 -7
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.html5.js +33 -19
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.print.js +14 -3
- data/app/assets/javascripts/datatables/extensions/Buttons/dataTables.buttons.js +120 -53
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/dataTables.colReorder.js +76 -13
- data/app/assets/javascripts/datatables/extensions/FixedColumns/dataTables.fixedColumns.js +23 -17
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/dataTables.fixedHeader.js +26 -11
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/dataTables.keyTable.js +141 -75
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Responsive/dataTables.responsive.js +64 -26
- data/app/assets/javascripts/datatables/extensions/Responsive/responsive.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/dataTables.rowGroup.js +45 -13
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/dataTables.rowReorder.js +24 -6
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/dataTables.scroller.js +93 -87
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.semanticui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/dataTables.select.js +41 -14
- data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.semanticui.js +38 -0
- data/app/assets/javascripts/datatables/jquery.dataTables.js +125 -72
- data/app/assets/stylesheets/datatables/dataTables.bootstrap4.scss +4 -0
- data/app/assets/stylesheets/datatables/dataTables.foundation.scss +5 -5
- data/app/assets/stylesheets/datatables/dataTables.material.scss +1 -1
- data/app/assets/stylesheets/datatables/dataTables.uikit.scss +33 -22
- data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap.scss +9 -0
- data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap4.scss +9 -0
- data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.dataTables.scss +3 -2
- data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.jqueryui.scss +2 -4
- data/app/assets/stylesheets/datatables/extensions/Buttons/mixins.scss +5 -0
- data/app/assets/stylesheets/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.scss +3 -6
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap4.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.dataTables.scss +6 -5
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.foundation.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.semanticui.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap4.scss +2 -4
- data/app/assets/stylesheets/datatables/jquery.dataTables.scss +5 -5
- data/jquery-datatables.gemspec +4 -2
- data/lib/generators/jquery/datatables/install_generator.rb +22 -6
- data/lib/generators/jquery/datatables/templates/{bootstrap.js.tt → javascripts/bootstrap.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap4.js.tt → javascripts/bootstrap4.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{foundation.js.tt → javascripts/foundation.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/javascripts/initializer.js.tt +30 -0
- data/lib/generators/jquery/datatables/templates/{jqueryui.js.tt → javascripts/jqueryui.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{material.js.tt → javascripts/material.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{regular.js.tt → javascripts/regular.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{semanticui.js.tt → javascripts/semanticui.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{uikit.js.tt → javascripts/uikit.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap.scss.tt → stylesheets/bootstrap.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap4.scss.tt → stylesheets/bootstrap4.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{foundation.scss.tt → stylesheets/foundation.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{jqueryui.scss.tt → stylesheets/jqueryui.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{material.scss.tt → stylesheets/material.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{regular.scss.tt → stylesheets/regular.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{semanticui.scss.tt → stylesheets/semanticui.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{uikit.scss.tt → stylesheets/uikit.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/views/index.html.erb +17 -0
- data/lib/generators/jquery/datatables/templates/views/index.html.slim +12 -0
- data/lib/generators/jquery/datatables/templates/views/index.json.jbuilder +10 -0
- data/lib/jquery-datatables.rb +53 -5
- data/lib/jquery-datatables/engine.rb +2 -0
- data/lib/jquery-datatables/version.rb +1 -1
- metadata +86 -31
@@ -111,19 +111,19 @@ table.dataTable thead {
|
|
111
111
|
}
|
112
112
|
|
113
113
|
.sorting {
|
114
|
-
background-image:
|
114
|
+
background-image: url('../images/sort_both.png');
|
115
115
|
}
|
116
116
|
.sorting_asc {
|
117
|
-
background-image:
|
117
|
+
background-image: url('../images/sort_asc.png');
|
118
118
|
}
|
119
119
|
.sorting_desc {
|
120
|
-
background-image:
|
120
|
+
background-image: url('../images/sort_desc.png');
|
121
121
|
}
|
122
122
|
.sorting_asc_disabled {
|
123
|
-
background-image:
|
123
|
+
background-image: url('../images/sort_asc_disabled.png');
|
124
124
|
}
|
125
125
|
.sorting_desc_disabled {
|
126
|
-
background-image:
|
126
|
+
background-image: url('../images/sort_desc_disabled.png');
|
127
127
|
}
|
128
128
|
}
|
129
129
|
|
@@ -1,9 +1,6 @@
|
|
1
1
|
|
2
2
|
table.dataTable {
|
3
3
|
clear: both;
|
4
|
-
margin-top: 6px !important;
|
5
|
-
margin-bottom: 6px !important;
|
6
|
-
max-width: none !important;
|
7
4
|
|
8
5
|
td,
|
9
6
|
th {
|
@@ -90,42 +87,56 @@ div.dataTables_wrapper {
|
|
90
87
|
}
|
91
88
|
|
92
89
|
|
93
|
-
// Sorting
|
90
|
+
// Sorting - using :before and :after with UTF8 characters
|
94
91
|
table.dataTable thead {
|
95
92
|
> tr > th,
|
96
93
|
> tr > td {
|
97
|
-
position: relative;
|
98
|
-
|
99
94
|
&.sorting_asc,
|
100
95
|
&.sorting_desc,
|
101
96
|
&.sorting {
|
102
97
|
padding-right: 30px;
|
103
98
|
}
|
104
99
|
|
105
|
-
|
106
|
-
|
107
|
-
|
100
|
+
&:active {
|
101
|
+
outline: none;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
.sorting,
|
106
|
+
.sorting_asc,
|
107
|
+
.sorting_desc,
|
108
|
+
.sorting_asc_disabled,
|
109
|
+
.sorting_desc_disabled {
|
110
|
+
cursor: pointer;
|
111
|
+
position: relative;
|
112
|
+
|
113
|
+
&:before,
|
114
|
+
&:after {
|
108
115
|
position: absolute;
|
109
|
-
|
110
|
-
right: 8px;
|
116
|
+
bottom: 1.2em;
|
111
117
|
display: block;
|
112
|
-
|
118
|
+
opacity: 0.3;
|
113
119
|
}
|
114
120
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
font-size: 0.8em;
|
119
|
-
padding-top: 0.12em;
|
121
|
+
&:before {
|
122
|
+
right: 1em;
|
123
|
+
content: "\2191"; // up arrow - ascending
|
120
124
|
}
|
121
125
|
|
122
|
-
|
123
|
-
|
126
|
+
&:after {
|
127
|
+
right: 0.5em;
|
128
|
+
content: "\2193"; // down arrow - descending
|
124
129
|
}
|
130
|
+
}
|
125
131
|
|
126
|
-
|
127
|
-
|
128
|
-
|
132
|
+
.sorting_asc:before,
|
133
|
+
.sorting_desc:after {
|
134
|
+
opacity: 1;
|
135
|
+
}
|
136
|
+
|
137
|
+
.sorting_asc_disabled:before,
|
138
|
+
.sorting_desc_disabled:after {
|
139
|
+
opacity: 0;
|
129
140
|
}
|
130
141
|
}
|
131
142
|
|
@@ -9,11 +9,13 @@ a.dt-button {
|
|
9
9
|
display: inline-block;
|
10
10
|
box-sizing: border-box;
|
11
11
|
margin-right: 0.333em;
|
12
|
+
margin-bottom: 0.333em;
|
12
13
|
padding: 0.5em 1em;
|
13
14
|
border: 1px solid #999;
|
14
15
|
border-radius: 2px;
|
15
16
|
cursor: pointer;
|
16
17
|
font-size: 0.88em;
|
18
|
+
line-height: 1.6em;
|
17
19
|
color: black;
|
18
20
|
//box-shadow: 1px 1px 3px #ccc;
|
19
21
|
white-space: nowrap;
|
@@ -91,14 +93,13 @@ div.dt-button-collection {
|
|
91
93
|
border-radius: 5px;
|
92
94
|
box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
|
93
95
|
|
94
|
-
z-index: 2002;
|
95
|
-
|
96
96
|
button.dt-button,
|
97
97
|
div.dt-button,
|
98
98
|
a.dt-button {
|
99
99
|
position: relative;
|
100
100
|
left: 0;
|
101
101
|
right: 0;
|
102
|
+
width: 100%;
|
102
103
|
|
103
104
|
display: block;
|
104
105
|
float: none;
|
@@ -48,14 +48,12 @@ div.dt-button-collection {
|
|
48
48
|
position: relative;
|
49
49
|
left: 0;
|
50
50
|
right: 0;
|
51
|
+
width: 100%;
|
51
52
|
|
52
53
|
display: block;
|
53
54
|
float: none;
|
54
55
|
margin-right: 0;
|
55
|
-
|
56
|
-
&:last-child {
|
57
|
-
margin-bottom: 4px;
|
58
|
-
}
|
56
|
+
margin-bottom: 4px;
|
59
57
|
|
60
58
|
&:hover > span {
|
61
59
|
background-color: rgba(0, 0, 0, 0.05);
|
@@ -1,11 +1,8 @@
|
|
1
1
|
|
2
2
|
@import 'fixedColumns.bootstrap.scss';
|
3
3
|
|
4
|
-
// Bootstrap 4 uses rgba for the table background colours,
|
5
|
-
// block
|
6
|
-
table.dataTable.table-striped.DTFC_Cloned tbody
|
7
|
-
background-color: #F3F3F3;
|
8
|
-
}
|
9
|
-
table.dataTable.table-striped.DTFC_Cloned tbody tr:nth-of-type(even) {
|
4
|
+
// Bootstrap 4 uses rgba for the table row background colours, and as FixedColumns
|
5
|
+
// layers the elements on top of each other, we need to block out the fixed area.
|
6
|
+
table.dataTable.table-striped.DTFC_Cloned tbody {
|
10
7
|
background-color: white;
|
11
8
|
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
|
2
|
-
$keytable-focus:
|
2
|
+
$keytable-focus: #3366FF !default;
|
3
3
|
|
4
4
|
table.dataTable {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
tbody {
|
6
|
+
th.focus,
|
7
|
+
td.focus {
|
8
|
+
box-shadow: inset 0 0 1px 2px $keytable-focus;
|
9
|
+
}
|
9
10
|
}
|
10
11
|
}
|
@@ -114,19 +114,19 @@ table.dataTable {
|
|
114
114
|
}
|
115
115
|
|
116
116
|
.sorting {
|
117
|
-
background-image:
|
117
|
+
background-image: url('../images/sort_both.png');
|
118
118
|
}
|
119
119
|
.sorting_asc {
|
120
|
-
background-image:
|
120
|
+
background-image: url('../images/sort_asc.png');
|
121
121
|
}
|
122
122
|
.sorting_desc {
|
123
|
-
background-image:
|
123
|
+
background-image: url('../images/sort_desc.png');
|
124
124
|
}
|
125
125
|
.sorting_asc_disabled {
|
126
|
-
background-image:
|
126
|
+
background-image: url('../images/sort_asc_disabled.png');
|
127
127
|
}
|
128
128
|
.sorting_desc_disabled {
|
129
|
-
background-image:
|
129
|
+
background-image: url('../images/sort_desc_disabled.png');
|
130
130
|
}
|
131
131
|
}
|
132
132
|
}
|
data/jquery-datatables.gemspec
CHANGED
@@ -18,8 +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
|
-
spec.
|
21
|
+
|
22
|
+
spec.add_runtime_dependency 'sass', '>= 3.5.2'
|
23
|
+
spec.add_runtime_dependency 'autoprefixer-rails', '>= 6.0.3'
|
24
|
+
|
23
25
|
spec.add_development_dependency 'sprockets-rails', '~> 2.3'
|
24
26
|
spec.add_development_dependency 'jquery-rails', '~> 3.1'
|
25
27
|
spec.add_development_dependency "bundler", "~> 1.7"
|
@@ -9,6 +9,7 @@ module Jquery
|
|
9
9
|
argument :style, :type => :string, :default => 'regular'
|
10
10
|
# needed for thor templates
|
11
11
|
source_root File.expand_path("../templates", __FILE__)
|
12
|
+
class_option :template_engine, desc: 'Template engine to be invoked (erb, haml or slim).'
|
12
13
|
|
13
14
|
def add_assets
|
14
15
|
js_manifest = 'app/assets/javascripts/application.js'
|
@@ -16,17 +17,24 @@ module Jquery
|
|
16
17
|
scss_manifest = 'app/assets/stylesheets/application.scss'
|
17
18
|
js_strings = "//= require datatables\n"
|
18
19
|
|
19
|
-
insert_into_file js_manifest, js_strings, :after => "
|
20
|
+
insert_into_file js_manifest, js_strings, :after => "turbolinks\n" if File.exists?(js_manifest)
|
20
21
|
insert_css_strings(css_manifest) if File.exists?(css_manifest)
|
21
22
|
insert_scss_strings(scss_manifest) if File.exists?(scss_manifest)
|
22
|
-
|
23
|
+
copy_assets_file
|
24
|
+
append_global_initializer
|
25
|
+
end
|
26
|
+
|
27
|
+
def copy_scaffold_template
|
28
|
+
engine = options[:template_engine]
|
29
|
+
copy_file "views/index.html.#{engine}", "lib/templates/#{engine}/scaffold/index.html.#{engine}"
|
30
|
+
copy_file "views/index.json.jbuilder", "lib/templates//rails/jbuilder/index.json.jbuilder"
|
23
31
|
end
|
24
32
|
|
25
33
|
private
|
26
34
|
|
27
35
|
def insert_css_strings(css_manifest)
|
28
36
|
content = File.read(css_manifest)
|
29
|
-
css_strings = "
|
37
|
+
css_strings = "*= require datatables\n"
|
30
38
|
|
31
39
|
if requires_tree(content)
|
32
40
|
insert_into_file css_manifest, css_strings, :after => "require_tree .\n"
|
@@ -44,6 +52,13 @@ module Jquery
|
|
44
52
|
append_to_file scss_manifest, scss_strings
|
45
53
|
end
|
46
54
|
|
55
|
+
def append_global_initializer
|
56
|
+
init = File.expand_path(find_in_source_paths("javascripts/initializer.js.tt"))
|
57
|
+
content = File.read(init)
|
58
|
+
js_datatables = "app/assets/javascripts/datatables.js"
|
59
|
+
append_to_file js_datatables, content
|
60
|
+
end
|
61
|
+
|
47
62
|
def requires_tree(content)
|
48
63
|
content.match(/require_tree\s+\.\s*$/)
|
49
64
|
end
|
@@ -52,11 +67,12 @@ module Jquery
|
|
52
67
|
content.match(/require_self\s*$/)
|
53
68
|
end
|
54
69
|
|
55
|
-
def
|
56
|
-
template "
|
57
|
-
template "
|
70
|
+
def copy_assets_file
|
71
|
+
template "javascripts/#{style}.js.tt", "app/assets/javascripts/datatables.js"
|
72
|
+
template "stylesheets/#{style}.scss.tt", "app/assets/stylesheets/datatables.scss"
|
58
73
|
end
|
59
74
|
|
75
|
+
|
60
76
|
end
|
61
77
|
end
|
62
78
|
end
|
data/lib/generators/jquery/datatables/templates/{bootstrap.js.tt → javascripts/bootstrap.js.tt}
RENAMED
File without changes
|
data/lib/generators/jquery/datatables/templates/{bootstrap4.js.tt → javascripts/bootstrap4.js.tt}
RENAMED
File without changes
|
data/lib/generators/jquery/datatables/templates/{foundation.js.tt → javascripts/foundation.js.tt}
RENAMED
File without changes
|
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
//Global setting and initializer
|
4
|
+
|
5
|
+
$.extend( $.fn.dataTable.defaults, {
|
6
|
+
responsive: true,
|
7
|
+
pagingType: 'full',
|
8
|
+
//dom:
|
9
|
+
// "<'row'<'col-sm-4 text-left'f><'right-action col-sm-8 text-right'<'buttons'B> <'select-info'> >>" +
|
10
|
+
// "<'row'<'dttb col-12 px-0'tr>>" +
|
11
|
+
// "<'row'<'col-sm-12 table-footer'lip>>"
|
12
|
+
});
|
13
|
+
|
14
|
+
|
15
|
+
$(document).on('preInit.dt', function(e, settings) {
|
16
|
+
var api, table_id, url;
|
17
|
+
api = new $.fn.dataTable.Api(settings);
|
18
|
+
table_id = "#" + api.table().node().id;
|
19
|
+
url = $(table_id).data('source');
|
20
|
+
if (url) {
|
21
|
+
return api.ajax.url(url);
|
22
|
+
}
|
23
|
+
});
|
24
|
+
|
25
|
+
|
26
|
+
$(document).on('turbolinks:load', function() {
|
27
|
+
if (!$.fn.DataTable.isDataTable("table[id^=dttb-]")) {
|
28
|
+
$("table[id^=dttb-]").DataTable();
|
29
|
+
}
|
30
|
+
});
|
data/lib/generators/jquery/datatables/templates/{jqueryui.js.tt → javascripts/jqueryui.js.tt}
RENAMED
File without changes
|
data/lib/generators/jquery/datatables/templates/{material.js.tt → javascripts/material.js.tt}
RENAMED
File without changes
|
File without changes
|
data/lib/generators/jquery/datatables/templates/{semanticui.js.tt → javascripts/semanticui.js.tt}
RENAMED
File without changes
|
File without changes
|
data/lib/generators/jquery/datatables/templates/{bootstrap.scss.tt → stylesheets/bootstrap.scss.tt}
RENAMED
File without changes
|
File without changes
|