diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 93d205f3..dcb8b36b 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -649cb102e0ad7e006bb9287c4d4244b20ff20a41 +e2e28f03d36c2fe92e3eb0d031b3742eabca5bc0 diff --git a/examples/server_side/pipeline.html b/examples/server_side/pipeline.html index f3c635f8..8ece8ed0 100644 --- a/examples/server_side/pipeline.html +++ b/examples/server_side/pipeline.html @@ -95,7 +95,7 @@ $.fn.dataTable.pipeline = function ( opts ) { $.extend( request, conf.data ); } - settings.jqXHR = $.ajax( { + return $.ajax( { "type": conf.method, "url": conf.url, "data": request, @@ -276,7 +276,7 @@ $.fn.dataTable.pipeline = function ( opts ) { $.extend( request, conf.data ); } - settings.jqXHR = $.ajax( { + return $.ajax( { "type": conf.method, "url": conf.url, "data": request, diff --git a/examples/styling/material.html b/examples/styling/material.html index 10cf2b7a..28688432 100644 --- a/examples/styling/material.html +++ b/examples/styling/material.html @@ -5,7 +5,7 @@
The Javascript shown below is used to initialise the table shown in this example:
$(document).ready(function() {
$('#example').DataTable( {
+ autoWidth: false,
columnDefs: [
{
- targets: [ 0, 1, 2 ],
- className: 'mdl-data-table__cell--non-numeric'
+ targets: ['_all'],
+ className: 'mdc-data-table__cell'
}
]
} );
@@ -568,7 +570,7 @@ $(document).ready(function() {
-
https://cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.css
+ "https://cdnjs.cloudflare.com/ajax/libs/material-components-web/4.0.0/material-components-web.min.css">https://cdnjs.cloudflare.com/ajax/libs/material-components-web/4.0.0/material-components-web.min.css
-
../../media/css/dataTables.material.css
diff --git a/media/css/dataTables.material.css b/media/css/dataTables.material.css
index c00f2e90..86d6fa72 100644
--- a/media/css/dataTables.material.css
+++ b/media/css/dataTables.material.css
@@ -19,14 +19,53 @@ div.dataTables_wrapper div.dataTables_processing {
div.dataTables_wrapper div.dataTables_paginate {
text-align: right;
}
-div.dataTables_wrapper div.mdl-grid.dt-table {
+div.dataTables_wrapper div.mdc-grid.dt-table {
padding-top: 0;
padding-bottom: 0;
}
-div.dataTables_wrapper div.mdl-grid.dt-table > div.mdl-cell {
+div.dataTables_wrapper div.mdc-grid.dt-table > div.mdc-cell {
margin-top: 0;
margin-bottom: 0;
}
+div.dataTables_wrapper table.mdc-data-table__table {
+ table-layout: auto;
+}
+div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc {
+ padding-right: 30px;
+}
+div.dataTables_wrapper table.mdc-data-table__table thead tr th:active {
+ outline: none;
+}
+div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting {
+ cursor: pointer;
+ position: relative;
+}
+div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:before, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:after, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:before, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:after, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:before, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:after {
+ position: absolute;
+ display: block;
+ opacity: 0.3;
+ right: 1em;
+ line-height: 9px;
+ font-size: 0.9em;
+}
+div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:before, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:before, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:before {
+ bottom: 50%;
+ content: "\25B4";
+}
+div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:after, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:after, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:after {
+ top: 50%;
+ content: "\25BE";
+}
+div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:before, div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:after {
+ opacity: 0.8;
+}
+div.dataTables_wrapper .mdc-data-table__cell {
+ border: 1px solid rgba(0, 0, 0, 0.12);
+}
+div.dataTables_wrapper div.mdc-layout-grid {
+ margin: 0px;
+ padding: 5px;
+}
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > td.sorting_asc,
diff --git a/media/css/dataTables.material.min.css b/media/css/dataTables.material.min.css
index 5935ac4d..abcc1b66 100644
--- a/media/css/dataTables.material.min.css
+++ b/media/css/dataTables.material.min.css
@@ -1 +1 @@
-div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:10px;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;text-align:center}div.dataTables_wrapper div.dataTables_paginate{text-align:right}div.dataTables_wrapper div.mdl-grid.dt-table{padding-top:0;padding-bottom:0}div.dataTables_wrapper div.mdl-grid.dt-table>div.mdl-cell{margin-top:0;margin-bottom:0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:before,table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:11px;display:block;opacity:0.3;font-size:1.3em}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{right:0.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}
+div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:10px;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;text-align:center}div.dataTables_wrapper div.dataTables_paginate{text-align:right}div.dataTables_wrapper div.mdc-grid.dt-table{padding-top:0;padding-bottom:0}div.dataTables_wrapper div.mdc-grid.dt-table>div.mdc-cell{margin-top:0;margin-bottom:0}div.dataTables_wrapper table.mdc-data-table__table{table-layout:auto}div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc{padding-right:30px}div.dataTables_wrapper table.mdc-data-table__table thead tr th:active{outline:none}div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting{cursor:pointer;position:relative}div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:before,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:after,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:before,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:after,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:before,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:after{position:absolute;display:block;opacity:0.3;right:1em;line-height:9px;font-size:0.9em}div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:before,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:before,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:before{bottom:50%;content:"\25B4"}div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:after,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:after,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting:after{top:50%;content:"\25BE"}div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_asc:before,div.dataTables_wrapper table.mdc-data-table__table thead tr th.sorting_desc:after{opacity:0.8}div.dataTables_wrapper .mdc-data-table__cell{border:1px solid rgba(0,0,0,0.12)}div.dataTables_wrapper div.mdc-layout-grid{margin:0px;padding:5px}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:before,table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:11px;display:block;opacity:0.3;font-size:1.3em}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{right:0.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}
diff --git a/media/js/dataTables.material.js b/media/js/dataTables.material.js
index ffdaf123..c4150f95 100644
--- a/media/js/dataTables.material.js
+++ b/media/js/dataTables.material.js
@@ -46,27 +46,29 @@ var DataTable = $.fn.dataTable;
/* Set the defaults for DataTables initialisation */
$.extend( true, DataTable.defaults, {
dom:
- "<'mdl-grid'"+
- "<'mdl-cell mdl-cell--6-col'l>"+
- "<'mdl-cell mdl-cell--6-col'f>"+
- ">"+
- "<'mdl-grid dt-table'"+
- "<'mdl-cell mdl-cell--12-col'tr>"+
- ">"+
- "<'mdl-grid'"+
- "<'mdl-cell mdl-cell--4-col'i>"+
- "<'mdl-cell mdl-cell--8-col'p>"+
- ">",
+ "<'mdc-layout-grid'<'mdc-layout-grid__inner'"+
+ "<'mdc-cell mdc-layout-grid__cell--span-6'l>"+
+ "<'mdc-cell mdc-layout-grid__cell--span-6'f>"+
+ ">>"+
+ "<'mdc-layout-grid dt-table'<'mdc-layout-grid__inner'"+
+ "<'mdc-cell mdc-layout-grid__cell--span-12'tr>"+
+ ">>"+
+ "<'mdc-layout-grid'<'mdc-layout-grid__inner'"+
+ "<'mdc-cell mdc-layout-grid__cell--span-4'i>"+
+ "<'mdc-cell mdc-layout-grid__cell--span-8'p>"+
+ ">>",
renderer: 'material'
} );
/* Default class modification */
$.extend( DataTable.ext.classes, {
- sWrapper: "dataTables_wrapper form-inline dt-material",
- sFilterInput: "form-control input-sm",
- sLengthSelect: "form-control input-sm",
- sProcessing: "dataTables_processing panel panel-default"
+ sTable: "mdc-data-table__table",
+ sHeaderTH: "mdc-data-table__header-row",
+ sWrapper: "dataTables_wrapper form-inline dt-material mdc-data-table",
+ sFilterInput: "form-control input-sm",
+ sLengthSelect: "form-control input-sm",
+ sProcessing: "dataTables_processing panel panel-default"
} );
@@ -135,12 +137,12 @@ DataTable.ext.renderer.pageButton.material = function ( settings, host, idx, but
}
if ( active ) {
- btnClass += ' mdl-button--raised mdl-button--colored';
+ btnClass += ' mdc-button--raised mdc-button--colored';
}
if ( btnDisplay ) {
node = $('