mirror of https://github.com/ColorlibHQ/gentelella
Changes;
- Fix DataTables examples beign broken because of old bower references - Fix DataTable with checkboxes - Fix visual problem with DateRangePicker with huge z-indexpull/846/head
parent
16d771aea4
commit
330008291a
|
@ -111,6 +111,7 @@ Let us know if you have done integration for this admin template on other platfo
|
|||
* Autosize - resizes text area to fit text
|
||||
* validator - HTML from validator using jQuery
|
||||
* jQuery Smart Wizard
|
||||
* Tempus Dominus Bootstrap 4
|
||||
|
||||
## Other templates and useful resources
|
||||
* [Free Bootstrap Admin Templates](https://colorlib.com/wp/free-bootstrap-admin-dashboard-templates/ "Bootstrap Admin Templates on Colorlib") - List of the best Free Bootstrap admin dashboard templates that are available for free for personal and commercial use.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,6 +31,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/puikinsh/gentelella#readme",
|
||||
"devDependencies": {
|
||||
"gulp": "^4.0.2",
|
||||
"browser-sync": "^2.26.7",
|
||||
"gulp-autoprefixer": "^7.0.1",
|
||||
"gulp-concat": "^2.6.1",
|
||||
|
@ -42,6 +43,11 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"bower": "^1.8.8",
|
||||
"gulp": "^4.0.2"
|
||||
"datatables.net-bs4": "^1.10.20",
|
||||
"datatables.net-buttons-bs4": "^1.6.1",
|
||||
"datatables.net-fixedheader-bs4": "^3.1.6",
|
||||
"datatables.net-keytable-bs4": "^2.5.1",
|
||||
"datatables.net-responsive-bs4": "^2.2.3",
|
||||
"datatables.net-scroller-bs4": "^2.0.1"
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
2828
src/scss/custom.scss
2828
src/scss/custom.scss
File diff suppressed because it is too large
Load Diff
|
@ -2,26 +2,28 @@
|
|||
.ranges {
|
||||
li {
|
||||
color: #73879C;
|
||||
|
||||
&.active, &:hover {
|
||||
|
||||
&.active,
|
||||
&:hover {
|
||||
background: #536A7F;
|
||||
border: 1px solid #536A7F;
|
||||
color: #fff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-mini {
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: none !important;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: none !important;
|
||||
|
||||
&.active {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
&.active {
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
|
||||
&.monthselect,
|
||||
&.yearselect,
|
||||
&.hourselect,
|
||||
|
@ -50,10 +52,11 @@
|
|||
color: #73879C;
|
||||
}
|
||||
|
||||
&.active, &.active:hover {
|
||||
&.active,
|
||||
&.active:hover {
|
||||
background-color: #536A7F;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
th.available:hover {
|
||||
|
@ -61,7 +64,8 @@
|
|||
color: #34495E;
|
||||
}
|
||||
|
||||
&:before, &:after {
|
||||
&:before,
|
||||
&:after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
|
@ -144,11 +148,13 @@
|
|||
thead {
|
||||
& tr:first-child {
|
||||
color: #fff;
|
||||
background: #34495E;;
|
||||
background: #34495E;
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
td, td.off {
|
||||
td,
|
||||
td.off {
|
||||
background: #ECF0F1;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 0;
|
||||
|
@ -169,8 +175,11 @@
|
|||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid rgba(0,0,0,0.15);
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
overflow: hidden;
|
||||
top: auto;
|
||||
z-index: auto;
|
||||
left: 0;
|
||||
|
||||
.calendar {
|
||||
margin: 0 0 4px 0;
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-bs",
|
||||
"description": "DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"js/dataTables.bootstrap.js",
|
||||
"css/dataTables.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"filter",
|
||||
"sort",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "1.10.12",
|
||||
"_release": "1.10.12",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.10.12",
|
||||
"commit": "1bf893948299f1bfe2865c1a3977cd8e4b8137da"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-Bootstrap.git",
|
||||
"_target": "^1.10.11",
|
||||
"_originalSource": "datatables.net-bs"
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
Copyright SpryMedia Limited and other contributors
|
||||
http://datatables.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-bs",
|
||||
"description": "DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"js/dataTables.bootstrap.js",
|
||||
"css/dataTables.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"filter",
|
||||
"sort",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 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: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{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0}
|
|
@ -1,8 +0,0 @@
|
|||
/*!
|
||||
DataTables Bootstrap 3 integration
|
||||
©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(f.ext.classes,
|
||||
{sWrapper:"dataTables_wrapper container-fluid dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new f.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};
|
||||
l=0;for(h=f.length;l<h;l++)if(c=f[l],b.isArray(c))q(d,c);else{g=e="";switch(c){case "ellipsis":e="…";g="disabled";break;case "first":e=k.sFirst;g=c+(0<j?"":" disabled");break;case "previous":e=k.sPrevious;g=c+(0<j?"":" disabled");break;case "next":e=k.sNext;g=c+(j<n-1?"":" disabled");break;case "last":e=k.sLast;g=c+(j<n-1?"":" disabled");break;default:e=c+1,g=j===c?"active":""}e&&(i=b("<li>",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#",
|
||||
"aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
|
|
@ -1,6 +1,6 @@
|
|||
# DataTables for jQuery with styling for [Bootstrap](http://getbootstrap.com/)
|
||||
# DataTables for jQuery with styling for [Bootstrap 4](http://getbootstrap.com/)
|
||||
|
||||
This package contains distribution files required to style [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/) with styling for [Bootstrap](http://getbootstrap.com/).
|
||||
This package contains distribution files required to style [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/) with styling for [Bootstrap 4](http://getbootstrap.com/).
|
||||
|
||||
DataTables is a table enhancing library which adds features such as paging, ordering, search, scrolling and many more to a static HTML page. A comprehensive API is also available that can be used to manipulate the table. Please refer to the [DataTables web-site](//datatables.net) for a full range of documentation and examples.
|
||||
|
||||
|
@ -14,18 +14,18 @@ For inclusion of this library using a standard `<script>` tag, rather than using
|
|||
### npm
|
||||
|
||||
```
|
||||
npm install datatables.net-bs
|
||||
npm install datatables.net-bs4
|
||||
```
|
||||
|
||||
```
|
||||
var $ = require( 'jquery' );
|
||||
require( 'datatables.net-bs' )( window, $ );
|
||||
require( 'datatables.net-bs4' )( $ );
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```
|
||||
bower install --save datatables.net-bs
|
||||
bower install --save datatables.net-bs4
|
||||
```
|
||||
|
||||
|
|
@ -4,11 +4,11 @@ table.dataTable {
|
|||
margin-bottom: 6px !important;
|
||||
max-width: none !important;
|
||||
border-collapse: separate !important;
|
||||
border-spacing: 0;
|
||||
}
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
table.dataTable td.dataTables_empty,
|
||||
|
@ -26,7 +26,7 @@ div.dataTables_wrapper div.dataTables_length label {
|
|||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length select {
|
||||
width: 75px;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter {
|
||||
|
@ -43,7 +43,7 @@ div.dataTables_wrapper div.dataTables_filter input {
|
|||
width: auto;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_info {
|
||||
padding-top: 8px;
|
||||
padding-top: 0.85em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate {
|
||||
|
@ -54,6 +54,7 @@ div.dataTables_wrapper div.dataTables_paginate {
|
|||
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
|
||||
margin: 2px 0;
|
||||
white-space: nowrap;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_processing {
|
||||
position: absolute;
|
||||
|
@ -84,34 +85,43 @@ 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: 0.9em;
|
||||
display: block;
|
||||
opacity: 0.3;
|
||||
}
|
||||
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 {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
display: block;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
opacity: 0.5;
|
||||
}
|
||||
table.dataTable thead .sorting:after {
|
||||
opacity: 0.2;
|
||||
content: "\e150";
|
||||
/* sort */
|
||||
}
|
||||
table.dataTable thead .sorting_asc:after {
|
||||
content: "\e155";
|
||||
/* sort-by-attributes */
|
||||
right: 0.5em;
|
||||
content: "\2193";
|
||||
}
|
||||
table.dataTable thead .sorting_asc:before,
|
||||
table.dataTable thead .sorting_desc:after {
|
||||
content: "\e156";
|
||||
/* sort-by-attributes-alt */
|
||||
opacity: 1;
|
||||
}
|
||||
table.dataTable thead .sorting_asc_disabled:after,
|
||||
table.dataTable thead .sorting_asc_disabled:before,
|
||||
table.dataTable thead .sorting_desc_disabled:after {
|
||||
color: #eee;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.dataTable {
|
||||
|
@ -123,6 +133,9 @@ div.dataTables_scrollBody table {
|
|||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
div.dataTables_scrollBody table thead .sorting:before,
|
||||
div.dataTables_scrollBody table thead .sorting_asc:before,
|
||||
div.dataTables_scrollBody table thead .sorting_desc:before,
|
||||
div.dataTables_scrollBody table thead .sorting:after,
|
||||
div.dataTables_scrollBody table thead .sorting_asc:after,
|
||||
div.dataTables_scrollBody table thead .sorting_desc:after {
|
||||
|
@ -133,7 +146,10 @@ div.dataTables_scrollBody table tbody tr:first-child td {
|
|||
border-top: none;
|
||||
}
|
||||
|
||||
div.dataTables_scrollFoot table {
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
|
||||
margin-top: 0 !important;
|
||||
border-top: none;
|
||||
}
|
||||
|
@ -146,14 +162,19 @@ div.dataTables_scrollFoot table {
|
|||
text-align: center;
|
||||
}
|
||||
}
|
||||
table.dataTable.table-condensed > thead > tr > th {
|
||||
table.dataTable.table-sm > thead > tr > th {
|
||||
padding-right: 20px;
|
||||
}
|
||||
table.dataTable.table-condensed .sorting:after,
|
||||
table.dataTable.table-condensed .sorting_asc:after,
|
||||
table.dataTable.table-condensed .sorting_desc:after {
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
table.dataTable.table-sm .sorting:before,
|
||||
table.dataTable.table-sm .sorting_asc:before,
|
||||
table.dataTable.table-sm .sorting_desc:before {
|
||||
top: 5px;
|
||||
right: 0.85em;
|
||||
}
|
||||
table.dataTable.table-sm .sorting:after,
|
||||
table.dataTable.table-sm .sorting_asc:after,
|
||||
table.dataTable.table-sm .sorting_desc:after {
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
table.table-bordered.dataTable th,
|
File diff suppressed because one or more lines are too long
|
@ -1,9 +1,9 @@
|
|||
/*! DataTables Bootstrap 3 integration
|
||||
* ©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||
/*! DataTables Bootstrap 4 integration
|
||||
* ©2011-2017 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* DataTables integration for Bootstrap 3. This requires Bootstrap 3 and
|
||||
* DataTables integration for Bootstrap 4. This requires Bootstrap 4 and
|
||||
* DataTables 1.10 or newer.
|
||||
*
|
||||
* This file sets the defaults and adds options to DataTables to style its
|
||||
|
@ -46,19 +46,20 @@ var DataTable = $.fn.dataTable;
|
|||
/* Set the defaults for DataTables initialisation */
|
||||
$.extend( true, DataTable.defaults, {
|
||||
dom:
|
||||
"<'row'<'col-sm-6'l><'col-sm-6'f>>" +
|
||||
"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>" +
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
||||
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
renderer: 'bootstrap'
|
||||
} );
|
||||
|
||||
|
||||
/* Default class modification */
|
||||
$.extend( DataTable.ext.classes, {
|
||||
sWrapper: "dataTables_wrapper container-fluid dt-bootstrap",
|
||||
sFilterInput: "form-control input-sm",
|
||||
sLengthSelect: "form-control input-sm",
|
||||
sProcessing: "dataTables_processing panel panel-default"
|
||||
sWrapper: "dataTables_wrapper dt-bootstrap4",
|
||||
sFilterInput: "form-control form-control-sm",
|
||||
sLengthSelect: "custom-select custom-select-sm form-control form-control-sm",
|
||||
sProcessing: "dataTables_processing card",
|
||||
sPageButton: "paginate_button page-item"
|
||||
} );
|
||||
|
||||
|
||||
|
@ -138,7 +139,8 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
|
|||
'aria-controls': settings.sTableId,
|
||||
'aria-label': aria[ button ],
|
||||
'data-dt-idx': counter,
|
||||
'tabindex': settings.iTabIndex
|
||||
'tabindex': settings.iTabIndex,
|
||||
'class': 'page-link'
|
||||
} )
|
||||
.html( btnDisplay )
|
||||
)
|
||||
|
@ -172,11 +174,11 @@ DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, bu
|
|||
buttons
|
||||
);
|
||||
|
||||
if ( activeEl ) {
|
||||
if ( activeEl !== undefined ) {
|
||||
$(host).find( '[data-dt-idx='+activeEl+']' ).focus();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return DataTable;
|
||||
}));
|
||||
}));
|
|
@ -0,0 +1,8 @@
|
|||
/*!
|
||||
DataTables Bootstrap 4 integration
|
||||
©2011-2017 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
|
||||
renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"custom-select custom-select-sm form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();
|
||||
!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l<h;l++)if(c=f[l],b.isArray(c))q(d,c);else{g=e="";switch(c){case "ellipsis":e="…";g="disabled";break;case "first":e=k.sFirst;g=c+(0<j?"":" disabled");break;case "previous":e=k.sPrevious;g=c+(0<j?"":" disabled");break;case "next":e=k.sNext;g=c+(j<n-1?"":" disabled");break;case "last":e=k.sLast;g=c+(j<n-1?"":" disabled");break;default:e=c+1,g=j===c?"active":""}e&&(i=b("<li>",
|
||||
{"class":t.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("<a>",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('<ul class="pagination"/>').children("ul"),s);i!==m&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"_from": "datatables.net-bs4",
|
||||
"_id": "datatables.net-bs4@1.10.20",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-kQmMUMsHMOlAW96ztdoFqjSbLnlGZQ63iIM82kHbmldsfYdzuyhbb4hTx6YNBi481WCO3iPSvI6YodNec46ZAw==",
|
||||
"_location": "/datatables.net-bs4",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-bs4",
|
||||
"name": "datatables.net-bs4",
|
||||
"escapedName": "datatables.net-bs4",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-bs4/-/datatables.net-bs4-1.10.20.tgz",
|
||||
"_shasum": "beff1c8d3510826c0678eaa055270607c0e53882",
|
||||
"_spec": "datatables.net-bs4",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net": "1.10.20",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "DataTables for jQuery with styling for [Bootstrap 4](http://getbootstrap.com/)",
|
||||
"files": [
|
||||
"css/**/*.css",
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"filter",
|
||||
"sort",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap 4"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./js/dataTables.bootstrap4.js",
|
||||
"name": "datatables.net-bs4",
|
||||
"style": "./css/dataTables.bootstrap4.css",
|
||||
"version": "1.10.20"
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-buttons-bs",
|
||||
"description": "Buttons for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"js/buttons.bootstrap.js",
|
||||
"css/buttons.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"buttons",
|
||||
"excel",
|
||||
"pdf",
|
||||
"csv",
|
||||
"column visibility",
|
||||
"print",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-buttons": ">=1.0.3"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "1.2.1",
|
||||
"_release": "1.2.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.2.1",
|
||||
"commit": "14a9a2586190c38ac99a6d88ae3395e3a837acc3"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-Buttons-Bootstrap.git",
|
||||
"_target": "^1.1.2",
|
||||
"_originalSource": "datatables.net-buttons-bs"
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
Copyright SpryMedia Limited and other contributors
|
||||
http://datatables.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-buttons-bs",
|
||||
"description": "Buttons for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"js/buttons.bootstrap.js",
|
||||
"css/buttons.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"buttons",
|
||||
"excel",
|
||||
"pdf",
|
||||
"csv",
|
||||
"column visibility",
|
||||
"print",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-buttons": ">=1.0.3"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
div.dt-button-info {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 400px;
|
||||
margin-top: -100px;
|
||||
margin-left: -200px;
|
||||
background-color: white;
|
||||
border: 2px solid #111;
|
||||
box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
z-index: 21;
|
||||
}
|
||||
div.dt-button-info h2 {
|
||||
padding: 0.5em;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #ddd;
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
div.dt-button-info > div {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
ul.dt-button-collection.dropdown-menu {
|
||||
display: block;
|
||||
z-index: 2002;
|
||||
-webkit-column-gap: 8px;
|
||||
-moz-column-gap: 8px;
|
||||
-ms-column-gap: 8px;
|
||||
-o-column-gap: 8px;
|
||||
column-gap: 8px;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu.fixed {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -75px;
|
||||
border-radius: 0;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu.fixed.two-column {
|
||||
margin-left: -150px;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu.fixed.three-column {
|
||||
margin-left: -225px;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu.fixed.four-column {
|
||||
margin-left: -300px;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu > * {
|
||||
-webkit-column-break-inside: avoid;
|
||||
break-inside: avoid;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu.two-column {
|
||||
width: 300px;
|
||||
padding-bottom: 1px;
|
||||
-webkit-column-count: 2;
|
||||
-moz-column-count: 2;
|
||||
-ms-column-count: 2;
|
||||
-o-column-count: 2;
|
||||
column-count: 2;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu.three-column {
|
||||
width: 450px;
|
||||
padding-bottom: 1px;
|
||||
-webkit-column-count: 3;
|
||||
-moz-column-count: 3;
|
||||
-ms-column-count: 3;
|
||||
-o-column-count: 3;
|
||||
column-count: 3;
|
||||
}
|
||||
ul.dt-button-collection.dropdown-menu.four-column {
|
||||
width: 600px;
|
||||
padding-bottom: 1px;
|
||||
-webkit-column-count: 4;
|
||||
-moz-column-count: 4;
|
||||
-ms-column-count: 4;
|
||||
-o-column-count: 4;
|
||||
column-count: 4;
|
||||
}
|
||||
|
||||
div.dt-button-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 2001;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
div.dt-buttons {
|
||||
float: none;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.dt-buttons a.btn {
|
||||
float: none;
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}ul.dt-button-collection.dropdown-menu{display:block;z-index:2002;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}ul.dt-button-collection.dropdown-menu.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}ul.dt-button-collection.dropdown-menu.fixed.two-column{margin-left:-150px}ul.dt-button-collection.dropdown-menu.fixed.three-column{margin-left:-225px}ul.dt-button-collection.dropdown-menu.fixed.four-column{margin-left:-300px}ul.dt-button-collection.dropdown-menu>*{-webkit-column-break-inside:avoid;break-inside:avoid}ul.dt-button-collection.dropdown-menu.two-column{width:300px;padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}ul.dt-button-collection.dropdown-menu.three-column{width:450px;padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}ul.dt-button-collection.dropdown-menu.four-column{width:600px;padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2001}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}}
|
|
@ -1,6 +0,0 @@
|
|||
/*!
|
||||
Bootstrap integration for DataTables' Buttons
|
||||
©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs")(a,b).$;b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable;c.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group"},
|
||||
button:{className:"btn btn-default"},collection:{tag:"ul",className:"dt-button-collection dropdown-menu",button:{tag:"li",className:"dt-button"},buttonLiner:{tag:"a",className:""}}}});a.ext.buttons.collection.text=function(a){return a.i18n("buttons.collection",'Collection <span class="caret"/>')};return a.Buttons});
|
|
@ -1,6 +1,6 @@
|
|||
# Buttons for DataTables with styling for [Bootstrap](http://getbootstrap.com/)
|
||||
# Buttons for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)
|
||||
|
||||
This package contains distribution files required to style [Buttons extension](https://datatables.net/extensions/buttons) for [DataTables](https://datatables.net/) with styling for [Bootstrap](http://getbootstrap.com/).
|
||||
This package contains distribution files required to style [Buttons extension](https://datatables.net/extensions/buttons) for [DataTables](https://datatables.net/) with styling for [Bootstrap 4](http://getbootstrap.com/).
|
||||
|
||||
The Buttons extension for DataTables provides a common set of options, API methods and styling to display buttons on a page that will interact with a DataTable. It also provides plug-ins for file export (HTML5 and Flash), print view and column visibility. Other libraries, such as Editor and Select also provide buttons specific to their use cases.
|
||||
|
||||
|
@ -14,18 +14,18 @@ For inclusion of this library using a standard `<script>` tag, rather than using
|
|||
### npm
|
||||
|
||||
```
|
||||
npm install datatables.net-buttons-bs
|
||||
npm install datatables.net-buttons-bs4
|
||||
```
|
||||
|
||||
```
|
||||
var $ = require( 'jquery' );
|
||||
require( 'datatables.net-buttons-bs' )( window, $ );
|
||||
require( 'datatables.net-buttons-bs4' )( $ );
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```
|
||||
bower install --save datatables.net-buttons-bs
|
||||
bower install --save datatables.net-buttons-bs4
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
@keyframes dtb-spinner {
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes dtb-spinner {
|
||||
100% {
|
||||
-o-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-ms-keyframes dtb-spinner {
|
||||
100% {
|
||||
-ms-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes dtb-spinner {
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@-moz-keyframes dtb-spinner {
|
||||
100% {
|
||||
-moz-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
div.dt-button-info {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 400px;
|
||||
margin-top: -100px;
|
||||
margin-left: -200px;
|
||||
background-color: white;
|
||||
border: 2px solid #111;
|
||||
box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
z-index: 21;
|
||||
}
|
||||
div.dt-button-info h2 {
|
||||
padding: 0.5em;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #ddd;
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
div.dt-button-info > div {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
div.dt-button-collection-title {
|
||||
text-align: center;
|
||||
padding: 0.3em 0 0.5em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
div.dt-button-collection-title:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.dt-button-collection {
|
||||
position: absolute;
|
||||
z-index: 2001;
|
||||
}
|
||||
div.dt-button-collection div.dropdown-menu {
|
||||
display: block;
|
||||
z-index: 2002;
|
||||
min-width: 100%;
|
||||
}
|
||||
div.dt-button-collection div.dt-button-collection-title {
|
||||
background-color: white;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
div.dt-button-collection.fixed {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -75px;
|
||||
border-radius: 0;
|
||||
}
|
||||
div.dt-button-collection.fixed.two-column {
|
||||
margin-left: -200px;
|
||||
}
|
||||
div.dt-button-collection.fixed.three-column {
|
||||
margin-left: -225px;
|
||||
}
|
||||
div.dt-button-collection.fixed.four-column {
|
||||
margin-left: -300px;
|
||||
}
|
||||
div.dt-button-collection > :last-child {
|
||||
display: block !important;
|
||||
-webkit-column-gap: 8px;
|
||||
-moz-column-gap: 8px;
|
||||
-ms-column-gap: 8px;
|
||||
-o-column-gap: 8px;
|
||||
column-gap: 8px;
|
||||
}
|
||||
div.dt-button-collection > :last-child > * {
|
||||
-webkit-column-break-inside: avoid;
|
||||
break-inside: avoid;
|
||||
}
|
||||
div.dt-button-collection.two-column {
|
||||
width: 400px;
|
||||
}
|
||||
div.dt-button-collection.two-column > :last-child {
|
||||
padding-bottom: 1px;
|
||||
-webkit-column-count: 2;
|
||||
-moz-column-count: 2;
|
||||
-ms-column-count: 2;
|
||||
-o-column-count: 2;
|
||||
column-count: 2;
|
||||
}
|
||||
div.dt-button-collection.three-column {
|
||||
width: 450px;
|
||||
}
|
||||
div.dt-button-collection.three-column > :last-child {
|
||||
padding-bottom: 1px;
|
||||
-webkit-column-count: 3;
|
||||
-moz-column-count: 3;
|
||||
-ms-column-count: 3;
|
||||
-o-column-count: 3;
|
||||
column-count: 3;
|
||||
}
|
||||
div.dt-button-collection.four-column {
|
||||
width: 600px;
|
||||
}
|
||||
div.dt-button-collection.four-column > :last-child {
|
||||
padding-bottom: 1px;
|
||||
-webkit-column-count: 4;
|
||||
-moz-column-count: 4;
|
||||
-ms-column-count: 4;
|
||||
-o-column-count: 4;
|
||||
column-count: 4;
|
||||
}
|
||||
div.dt-button-collection .dt-button {
|
||||
border-radius: 0;
|
||||
}
|
||||
div.dt-button-collection.fixed {
|
||||
max-width: none;
|
||||
}
|
||||
div.dt-button-collection.fixed:before, div.dt-button-collection.fixed:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.dt-button-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
div.dt-buttons {
|
||||
float: none;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.dt-buttons a.btn {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
div.dt-buttons button.btn.processing,
|
||||
div.dt-buttons div.btn.processing,
|
||||
div.dt-buttons a.btn.processing {
|
||||
color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
div.dt-buttons button.btn.processing:after,
|
||||
div.dt-buttons div.btn.processing:after,
|
||||
div.dt-buttons a.btn.processing:after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: -8px 0 0 -8px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
content: ' ';
|
||||
border: 2px solid #282828;
|
||||
border-radius: 50%;
|
||||
border-left-color: transparent;
|
||||
border-right-color: transparent;
|
||||
animation: dtb-spinner 1500ms infinite linear;
|
||||
-o-animation: dtb-spinner 1500ms infinite linear;
|
||||
-ms-animation: dtb-spinner 1500ms infinite linear;
|
||||
-webkit-animation: dtb-spinner 1500ms infinite linear;
|
||||
-moz-animation: dtb-spinner 1500ms infinite linear;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
@keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dt-button-collection-title{text-align:center;padding:0.3em 0 0.5em;font-size:0.9em}div.dt-button-collection-title:empty{display:none}div.dt-button-collection{position:absolute;z-index:2001}div.dt-button-collection div.dropdown-menu{display:block;z-index:2002;min-width:100%}div.dt-button-collection div.dt-button-collection-title{background-color:white;border:1px solid rgba(0,0,0,0.15)}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>:last-child{display:block !important;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:400px}div.dt-button-collection.two-column>:last-child{padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px}div.dt-button-collection.three-column>:last-child{padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px}div.dt-button-collection.four-column>:last-child{padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-collection .dt-button{border-radius:0}div.dt-button-collection.fixed{max-width:none}div.dt-button-collection.fixed:before,div.dt-button-collection.fixed:after{display:none}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}}div.dt-buttons button.btn.processing,div.dt-buttons div.btn.processing,div.dt-buttons a.btn.processing{color:rgba(0,0,0,0.2)}div.dt-buttons button.btn.processing:after,div.dt-buttons div.btn.processing:after,div.dt-buttons a.btn.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:' ';border:2px solid #282828;border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}
|
|
@ -5,7 +5,7 @@
|
|||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-bs', 'datatables.net-buttons'], function ( $ ) {
|
||||
define( ['jquery', 'datatables.net-bs4', 'datatables.net-buttons'], function ( $ ) {
|
||||
return factory( $, window, document );
|
||||
} );
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
|
||||
if ( ! $ || ! $.fn.dataTable ) {
|
||||
$ = require('datatables.net-bs')(root, $).$;
|
||||
$ = require('datatables.net-bs4')(root, $).$;
|
||||
}
|
||||
|
||||
if ( ! $.fn.dataTable.Buttons ) {
|
||||
|
@ -35,34 +35,34 @@
|
|||
'use strict';
|
||||
var DataTable = $.fn.dataTable;
|
||||
|
||||
|
||||
$.extend( true, DataTable.Buttons.defaults, {
|
||||
dom: {
|
||||
container: {
|
||||
className: 'dt-buttons btn-group'
|
||||
className: 'dt-buttons btn-group flex-wrap'
|
||||
},
|
||||
button: {
|
||||
className: 'btn btn-default'
|
||||
className: 'btn btn-secondary'
|
||||
},
|
||||
collection: {
|
||||
tag: 'ul',
|
||||
className: 'dt-button-collection dropdown-menu',
|
||||
tag: 'div',
|
||||
className: 'dropdown-menu',
|
||||
button: {
|
||||
tag: 'li',
|
||||
className: 'dt-button'
|
||||
},
|
||||
buttonLiner: {
|
||||
tag: 'a',
|
||||
className: ''
|
||||
className: 'dt-button dropdown-item',
|
||||
active: 'active',
|
||||
disabled: 'disabled'
|
||||
}
|
||||
}
|
||||
},
|
||||
buttonCreated: function ( config, button ) {
|
||||
return config.buttons ?
|
||||
$('<div class="btn-group"/>').append(button) :
|
||||
button;
|
||||
}
|
||||
} );
|
||||
|
||||
DataTable.ext.buttons.collection.text = function ( dt ) {
|
||||
return dt.i18n('buttons.collection', 'Collection <span class="caret"/>');
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.collection.className += ' dropdown-toggle';
|
||||
DataTable.ext.buttons.collection.rightAlignClassName = 'dropdown-menu-right';
|
||||
|
||||
return DataTable.Buttons;
|
||||
}));
|
|
@ -0,0 +1,6 @@
|
|||
/*!
|
||||
Bootstrap integration for DataTables' Buttons
|
||||
©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-buttons"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,c){a||(a=window);if(!c||!c.fn.dataTable)c=require("datatables.net-bs4")(a,c).$;c.fn.dataTable.Buttons||require("datatables.net-buttons")(a,c);return b(c,a,a.document)}:b(jQuery,window,document)})(function(b){var a=b.fn.dataTable;b.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},
|
||||
button:{className:"btn btn-secondary"},collection:{tag:"div",className:"dropdown-menu",button:{tag:"a",className:"dt-button dropdown-item",active:"active",disabled:"disabled"}}},buttonCreated:function(a,d){return a.buttons?b('<div class="btn-group"/>').append(d):d}});a.ext.buttons.collection.className+=" dropdown-toggle";a.ext.buttons.collection.rightAlignClassName="dropdown-menu-right";return a.Buttons});
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"_from": "datatables.net-buttons-bs4",
|
||||
"_id": "datatables.net-buttons-bs4@1.6.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-PdE1vrnRIeX+p++wnbpdnr97kgTCs+DDomtTccsQvMrFm29lxVa7uTz1awasfGRrCrJzpb5HjPrPJBzbGHrUyg==",
|
||||
"_location": "/datatables.net-buttons-bs4",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-buttons-bs4",
|
||||
"name": "datatables.net-buttons-bs4",
|
||||
"escapedName": "datatables.net-buttons-bs4",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-buttons-bs4/-/datatables.net-buttons-bs4-1.6.1.tgz",
|
||||
"_shasum": "4abd9c83fbd753ffa4913adca1fae094df64b3ba",
|
||||
"_spec": "datatables.net-buttons-bs4",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net-bs4": "^1.10.15",
|
||||
"datatables.net-buttons": "1.6.1",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Buttons for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)",
|
||||
"files": [
|
||||
"css/**/*.css",
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"buttons",
|
||||
"excel",
|
||||
"pdf",
|
||||
"csv",
|
||||
"column visibility",
|
||||
"print",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap 4"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/buttons.bootstrap4.js",
|
||||
"name": "datatables.net-buttons-bs4",
|
||||
"style": "css/buttons.bootstrap4.css",
|
||||
"version": "1.6.1"
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-buttons",
|
||||
"description": "Buttons for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.buttons.js",
|
||||
"js/buttons.colVis.js",
|
||||
"js/buttons.flash.js",
|
||||
"js/buttons.html5.js",
|
||||
"js/buttons.print.js"
|
||||
],
|
||||
"keywords": [
|
||||
"buttons",
|
||||
"excel",
|
||||
"pdf",
|
||||
"csv",
|
||||
"column visibility",
|
||||
"print",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "1.6.1",
|
||||
"_release": "1.6.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.6.1",
|
||||
"commit": "bf8315785d9432f125c22986f424b756f14872b8"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-Buttons.git",
|
||||
"_target": "^1.1.2",
|
||||
"_originalSource": "datatables.net-buttons"
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-buttons",
|
||||
"description": "Buttons for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.buttons.js",
|
||||
"js/buttons.colVis.js",
|
||||
"js/buttons.flash.js",
|
||||
"js/buttons.html5.js",
|
||||
"js/buttons.print.js"
|
||||
],
|
||||
"keywords": [
|
||||
"buttons",
|
||||
"excel",
|
||||
"pdf",
|
||||
"csv",
|
||||
"column visibility",
|
||||
"print",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"_from": "datatables.net-buttons@1.6.1",
|
||||
"_id": "datatables.net-buttons@1.6.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Lcgvi/xGB2X0jr1n/uQMmg43Z1JQO6aaGjPHO+sAQAMfBGBi9cK1hhfM4Vg8gzC5fz3sW4QrtjAdKvOPnQ1A3w==",
|
||||
"_location": "/datatables.net-buttons",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-buttons@1.6.1",
|
||||
"name": "datatables.net-buttons",
|
||||
"escapedName": "datatables.net-buttons",
|
||||
"rawSpec": "1.6.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.6.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/datatables.net-buttons-bs4"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-buttons/-/datatables.net-buttons-1.6.1.tgz",
|
||||
"_shasum": "f62847e7c6f905fcf7339e7541a40741bbb3b8fb",
|
||||
"_spec": "datatables.net-buttons@1.6.1",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella\\node_modules\\datatables.net-buttons-bs4",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net": "^1.10.15",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Buttons for DataTables ",
|
||||
"files": [
|
||||
"js/**/*.js",
|
||||
"swf/flashExport.swf"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"buttons",
|
||||
"excel",
|
||||
"pdf",
|
||||
"csv",
|
||||
"column visibility",
|
||||
"print",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/dataTables.buttons.js",
|
||||
"name": "datatables.net-buttons",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DataTables/Dist-DataTables-Buttons.git"
|
||||
},
|
||||
"version": "1.6.1"
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-fixedheader-bs",
|
||||
"description": "FixedHeader for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"css/fixedHeader.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"fixed headers",
|
||||
"sticky",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-fixedheader": ">=3.0.0"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "3.1.2",
|
||||
"_release": "3.1.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "3.1.2",
|
||||
"commit": "91d68462495809d2c58cb772824219b803a25510"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-FixedHeader-Bootstrap.git",
|
||||
"_target": "^3.1.1",
|
||||
"_originalSource": "datatables.net-fixedheader-bs"
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
Copyright SpryMedia Limited and other contributors
|
||||
http://datatables.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-fixedheader-bs",
|
||||
"description": "FixedHeader for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"css/fixedHeader.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"fixed headers",
|
||||
"sticky",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-fixedheader": ">=3.0.0"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# FixedHeader for DataTables with styling for [Bootstrap](http://getbootstrap.com/)
|
||||
# FixedHeader for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)
|
||||
|
||||
This package contains distribution files required to style [FixedHeader extension](https://datatables.net/extensions/fixedheader) for [DataTables](https://datatables.net/) with styling for [Bootstrap](http://getbootstrap.com/).
|
||||
This package contains distribution files required to style [FixedHeader extension](https://datatables.net/extensions/fixedheader) for [DataTables](https://datatables.net/) with styling for [Bootstrap 4](http://getbootstrap.com/).
|
||||
|
||||
When displaying large amounts of data in a table, it can often be useful for the end user to have the column titles always visible. This is particularly true if using DataTables with pagination disabled, or the display length is set to a high value. The FixedHeader extension provides this ability.
|
||||
|
||||
|
@ -14,18 +14,18 @@ For inclusion of this library using a standard `<script>` tag, rather than using
|
|||
### npm
|
||||
|
||||
```
|
||||
npm install datatables.net-fixedheader-bs
|
||||
npm install datatables.net-fixedheader-bs4
|
||||
```
|
||||
|
||||
```
|
||||
var $ = require( 'jquery' );
|
||||
require( 'datatables.net-fixedheader-bs' )( window, $ );
|
||||
require( 'datatables.net-fixedheader-bs4' )( $ );
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```
|
||||
bower install --save datatables.net-fixedheader-bs
|
||||
bower install --save datatables.net-fixedheader-bs4
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/*! Bootstrap 4 styling wrapper for FixedHeader
|
||||
* ©2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-bs4', 'datatables.net-fixedheader'], function ( $ ) {
|
||||
return factory( $, window, document );
|
||||
} );
|
||||
}
|
||||
else if ( typeof exports === 'object' ) {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if ( ! root ) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if ( ! $ || ! $.fn.dataTable ) {
|
||||
$ = require('datatables.net-bs4')(root, $).$;
|
||||
}
|
||||
|
||||
if ( ! $.fn.dataTable.FixedHeader ) {
|
||||
require('datatables.net-fixedheader')(root, $);
|
||||
}
|
||||
|
||||
return factory( $, root, root.document );
|
||||
};
|
||||
}
|
||||
else {
|
||||
// Browser
|
||||
factory( jQuery, window, document );
|
||||
}
|
||||
}(function( $, window, document, undefined ) {
|
||||
|
||||
return $.fn.dataTable;
|
||||
|
||||
}));
|
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
Bootstrap 4 styling wrapper for FixedHeader
|
||||
©2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-fixedheader"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.FixedHeader||require("datatables.net-fixedheader")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){return c.fn.dataTable});
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"_from": "datatables.net-fixedheader-bs4",
|
||||
"_id": "datatables.net-fixedheader-bs4@3.1.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-mat50UvCNhE5E2jhqEAO07LJ7I++pxFwpbNUfVtuFg866Tf3uHAKHgsXnsXW8kqiER931g4LbxO28axyquj1tw==",
|
||||
"_location": "/datatables.net-fixedheader-bs4",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-fixedheader-bs4",
|
||||
"name": "datatables.net-fixedheader-bs4",
|
||||
"escapedName": "datatables.net-fixedheader-bs4",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-fixedheader-bs4/-/datatables.net-fixedheader-bs4-3.1.6.tgz",
|
||||
"_shasum": "d1b12981bf127cfef658a0a742719aaeac6894eb",
|
||||
"_spec": "datatables.net-fixedheader-bs4",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net-bs4": "^1.10.15",
|
||||
"datatables.net-fixedheader": "3.1.6",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "FixedHeader for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)",
|
||||
"files": [
|
||||
"css/**/*.css",
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"fixed headers",
|
||||
"sticky",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap 4"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/fixedHeader.bootstrap4.js",
|
||||
"name": "datatables.net-fixedheader-bs4",
|
||||
"style": "css/fixedHeader.bootstrap4.css",
|
||||
"version": "3.1.6"
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-fixedheader",
|
||||
"description": "FixedHeader for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.fixedHeader.js"
|
||||
],
|
||||
"keywords": [
|
||||
"fixed headers",
|
||||
"sticky",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "3.1.2",
|
||||
"_release": "3.1.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "3.1.2",
|
||||
"commit": "762ce1822c9b10180c4359ab4036a0c78d846e73"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-FixedHeader.git",
|
||||
"_target": "^3.1.1",
|
||||
"_originalSource": "datatables.net-fixedheader"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# FixedHeader for DataTables
|
||||
|
||||
This package contains distribution files for the [FixedHeader extension](https://datatables.net/extensions/fixedheader) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for FixedHeader must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getboostrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
This package contains distribution files for the [FixedHeader extension](https://datatables.net/extensions/fixedheader) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for FixedHeader must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
|
||||
When displaying large amounts of data in a table, it can often be useful for the end user to have the column titles always visible. This is particularly true if using DataTables with pagination disabled, or the display length is set to a high value. The FixedHeader extension provides this ability.
|
||||
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-fixedheader",
|
||||
"description": "FixedHeader for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.fixedHeader.js"
|
||||
],
|
||||
"keywords": [
|
||||
"fixed headers",
|
||||
"sticky",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
/*! FixedHeader 3.1.2
|
||||
* ©2009-2016 SpryMedia Ltd - datatables.net/license
|
||||
/*! FixedHeader 3.1.6-dev
|
||||
* ©2009-2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @summary FixedHeader
|
||||
* @description Fix a table's header or footer, so it is always visible while
|
||||
* scrolling
|
||||
* @version 3.1.2
|
||||
* @version 3.1.6-dev
|
||||
* @file dataTables.fixedHeader.js
|
||||
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
||||
* @contact www.sprymedia.co.uk/contact
|
||||
* @copyright Copyright 2009-2016 SpryMedia Ltd.
|
||||
* @copyright Copyright 2009-2018 SpryMedia Ltd.
|
||||
*
|
||||
* This source file is free software, available under the following license:
|
||||
* MIT license - http://datatables.net/license/mit
|
||||
|
@ -134,15 +134,13 @@ $.extend( FixedHeader.prototype, {
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* API methods
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Enable / disable the fixed elements
|
||||
*
|
||||
* @param {boolean} enable `true` to enable, `false` to disable
|
||||
* Kill off FH and any events
|
||||
*/
|
||||
enable: function ( enable )
|
||||
{
|
||||
this.s.enable = enable;
|
||||
destroy: function () {
|
||||
this.s.dt.off( '.dtfc' );
|
||||
$(window).off( this.s.namespace );
|
||||
|
||||
if ( this.c.header ) {
|
||||
this._modeChange( 'in-place', 'header', true );
|
||||
|
@ -151,8 +149,29 @@ $.extend( FixedHeader.prototype, {
|
|||
if ( this.c.footer && this.dom.tfoot.length ) {
|
||||
this._modeChange( 'in-place', 'footer', true );
|
||||
}
|
||||
},
|
||||
|
||||
this.update();
|
||||
/**
|
||||
* Enable / disable the fixed elements
|
||||
*
|
||||
* @param {boolean} enable `true` to enable, `false` to disable
|
||||
*/
|
||||
enable: function ( enable, update )
|
||||
{
|
||||
this.s.enable = enable;
|
||||
|
||||
if ( update || update === undefined ) {
|
||||
this._positions();
|
||||
this._scroll( true );
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Get enabled status
|
||||
*/
|
||||
enabled: function ()
|
||||
{
|
||||
return this.s.enable;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -191,6 +210,15 @@ $.extend( FixedHeader.prototype, {
|
|||
*/
|
||||
update: function ()
|
||||
{
|
||||
var table = this.s.dt.table().node();
|
||||
|
||||
if ( $(table).is(':visible') ) {
|
||||
this.enable( true, false );
|
||||
}
|
||||
else {
|
||||
this.enable( false, false );
|
||||
}
|
||||
|
||||
this._positions();
|
||||
this._scroll( true );
|
||||
},
|
||||
|
@ -215,10 +243,10 @@ $.extend( FixedHeader.prototype, {
|
|||
.on( 'scroll'+this.s.namespace, function () {
|
||||
that._scroll();
|
||||
} )
|
||||
.on( 'resize'+this.s.namespace, function () {
|
||||
.on( 'resize'+this.s.namespace, DataTable.util.throttle( function () {
|
||||
that.s.position.windowHeight = $(window).height();
|
||||
that.update();
|
||||
} );
|
||||
}, 50 ) );
|
||||
|
||||
var autoHeader = $('.fh-fixedHeader');
|
||||
if ( ! this.c.headerOffset && autoHeader.length ) {
|
||||
|
@ -230,13 +258,12 @@ $.extend( FixedHeader.prototype, {
|
|||
this.c.footerOffset = autoFooter.outerHeight();
|
||||
}
|
||||
|
||||
dt.on( 'column-reorder.dt.dtfc column-visibility.dt.dtfc draw.dt.dtfc column-sizing.dt.dtfc', function () {
|
||||
dt.on( 'column-reorder.dt.dtfc column-visibility.dt.dtfc draw.dt.dtfc column-sizing.dt.dtfc responsive-display.dt.dtfc', function () {
|
||||
that.update();
|
||||
} );
|
||||
|
||||
dt.on( 'destroy.dtfc', function () {
|
||||
dt.off( '.dtfc' );
|
||||
$(window).off( that.s.namespace );
|
||||
that.destroy();
|
||||
} );
|
||||
|
||||
this._positions();
|
||||
|
@ -280,12 +307,17 @@ $.extend( FixedHeader.prototype, {
|
|||
|
||||
itemDom.floating = $( dt.table().node().cloneNode( false ) )
|
||||
.css( 'table-layout', 'fixed' )
|
||||
.attr( 'aria-hidden', 'true' )
|
||||
.removeAttr( 'id' )
|
||||
.append( itemElement )
|
||||
.appendTo( 'body' );
|
||||
|
||||
// Insert a fake thead/tfoot into the DataTable to stop it jumping around
|
||||
itemDom.placeholder = itemElement.clone( false );
|
||||
itemDom.placeholder
|
||||
.find( '*[id]' )
|
||||
.removeAttr( 'id' );
|
||||
|
||||
itemDom.host.prepend( itemDom.placeholder );
|
||||
|
||||
// Clone widths
|
||||
|
@ -399,6 +431,10 @@ $.extend( FixedHeader.prototype, {
|
|||
var focus = $.contains( tablePart[0], document.activeElement ) ?
|
||||
document.activeElement :
|
||||
null;
|
||||
|
||||
if ( focus ) {
|
||||
focus.blur();
|
||||
}
|
||||
|
||||
if ( mode === 'in-place' ) {
|
||||
// Insert the header back into the table's real header
|
||||
|
@ -410,10 +446,10 @@ $.extend( FixedHeader.prototype, {
|
|||
this._unsize( item );
|
||||
|
||||
if ( item === 'header' ) {
|
||||
itemDom.host.prepend( this.dom.thead );
|
||||
itemDom.host.prepend( tablePart );
|
||||
}
|
||||
else {
|
||||
itemDom.host.append( this.dom.tfoot );
|
||||
itemDom.host.append( tablePart );
|
||||
}
|
||||
|
||||
if ( itemDom.floating ) {
|
||||
|
@ -459,7 +495,9 @@ $.extend( FixedHeader.prototype, {
|
|||
|
||||
// Restore focus if it was lost
|
||||
if ( focus && focus !== document.activeElement ) {
|
||||
focus.focus();
|
||||
setTimeout( function () {
|
||||
focus.focus();
|
||||
}, 10 );
|
||||
}
|
||||
|
||||
this.s.scrollLeft.header = -1;
|
||||
|
@ -493,6 +531,7 @@ $.extend( FixedHeader.prototype, {
|
|||
position.left = tableNode.offset().left;
|
||||
position.theadTop = thead.offset().top;
|
||||
position.tbodyTop = tbody.offset().top;
|
||||
position.tbodyHeight = tbody.outerHeight();
|
||||
position.theadHeight = position.tbodyTop - position.theadTop;
|
||||
|
||||
if ( tfoot.length ) {
|
||||
|
@ -523,12 +562,11 @@ $.extend( FixedHeader.prototype, {
|
|||
var position = this.s.position;
|
||||
var headerMode, footerMode;
|
||||
|
||||
if ( ! this.s.enable ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( this.c.header ) {
|
||||
if ( ! position.visible || windowTop <= position.theadTop - this.c.headerOffset ) {
|
||||
if ( ! this.s.enable ) {
|
||||
headerMode = 'in-place';
|
||||
}
|
||||
else if ( ! position.visible || windowTop <= position.theadTop - this.c.headerOffset ) {
|
||||
headerMode = 'in-place';
|
||||
}
|
||||
else if ( windowTop <= position.tfootTop - position.theadHeight - this.c.headerOffset ) {
|
||||
|
@ -546,7 +584,10 @@ $.extend( FixedHeader.prototype, {
|
|||
}
|
||||
|
||||
if ( this.c.footer && this.dom.tfoot.length ) {
|
||||
if ( ! position.visible || windowTop + position.windowHeight >= position.tfootBottom + this.c.footerOffset ) {
|
||||
if ( ! this.s.enable ) {
|
||||
headerMode = 'in-place';
|
||||
}
|
||||
else if ( ! position.visible || windowTop + position.windowHeight >= position.tfootBottom + this.c.footerOffset ) {
|
||||
footerMode = 'in-place';
|
||||
}
|
||||
else if ( position.windowHeight + windowTop > position.tbodyTop + position.tfootHeight + this.c.footerOffset ) {
|
||||
|
@ -571,7 +612,7 @@ $.extend( FixedHeader.prototype, {
|
|||
* @type {String}
|
||||
* @static
|
||||
*/
|
||||
FixedHeader.version = "3.1.2";
|
||||
FixedHeader.version = "3.1.6-dev";
|
||||
|
||||
/**
|
||||
* Defaults
|
||||
|
@ -631,17 +672,30 @@ DataTable.Api.register( 'fixedHeader.enable()', function ( flag ) {
|
|||
return this.iterator( 'table', function ( ctx ) {
|
||||
var fh = ctx._fixedHeader;
|
||||
|
||||
if ( fh ) {
|
||||
fh.enable( flag !== undefined ? flag : true );
|
||||
flag = ( flag !== undefined ? flag : true );
|
||||
if ( fh && flag !== fh.enabled() ) {
|
||||
fh.enable( flag );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
DataTable.Api.register( 'fixedHeader.enabled()', function () {
|
||||
if ( this.context.length ) {
|
||||
var fx = this.content[0]._fixedHeader;
|
||||
|
||||
if ( fh ) {
|
||||
return fh.enabled();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
DataTable.Api.register( 'fixedHeader.disable()', function ( ) {
|
||||
return this.iterator( 'table', function ( ctx ) {
|
||||
var fh = ctx._fixedHeader;
|
||||
|
||||
if ( fh ) {
|
||||
if ( fh && fh.enabled() ) {
|
||||
fh.enable( false );
|
||||
}
|
||||
} );
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
/*!
|
||||
FixedHeader 3.1.2
|
||||
©2009-2016 SpryMedia Ltd - datatables.net/license
|
||||
FixedHeader 3.1.6-dev
|
||||
©2009-2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(g){return d(g,window,document)}):"object"===typeof exports?module.exports=function(g,h){g||(g=window);if(!h||!h.fn.dataTable)h=require("datatables.net")(g,h).$;return d(h,g,g.document)}:d(jQuery,window,document)})(function(d,g,h,k){var j=d.fn.dataTable,l=0,i=function(b,a){if(!(this instanceof i))throw"FixedHeader must be initialised with the 'new' keyword.";!0===a&&(a={});b=new j.Api(b);this.c=d.extend(!0,
|
||||
{},i.defaults,a);this.s={dt:b,position:{theadTop:0,tbodyTop:0,tfootTop:0,tfootBottom:0,width:0,left:0,tfootHeight:0,theadHeight:0,windowHeight:d(g).height(),visible:!0},headerMode:null,footerMode:null,autoWidth:b.settings()[0].oFeatures.bAutoWidth,namespace:".dtfc"+l++,scrollLeft:{header:-1,footer:-1},enable:!0};this.dom={floatingHeader:null,thead:d(b.table().header()),tbody:d(b.table().body()),tfoot:d(b.table().footer()),header:{host:null,floating:null,placeholder:null},footer:{host:null,floating:null,
|
||||
placeholder:null}};this.dom.header.host=this.dom.thead.parent();this.dom.footer.host=this.dom.tfoot.parent();var e=b.settings()[0];if(e._fixedHeader)throw"FixedHeader already initialised on table "+e.nTable.id;e._fixedHeader=this;this._constructor()};d.extend(i.prototype,{enable:function(b){this.s.enable=b;this.c.header&&this._modeChange("in-place","header",!0);this.c.footer&&this.dom.tfoot.length&&this._modeChange("in-place","footer",!0);this.update()},headerOffset:function(b){b!==k&&(this.c.headerOffset=
|
||||
b,this.update());return this.c.headerOffset},footerOffset:function(b){b!==k&&(this.c.footerOffset=b,this.update());return this.c.footerOffset},update:function(){this._positions();this._scroll(!0)},_constructor:function(){var b=this,a=this.s.dt;d(g).on("scroll"+this.s.namespace,function(){b._scroll()}).on("resize"+this.s.namespace,function(){b.s.position.windowHeight=d(g).height();b.update()});var e=d(".fh-fixedHeader");!this.c.headerOffset&&e.length&&(this.c.headerOffset=e.outerHeight());e=d(".fh-fixedFooter");
|
||||
!this.c.footerOffset&&e.length&&(this.c.footerOffset=e.outerHeight());a.on("column-reorder.dt.dtfc column-visibility.dt.dtfc draw.dt.dtfc column-sizing.dt.dtfc",function(){b.update()});a.on("destroy.dtfc",function(){a.off(".dtfc");d(g).off(b.s.namespace)});this._positions();this._scroll()},_clone:function(b,a){var e=this.s.dt,c=this.dom[b],f="header"===b?this.dom.thead:this.dom.tfoot;!a&&c.floating?c.floating.removeClass("fixedHeader-floating fixedHeader-locked"):(c.floating&&(c.placeholder.remove(),
|
||||
this._unsize(b),c.floating.children().detach(),c.floating.remove()),c.floating=d(e.table().node().cloneNode(!1)).css("table-layout","fixed").removeAttr("id").append(f).appendTo("body"),c.placeholder=f.clone(!1),c.host.prepend(c.placeholder),this._matchWidths(c.placeholder,c.floating))},_matchWidths:function(b,a){var e=function(a){return d(a,b).map(function(){return d(this).width()}).toArray()},c=function(b,c){d(b,a).each(function(a){d(this).css({width:c[a],minWidth:c[a]})})},f=e("th"),e=e("td");c("th",
|
||||
f);c("td",e)},_unsize:function(b){var a=this.dom[b].floating;a&&("footer"===b||"header"===b&&!this.s.autoWidth)?d("th, td",a).css({width:"",minWidth:""}):a&&"header"===b&&d("th, td",a).css("min-width","")},_horizontal:function(b,a){var e=this.dom[b],c=this.s.position,d=this.s.scrollLeft;e.floating&&d[b]!==a&&(e.floating.css("left",c.left-a),d[b]=a)},_modeChange:function(b,a,e){var c=this.dom[a],f=this.s.position,g=d.contains(this.dom["footer"===a?"tfoot":"thead"][0],h.activeElement)?h.activeElement:
|
||||
null;if("in-place"===b){if(c.placeholder&&(c.placeholder.remove(),c.placeholder=null),this._unsize(a),"header"===a?c.host.prepend(this.dom.thead):c.host.append(this.dom.tfoot),c.floating)c.floating.remove(),c.floating=null}else"in"===b?(this._clone(a,e),c.floating.addClass("fixedHeader-floating").css("header"===a?"top":"bottom",this.c[a+"Offset"]).css("left",f.left+"px").css("width",f.width+"px"),"footer"===a&&c.floating.css("top","")):"below"===b?(this._clone(a,e),c.floating.addClass("fixedHeader-locked").css("top",
|
||||
f.tfootTop-f.theadHeight).css("left",f.left+"px").css("width",f.width+"px")):"above"===b&&(this._clone(a,e),c.floating.addClass("fixedHeader-locked").css("top",f.tbodyTop).css("left",f.left+"px").css("width",f.width+"px"));g&&g!==h.activeElement&&g.focus();this.s.scrollLeft.header=-1;this.s.scrollLeft.footer=-1;this.s[a+"Mode"]=b},_positions:function(){var b=this.s.dt.table(),a=this.s.position,e=this.dom,b=d(b.node()),c=b.children("thead"),f=b.children("tfoot"),e=e.tbody;a.visible=b.is(":visible");
|
||||
a.width=b.outerWidth();a.left=b.offset().left;a.theadTop=c.offset().top;a.tbodyTop=e.offset().top;a.theadHeight=a.tbodyTop-a.theadTop;f.length?(a.tfootTop=f.offset().top,a.tfootBottom=a.tfootTop+f.outerHeight(),a.tfootHeight=a.tfootBottom-a.tfootTop):(a.tfootTop=a.tbodyTop+e.outerHeight(),a.tfootBottom=a.tfootTop,a.tfootHeight=a.tfootTop)},_scroll:function(b){var a=d(h).scrollTop(),e=d(h).scrollLeft(),c=this.s.position,f;if(this.s.enable&&(this.c.header&&(f=!c.visible||a<=c.theadTop-this.c.headerOffset?
|
||||
"in-place":a<=c.tfootTop-c.theadHeight-this.c.headerOffset?"in":"below",(b||f!==this.s.headerMode)&&this._modeChange(f,"header",b),this._horizontal("header",e)),this.c.footer&&this.dom.tfoot.length))a=!c.visible||a+c.windowHeight>=c.tfootBottom+this.c.footerOffset?"in-place":c.windowHeight+a>c.tbodyTop+c.tfootHeight+this.c.footerOffset?"in":"above",(b||a!==this.s.footerMode)&&this._modeChange(a,"footer",b),this._horizontal("footer",e)}});i.version="3.1.2";i.defaults={header:!0,footer:!1,headerOffset:0,
|
||||
footerOffset:0};d.fn.dataTable.FixedHeader=i;d.fn.DataTable.FixedHeader=i;d(h).on("init.dt.dtfh",function(b,a){if("dt"===b.namespace){var e=a.oInit.fixedHeader,c=j.defaults.fixedHeader;if((e||c)&&!a._fixedHeader)c=d.extend({},c,e),!1!==e&&new i(a,c)}});j.Api.register("fixedHeader()",function(){});j.Api.register("fixedHeader.adjust()",function(){return this.iterator("table",function(b){(b=b._fixedHeader)&&b.update()})});j.Api.register("fixedHeader.enable()",function(b){return this.iterator("table",
|
||||
function(a){(a=a._fixedHeader)&&a.enable(b!==k?b:!0)})});j.Api.register("fixedHeader.disable()",function(){return this.iterator("table",function(b){(b=b._fixedHeader)&&b.enable(!1)})});d.each(["header","footer"],function(b,a){j.Api.register("fixedHeader."+a+"Offset()",function(b){var c=this.context;return b===k?c.length&&c[0]._fixedHeader?c[0]._fixedHeader[a+"Offset"]():k:this.iterator("table",function(c){if(c=c._fixedHeader)c[a+"Offset"](b)})})});return i});
|
||||
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(g){return d(g,window,document)}):"object"===typeof exports?module.exports=function(g,i){g||(g=window);if(!i||!i.fn.dataTable)i=require("datatables.net")(g,i).$;return d(i,g,g.document)}:d(jQuery,window,document)})(function(d,g,i,k){var h=d.fn.dataTable,l=0,j=function(a,b){if(!(this instanceof j))throw"FixedHeader must be initialised with the 'new' keyword.";!0===b&&(b={});a=new h.Api(a);this.c=d.extend(!0,
|
||||
{},j.defaults,b);this.s={dt:a,position:{theadTop:0,tbodyTop:0,tfootTop:0,tfootBottom:0,width:0,left:0,tfootHeight:0,theadHeight:0,windowHeight:d(g).height(),visible:!0},headerMode:null,footerMode:null,autoWidth:a.settings()[0].oFeatures.bAutoWidth,namespace:".dtfc"+l++,scrollLeft:{header:-1,footer:-1},enable:!0};this.dom={floatingHeader:null,thead:d(a.table().header()),tbody:d(a.table().body()),tfoot:d(a.table().footer()),header:{host:null,floating:null,placeholder:null},footer:{host:null,floating:null,
|
||||
placeholder:null}};this.dom.header.host=this.dom.thead.parent();this.dom.footer.host=this.dom.tfoot.parent();var e=a.settings()[0];if(e._fixedHeader)throw"FixedHeader already initialised on table "+e.nTable.id;e._fixedHeader=this;this._constructor()};d.extend(j.prototype,{destroy:function(){this.s.dt.off(".dtfc");d(g).off(this.s.namespace);this.c.header&&this._modeChange("in-place","header",!0);this.c.footer&&this.dom.tfoot.length&&this._modeChange("in-place","footer",!0)},enable:function(a,b){this.s.enable=
|
||||
a;if(b||b===k)this._positions(),this._scroll(!0)},enabled:function(){return this.s.enable},headerOffset:function(a){a!==k&&(this.c.headerOffset=a,this.update());return this.c.headerOffset},footerOffset:function(a){a!==k&&(this.c.footerOffset=a,this.update());return this.c.footerOffset},update:function(){var a=this.s.dt.table().node();d(a).is(":visible")?this.enable(!0,!1):this.enable(!1,!1);this._positions();this._scroll(!0)},_constructor:function(){var a=this,b=this.s.dt;d(g).on("scroll"+this.s.namespace,
|
||||
function(){a._scroll()}).on("resize"+this.s.namespace,h.util.throttle(function(){a.s.position.windowHeight=d(g).height();a.update()},50));var e=d(".fh-fixedHeader");!this.c.headerOffset&&e.length&&(this.c.headerOffset=e.outerHeight());e=d(".fh-fixedFooter");!this.c.footerOffset&&e.length&&(this.c.footerOffset=e.outerHeight());b.on("column-reorder.dt.dtfc column-visibility.dt.dtfc draw.dt.dtfc column-sizing.dt.dtfc responsive-display.dt.dtfc",function(){a.update()});b.on("destroy.dtfc",function(){a.destroy()});
|
||||
this._positions();this._scroll()},_clone:function(a,b){var e=this.s.dt,c=this.dom[a],f="header"===a?this.dom.thead:this.dom.tfoot;!b&&c.floating?c.floating.removeClass("fixedHeader-floating fixedHeader-locked"):(c.floating&&(c.placeholder.remove(),this._unsize(a),c.floating.children().detach(),c.floating.remove()),c.floating=d(e.table().node().cloneNode(!1)).css("table-layout","fixed").attr("aria-hidden","true").removeAttr("id").append(f).appendTo("body"),c.placeholder=f.clone(!1),c.placeholder.find("*[id]").removeAttr("id"),
|
||||
c.host.prepend(c.placeholder),this._matchWidths(c.placeholder,c.floating))},_matchWidths:function(a,b){var e=function(b){return d(b,a).map(function(){return d(this).width()}).toArray()},c=function(a,c){d(a,b).each(function(a){d(this).css({width:c[a],minWidth:c[a]})})},f=e("th"),e=e("td");c("th",f);c("td",e)},_unsize:function(a){var b=this.dom[a].floating;b&&("footer"===a||"header"===a&&!this.s.autoWidth)?d("th, td",b).css({width:"",minWidth:""}):b&&"header"===a&&d("th, td",b).css("min-width","")},
|
||||
_horizontal:function(a,b){var e=this.dom[a],c=this.s.position,d=this.s.scrollLeft;e.floating&&d[a]!==b&&(e.floating.css("left",c.left-b),d[a]=b)},_modeChange:function(a,b,e){var c=this.dom[b],f=this.s.position,g=this.dom["footer"===b?"tfoot":"thead"],h=d.contains(g[0],i.activeElement)?i.activeElement:null;h&&h.blur();if("in-place"===a){if(c.placeholder&&(c.placeholder.remove(),c.placeholder=null),this._unsize(b),"header"===b?c.host.prepend(g):c.host.append(g),c.floating)c.floating.remove(),c.floating=
|
||||
null}else"in"===a?(this._clone(b,e),c.floating.addClass("fixedHeader-floating").css("header"===b?"top":"bottom",this.c[b+"Offset"]).css("left",f.left+"px").css("width",f.width+"px"),"footer"===b&&c.floating.css("top","")):"below"===a?(this._clone(b,e),c.floating.addClass("fixedHeader-locked").css("top",f.tfootTop-f.theadHeight).css("left",f.left+"px").css("width",f.width+"px")):"above"===a&&(this._clone(b,e),c.floating.addClass("fixedHeader-locked").css("top",f.tbodyTop).css("left",f.left+"px").css("width",
|
||||
f.width+"px"));h&&h!==i.activeElement&&setTimeout(function(){h.focus()},10);this.s.scrollLeft.header=-1;this.s.scrollLeft.footer=-1;this.s[b+"Mode"]=a},_positions:function(){var a=this.s.dt.table(),b=this.s.position,e=this.dom,a=d(a.node()),c=a.children("thead"),f=a.children("tfoot"),e=e.tbody;b.visible=a.is(":visible");b.width=a.outerWidth();b.left=a.offset().left;b.theadTop=c.offset().top;b.tbodyTop=e.offset().top;b.tbodyHeight=e.outerHeight();b.theadHeight=b.tbodyTop-b.theadTop;f.length?(b.tfootTop=
|
||||
f.offset().top,b.tfootBottom=b.tfootTop+f.outerHeight(),b.tfootHeight=b.tfootBottom-b.tfootTop):(b.tfootTop=b.tbodyTop+e.outerHeight(),b.tfootBottom=b.tfootTop,b.tfootHeight=b.tfootTop)},_scroll:function(a){var b=d(i).scrollTop(),e=d(i).scrollLeft(),c=this.s.position,f,g;this.c.header&&(f=this.s.enable?!c.visible||b<=c.theadTop-this.c.headerOffset?"in-place":b<=c.tfootTop-c.theadHeight-this.c.headerOffset?"in":"below":"in-place",(a||f!==this.s.headerMode)&&this._modeChange(f,"header",a),this._horizontal("header",
|
||||
e));this.c.footer&&this.dom.tfoot.length&&(this.s.enable&&(g=!c.visible||b+c.windowHeight>=c.tfootBottom+this.c.footerOffset?"in-place":c.windowHeight+b>c.tbodyTop+c.tfootHeight+this.c.footerOffset?"in":"above"),(a||g!==this.s.footerMode)&&this._modeChange(g,"footer",a),this._horizontal("footer",e))}});j.version="3.1.6-dev";j.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0};d.fn.dataTable.FixedHeader=j;d.fn.DataTable.FixedHeader=j;d(i).on("init.dt.dtfh",function(a,b){if("dt"===a.namespace){var e=
|
||||
b.oInit.fixedHeader,c=h.defaults.fixedHeader;if((e||c)&&!b._fixedHeader)c=d.extend({},c,e),!1!==e&&new j(b,c)}});h.Api.register("fixedHeader()",function(){});h.Api.register("fixedHeader.adjust()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.update()})});h.Api.register("fixedHeader.enable()",function(a){return this.iterator("table",function(b){b=b._fixedHeader;a=a!==k?a:!0;b&&a!==b.enabled()&&b.enable(a)})});h.Api.register("fixedHeader.enabled()",function(){return this.context.length&&
|
||||
fh?fh.enabled():!1});h.Api.register("fixedHeader.disable()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.enabled()&&a.enable(!1)})});d.each(["header","footer"],function(a,b){h.Api.register("fixedHeader."+b+"Offset()",function(a){var c=this.context;return a===k?c.length&&c[0]._fixedHeader?c[0]._fixedHeader[b+"Offset"]():k:this.iterator("table",function(c){if(c=c._fixedHeader)c[b+"Offset"](a)})})});return j});
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"_from": "datatables.net-fixedheader@3.1.6",
|
||||
"_id": "datatables.net-fixedheader@3.1.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-EMx2JogtXEQObaF7ylgB+pY4/vWhu/plTZNf5EvNMAboRha6FT4+14CHIyARVM/bjySPU+6advtft02pW3KxJg==",
|
||||
"_location": "/datatables.net-fixedheader",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-fixedheader@3.1.6",
|
||||
"name": "datatables.net-fixedheader",
|
||||
"escapedName": "datatables.net-fixedheader",
|
||||
"rawSpec": "3.1.6",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.1.6"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/datatables.net-fixedheader-bs4"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-fixedheader/-/datatables.net-fixedheader-3.1.6.tgz",
|
||||
"_shasum": "b139b88a213460dbeca5080c6251e81575697188",
|
||||
"_spec": "datatables.net-fixedheader@3.1.6",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella\\node_modules\\datatables.net-fixedheader-bs4",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net": "^1.10.15",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "FixedHeader for DataTables ",
|
||||
"files": [
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"fixed headers",
|
||||
"sticky",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/dataTables.fixedHeader.js",
|
||||
"name": "datatables.net-fixedheader",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DataTables/Dist-DataTables-FixedHeader.git"
|
||||
},
|
||||
"version": "3.1.6"
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
# KeyTable for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)
|
||||
|
||||
This package contains distribution files required to style [KeyTable extension](https://datatables.net/extensions/keytable) for [DataTables](https://datatables.net/) with styling for [Bootstrap 4](http://getbootstrap.com/).
|
||||
|
||||
KeyTable allows you to use keyboard navigation on a DataTables enhanced table, like an Excel spreadsheet - a cell shows a focus outline which can be moved using the keyboard or mouse operations. This can be particularly useful in an editable table that uses Editor allowing end users to update data very quickly.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Browser
|
||||
|
||||
For inclusion of this library using a standard `<script>` tag, rather than using this package, it is recommended that you use the [DataTables download builder](//datatables.net/download) which can create CDN or locally hosted packages for you, will all dependencies satisfied.
|
||||
|
||||
### npm
|
||||
|
||||
```
|
||||
npm install datatables.net-keytable-bs4
|
||||
```
|
||||
|
||||
```
|
||||
var $ = require( 'jquery' );
|
||||
require( 'datatables.net-keytable-bs4' )( $ );
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```
|
||||
bower install --save datatables.net-keytable-bs4
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation of the DataTables options, API and plug-in interface are available on the DOCS_LINK. The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further.
|
||||
|
||||
|
||||
## Bug / Support
|
||||
|
||||
Support for DataTables is available through the [DataTables forums](//datatables.net/forums) and [commercial support options](//datatables.net/support) are available.
|
||||
|
||||
|
||||
### Contributing
|
||||
|
||||
If you are thinking of contributing code to DataTables, first of all, thank you! All fixes, patches and enhancements to DataTables are very warmly welcomed. This repository is a distribution repo, so patches and issues sent to this repo will not be accepted. Instead, please direct pull requests to the [DataTables/KeyTable](http://github.com/DataTables/KeyTable). For issues / bugs, please direct your questions to the [DataTables forums](//datatables.net/forums).
|
||||
|
||||
|
||||
## License
|
||||
|
||||
This software is released under the [MIT license](//datatables.net/license). You are free to use, modify and distribute this software, but all copyright information must remain.
|
|
@ -0,0 +1,9 @@
|
|||
table.dataTable tbody th.focus,
|
||||
table.dataTable tbody td.focus {
|
||||
box-shadow: inset 0 0 1px 2px #0275d8;
|
||||
}
|
||||
|
||||
div.dtk-focus-alt table.dataTable tbody th.focus,
|
||||
div.dtk-focus-alt table.dataTable tbody td.focus {
|
||||
box-shadow: inset 0 0 1px 2px #ff8b33;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
table.dataTable tbody th.focus,table.dataTable tbody td.focus{box-shadow:inset 0 0 1px 2px #0275d8}div.dtk-focus-alt table.dataTable tbody th.focus,div.dtk-focus-alt table.dataTable tbody td.focus{box-shadow:inset 0 0 1px 2px #ff8b33}
|
|
@ -0,0 +1,38 @@
|
|||
/*! Bootstrap 4 styling wrapper for KeyTable
|
||||
* ©2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-bs4', 'datatables.net-keytable'], function ( $ ) {
|
||||
return factory( $, window, document );
|
||||
} );
|
||||
}
|
||||
else if ( typeof exports === 'object' ) {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if ( ! root ) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if ( ! $ || ! $.fn.dataTable ) {
|
||||
$ = require('datatables.net-bs4')(root, $).$;
|
||||
}
|
||||
|
||||
if ( ! $.fn.dataTable.KeyTable ) {
|
||||
require('datatables.net-keytable')(root, $);
|
||||
}
|
||||
|
||||
return factory( $, root, root.document );
|
||||
};
|
||||
}
|
||||
else {
|
||||
// Browser
|
||||
factory( jQuery, window, document );
|
||||
}
|
||||
}(function( $, window, document, undefined ) {
|
||||
|
||||
return $.fn.dataTable;
|
||||
|
||||
}));
|
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
Bootstrap 4 styling wrapper for KeyTable
|
||||
©2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-keytable"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.KeyTable||require("datatables.net-keytable")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){return c.fn.dataTable});
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"_from": "datatables.net-keytable-bs4",
|
||||
"_id": "datatables.net-keytable-bs4@2.5.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-K3WlmCxVsmUpIKNEbP+2gggJ4eVnHI8NUleSDagmpromxErxmvsli7Sa35ZCRaCkMn/81TwFMIA2cHKfYotJyQ==",
|
||||
"_location": "/datatables.net-keytable-bs4",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-keytable-bs4",
|
||||
"name": "datatables.net-keytable-bs4",
|
||||
"escapedName": "datatables.net-keytable-bs4",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-keytable-bs4/-/datatables.net-keytable-bs4-2.5.1.tgz",
|
||||
"_shasum": "011b1950322d9038b1a1958d0a3e58679d902cb2",
|
||||
"_spec": "datatables.net-keytable-bs4",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net-bs4": "^1.10.15",
|
||||
"datatables.net-keytable": "2.5.1",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "KeyTable for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)",
|
||||
"files": [
|
||||
"css/**/*.css",
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"spreadsheet",
|
||||
"excel",
|
||||
"keyboard",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap 4"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/keyTable.bootstrap4.js",
|
||||
"name": "datatables.net-keytable-bs4",
|
||||
"style": "css/keyTable.bootstrap4.css",
|
||||
"version": "2.5.1"
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-keytable",
|
||||
"description": "KeyTable for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.keyTable.js"
|
||||
],
|
||||
"keywords": [
|
||||
"spreadsheet",
|
||||
"excel",
|
||||
"keyboard",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "2.1.2",
|
||||
"_release": "2.1.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.1.2",
|
||||
"commit": "2debcfe4f7e4b0e73d5f5c9daec429e8788d2921"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-KeyTable.git",
|
||||
"_target": "^2.1.1",
|
||||
"_originalSource": "datatables.net-keytable"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# KeyTable for DataTables
|
||||
|
||||
This package contains distribution files for the [KeyTable extension](https://datatables.net/extensions/keytable) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for KeyTable must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getboostrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
This package contains distribution files for the [KeyTable extension](https://datatables.net/extensions/keytable) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for KeyTable must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
|
||||
KeyTable allows you to use keyboard navigation on a DataTables enhanced table, like an Excel spreadsheet - a cell shows a focus outline which can be moved using the keyboard or mouse operations. This can be particularly useful in an editable table that uses Editor allowing end users to update data very quickly.
|
||||
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-keytable",
|
||||
"description": "KeyTable for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.keyTable.js"
|
||||
],
|
||||
"keywords": [
|
||||
"spreadsheet",
|
||||
"excel",
|
||||
"keyboard",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
/*! KeyTable 2.1.2
|
||||
* ©2009-2016 SpryMedia Ltd - datatables.net/license
|
||||
/*! KeyTable 2.5.1
|
||||
* ©2009-2019 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @summary KeyTable
|
||||
* @description Spreadsheet like keyboard navigation for DataTables
|
||||
* @version 2.1.2
|
||||
* @version 2.5.1
|
||||
* @file dataTables.keyTable.js
|
||||
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
||||
* @contact www.sprymedia.co.uk/contact
|
||||
* @copyright Copyright 2009-2016 SpryMedia Ltd.
|
||||
* @copyright Copyright 2009-2019 SpryMedia Ltd.
|
||||
*
|
||||
* This source file is free software, available under the following license:
|
||||
* MIT license - http://datatables.net/license/mit
|
||||
|
@ -49,6 +49,7 @@
|
|||
}(function( $, window, document, undefined ) {
|
||||
'use strict';
|
||||
var DataTable = $.fn.dataTable;
|
||||
var namespaceCounter = 0;
|
||||
|
||||
|
||||
var KeyTable = function ( dt, opts ) {
|
||||
|
@ -72,7 +73,18 @@ var KeyTable = function ( dt, opts ) {
|
|||
enable: true,
|
||||
|
||||
/** @type {bool} Flag for if a draw is triggered by focus */
|
||||
focusDraw: false
|
||||
focusDraw: false,
|
||||
|
||||
/** @type {bool} Flag to indicate when waiting for a draw to happen.
|
||||
* Will ignore key presses at this point
|
||||
*/
|
||||
waitingForDraw: false,
|
||||
|
||||
/** @type {object} Information about the last cell that was focused */
|
||||
lastFocus: null,
|
||||
|
||||
/** @type {string} Unique namespace per instance */
|
||||
namespace: '.keyTable-'+(namespaceCounter++)
|
||||
};
|
||||
|
||||
// DOM items
|
||||
|
@ -96,7 +108,7 @@ $.extend( KeyTable.prototype, {
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* API methods for DataTables API interface
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Blur the table's cell focus
|
||||
*/
|
||||
|
@ -138,7 +150,7 @@ $.extend( KeyTable.prototype, {
|
|||
return false;
|
||||
}
|
||||
|
||||
var lastIdx = this.s.lastFocus.index();
|
||||
var lastIdx = this.s.lastFocus.cell.index();
|
||||
return cell.row === lastIdx.row && cell.column === lastIdx.column;
|
||||
},
|
||||
|
||||
|
@ -159,6 +171,8 @@ $.extend( KeyTable.prototype, {
|
|||
var that = this;
|
||||
var dt = this.s.dt;
|
||||
var table = $( dt.table().node() );
|
||||
var namespace = this.s.namespace;
|
||||
var editorBlock = false;
|
||||
|
||||
// Need to be able to calculate the cell positions relative to the table
|
||||
if ( table.css('position') === 'static' ) {
|
||||
|
@ -166,7 +180,7 @@ $.extend( KeyTable.prototype, {
|
|||
}
|
||||
|
||||
// Click to focus
|
||||
$( dt.table().body() ).on( 'click.keyTable', 'th, td', function () {
|
||||
$( dt.table().body() ).on( 'click'+namespace, 'th, td', function (e) {
|
||||
if ( that.s.enable === false ) {
|
||||
return;
|
||||
}
|
||||
|
@ -177,17 +191,19 @@ $.extend( KeyTable.prototype, {
|
|||
return;
|
||||
}
|
||||
|
||||
that._focus( cell, null, false );
|
||||
that._focus( cell, null, false, e );
|
||||
} );
|
||||
|
||||
// Key events
|
||||
$( document ).on( 'keydown.keyTable', function (e) {
|
||||
that._key( e );
|
||||
$( document ).on( 'keydown'+namespace, function (e) {
|
||||
if ( ! editorBlock ) {
|
||||
that._key( e );
|
||||
}
|
||||
} );
|
||||
|
||||
// Click blur
|
||||
if ( this.c.blurable ) {
|
||||
$( document ).on( 'click.keyTable', function ( e ) {
|
||||
$( document ).on( 'mousedown'+namespace, function ( e ) {
|
||||
// Click on the search input will blur focus
|
||||
if ( $(e.target).parents( '.dataTables_filter' ).length ) {
|
||||
that._blur();
|
||||
|
@ -203,52 +219,130 @@ $.extend( KeyTable.prototype, {
|
|||
return;
|
||||
}
|
||||
|
||||
// Or an Editor date input
|
||||
if ( $(e.target).parents('div.editor-datetime').length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
//If the click was inside the fixed columns container, don't blur
|
||||
if ( $(e.target).parents().filter('.DTFC_Cloned').length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
that._blur();
|
||||
} );
|
||||
}
|
||||
|
||||
if ( this.c.editor ) {
|
||||
dt.on( 'key.keyTable', function ( e, dt, key, cell, orig ) {
|
||||
that._editor( key, orig );
|
||||
var editor = this.c.editor;
|
||||
|
||||
// Need to disable KeyTable when the main editor is shown
|
||||
editor.on( 'open.keyTableMain', function (e, mode, action) {
|
||||
if ( mode !== 'inline' && that.s.enable ) {
|
||||
that.enable( false );
|
||||
|
||||
editor.one( 'close'+namespace, function () {
|
||||
that.enable( true );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
if ( this.c.editOnFocus ) {
|
||||
dt.on( 'key-focus'+namespace+' key-refocus'+namespace, function ( e, dt, cell, orig ) {
|
||||
that._editor( null, orig, true );
|
||||
} );
|
||||
}
|
||||
|
||||
// Activate Editor when a key is pressed (will be ignored, if
|
||||
// already active).
|
||||
dt.on( 'key'+namespace, function ( e, dt, key, cell, orig ) {
|
||||
that._editor( key, orig, false );
|
||||
} );
|
||||
|
||||
// Active editing on double click - it will already have focus from
|
||||
// the click event handler above
|
||||
$( dt.table().body() ).on( 'dblclick'+namespace, 'th, td', function (e) {
|
||||
if ( that.s.enable === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cell = dt.cell( this );
|
||||
|
||||
if ( ! cell.any() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
that._editor( null, e, true );
|
||||
} );
|
||||
|
||||
// While Editor is busy processing, we don't want to process any key events
|
||||
editor
|
||||
.on('preSubmit', function () {
|
||||
editorBlock = true;
|
||||
} )
|
||||
.on('preSubmitCancelled', function () {
|
||||
editorBlock = false;
|
||||
} )
|
||||
.on('submitComplete', function () {
|
||||
editorBlock = false;
|
||||
} );
|
||||
}
|
||||
|
||||
// Stave saving
|
||||
if ( dt.settings()[0].oFeatures.bStateSave ) {
|
||||
dt.on( 'stateSaveParams.keyTable', function (e, s, d) {
|
||||
dt.on( 'stateSaveParams'+namespace, function (e, s, d) {
|
||||
d.keyTable = that.s.lastFocus ?
|
||||
that.s.lastFocus.index() :
|
||||
that.s.lastFocus.cell.index() :
|
||||
null;
|
||||
} );
|
||||
}
|
||||
|
||||
// Reload - re-focus on the currently selected item. In SSP mode this
|
||||
// has the effect of keeping the focus in position when changing page as
|
||||
// well (which is different from how client-side processing works).
|
||||
dt.on( 'xhr.keyTable', function ( e ) {
|
||||
// Redraw - retain focus on the current cell
|
||||
dt.on( 'draw'+namespace, function (e) {
|
||||
if ( that.s.focusDraw ) {
|
||||
// Triggered by server-side processing, and thus `_focus` will
|
||||
// do the refocus on the next draw event
|
||||
return;
|
||||
}
|
||||
|
||||
var lastFocus = that.s.lastFocus;
|
||||
|
||||
if ( lastFocus ) {
|
||||
that.s.lastFocus = null;
|
||||
if ( lastFocus && lastFocus.node && $(lastFocus.node).closest('body') === document.body ) {
|
||||
var relative = that.s.lastFocus.relative;
|
||||
var info = dt.page.info();
|
||||
var row = relative.row + info.start;
|
||||
|
||||
dt.one( 'draw', function () {
|
||||
that._focus( lastFocus );
|
||||
} );
|
||||
if ( info.recordsDisplay === 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Reverse if needed
|
||||
if ( row >= info.recordsDisplay ) {
|
||||
row = info.recordsDisplay - 1;
|
||||
}
|
||||
|
||||
that._focus( row, relative.column, true, e );
|
||||
}
|
||||
} );
|
||||
|
||||
dt.on( 'destroy.keyTable', function () {
|
||||
dt.off( '.keyTable' );
|
||||
$( dt.table().body() ).off( 'click.keyTable', 'th, td' );
|
||||
$( document.body )
|
||||
.off( 'keydown.keyTable' )
|
||||
.off( 'click.keyTable' );
|
||||
// Clipboard support
|
||||
if ( this.c.clipboard ) {
|
||||
this._clipboard();
|
||||
}
|
||||
|
||||
dt.on( 'destroy'+namespace, function () {
|
||||
that._blur( true );
|
||||
|
||||
// Event tidy up
|
||||
dt.off( namespace );
|
||||
|
||||
$( dt.table().body() )
|
||||
.off( 'click'+namespace, 'th, td' )
|
||||
.off( 'dblclick'+namespace, 'th, td' );
|
||||
|
||||
$( document )
|
||||
.off( 'mousedown'+namespace )
|
||||
.off( 'keydown'+namespace )
|
||||
.off( 'copy'+namespace )
|
||||
.off( 'paste'+namespace );
|
||||
} );
|
||||
|
||||
// Initial focus comes from state or options
|
||||
|
@ -271,8 +365,6 @@ $.extend( KeyTable.prototype, {
|
|||
},
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Private methods
|
||||
*/
|
||||
|
@ -280,20 +372,93 @@ $.extend( KeyTable.prototype, {
|
|||
/**
|
||||
* Blur the control
|
||||
*
|
||||
* @param {boolean} [noEvents=false] Don't trigger updates / events (for destroying)
|
||||
* @private
|
||||
*/
|
||||
_blur: function ()
|
||||
_blur: function (noEvents)
|
||||
{
|
||||
if ( ! this.s.enable || ! this.s.lastFocus ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cell = this.s.lastFocus;
|
||||
var cell = this.s.lastFocus.cell;
|
||||
|
||||
$( cell.node() ).removeClass( this.c.className );
|
||||
this.s.lastFocus = null;
|
||||
|
||||
this._emitEvent( 'key-blur', [ this.s.dt, cell ] );
|
||||
if ( ! noEvents ) {
|
||||
this._updateFixedColumns(cell.index().column);
|
||||
|
||||
this._emitEvent( 'key-blur', [ this.s.dt, cell ] );
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Clipboard interaction handlers
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
_clipboard: function () {
|
||||
var dt = this.s.dt;
|
||||
var that = this;
|
||||
var namespace = this.s.namespace;
|
||||
|
||||
// IE8 doesn't support getting selected text
|
||||
if ( ! window.getSelection ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(document).on( 'copy'+namespace, function (ejq) {
|
||||
var e = ejq.originalEvent;
|
||||
var selection = window.getSelection().toString();
|
||||
var focused = that.s.lastFocus;
|
||||
|
||||
// Only copy cell text to clipboard if there is no other selection
|
||||
// and there is a focused cell
|
||||
if ( ! selection && focused ) {
|
||||
e.clipboardData.setData(
|
||||
'text/plain',
|
||||
focused.cell.render( that.c.clipboardOrthogonal )
|
||||
);
|
||||
e.preventDefault();
|
||||
}
|
||||
} );
|
||||
|
||||
$(document).on( 'paste'+namespace, function (ejq) {
|
||||
var e = ejq.originalEvent;
|
||||
var focused = that.s.lastFocus;
|
||||
var activeEl = document.activeElement;
|
||||
var editor = that.c.editor;
|
||||
var pastedText;
|
||||
|
||||
if ( focused && (! activeEl || activeEl.nodeName.toLowerCase() === 'body') ) {
|
||||
e.preventDefault();
|
||||
|
||||
if ( window.clipboardData && window.clipboardData.getData ) {
|
||||
// IE
|
||||
pastedText = window.clipboardData.getData('Text');
|
||||
}
|
||||
else if ( e.clipboardData && e.clipboardData.getData ) {
|
||||
// Everything else
|
||||
pastedText = e.clipboardData.getData('text/plain');
|
||||
}
|
||||
|
||||
if ( editor ) {
|
||||
// Got Editor - need to activate inline editing,
|
||||
// set the value and submit
|
||||
editor
|
||||
.inline( focused.cell.index() )
|
||||
.set( editor.displayed()[0], pastedText )
|
||||
.submit();
|
||||
}
|
||||
else {
|
||||
// No editor, so just dump the data in
|
||||
focused.cell.data( pastedText );
|
||||
dt.draw(false);
|
||||
}
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
|
||||
|
@ -327,42 +492,105 @@ $.extend( KeyTable.prototype, {
|
|||
* @param {object} orig Original event
|
||||
* @private
|
||||
*/
|
||||
_editor: function ( key, orig )
|
||||
_editor: function ( key, orig, hardEdit )
|
||||
{
|
||||
var that = this;
|
||||
var dt = this.s.dt;
|
||||
var editor = this.c.editor;
|
||||
var editCell = this.s.lastFocus.cell;
|
||||
var namespace = this.s.namespace;
|
||||
|
||||
// Do nothing if there is already an inline edit in this cell
|
||||
if ( $('div.DTE', editCell.node()).length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't activate Editor on control key presses
|
||||
if ( key !== null && (
|
||||
(key >= 0x00 && key <= 0x09) ||
|
||||
key === 0x0b ||
|
||||
key === 0x0c ||
|
||||
(key >= 0x0e && key <= 0x1f) ||
|
||||
(key >= 0x70 && key <= 0x7b) ||
|
||||
(key >= 0x7f && key <= 0x9f)
|
||||
) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
orig.stopPropagation();
|
||||
|
||||
// Return key should do nothing - for textareas's it would empty the
|
||||
// Return key should do nothing - for textareas it would empty the
|
||||
// contents
|
||||
if ( key === 13 ) {
|
||||
orig.preventDefault();
|
||||
}
|
||||
|
||||
editor.inline( this.s.lastFocus.index() );
|
||||
var editInline = function () {
|
||||
editor
|
||||
.one( 'open'+namespace, function () {
|
||||
// Remove cancel open
|
||||
editor.off( 'cancelOpen'+namespace );
|
||||
|
||||
// Excel style - select all text
|
||||
var input = $('div.DTE input, div.DTE textarea');
|
||||
if ( input.length ) {
|
||||
input[0].select();
|
||||
// Excel style - select all text
|
||||
if ( ! hardEdit ) {
|
||||
$('div.DTE_Field_InputControl input, div.DTE_Field_InputControl textarea').select();
|
||||
}
|
||||
|
||||
// Reduce the keys the Keys listens for
|
||||
dt.keys.enable( hardEdit ? 'tab-only' : 'navigation-only' );
|
||||
|
||||
// On blur of the navigation submit
|
||||
dt.on( 'key-blur.editor', function (e, dt, cell) {
|
||||
if ( editor.displayed() && cell.node() === editCell.node() ) {
|
||||
editor.submit();
|
||||
}
|
||||
} );
|
||||
|
||||
// Highlight the cell a different colour on full edit
|
||||
if ( hardEdit ) {
|
||||
$( dt.table().container() ).addClass('dtk-focus-alt');
|
||||
}
|
||||
|
||||
// If the dev cancels the submit, we need to return focus
|
||||
editor.on( 'preSubmitCancelled'+namespace, function () {
|
||||
setTimeout( function () {
|
||||
that._focus( editCell, null, false );
|
||||
}, 50 );
|
||||
} );
|
||||
|
||||
editor.on( 'submitUnsuccessful'+namespace, function () {
|
||||
that._focus( editCell, null, false );
|
||||
} );
|
||||
|
||||
// Restore full key navigation on close
|
||||
editor.one( 'close', function () {
|
||||
dt.keys.enable( true );
|
||||
dt.off( 'key-blur.editor' );
|
||||
editor.off( namespace );
|
||||
$( dt.table().container() ).removeClass('dtk-focus-alt');
|
||||
} );
|
||||
} )
|
||||
.one( 'cancelOpen'+namespace, function () {
|
||||
// `preOpen` can cancel the display of the form, so it
|
||||
// might be that the open event handler isn't needed
|
||||
editor.off( namespace );
|
||||
} )
|
||||
.inline( editCell.index() );
|
||||
};
|
||||
|
||||
// Editor 1.7 listens for `return` on keyup, so if return is the trigger
|
||||
// key, we need to wait for `keyup` otherwise Editor would just submit
|
||||
// the content triggered by this keypress.
|
||||
if ( key === 13 ) {
|
||||
hardEdit = true;
|
||||
|
||||
$(document).one( 'keyup', function () { // immediately removed
|
||||
editInline();
|
||||
} );
|
||||
}
|
||||
else {
|
||||
editInline();
|
||||
}
|
||||
|
||||
// Reduce the keys the Keys listens for
|
||||
dt.keys.enable( 'navigation-only' );
|
||||
|
||||
// On blur of the navigation submit
|
||||
dt.one( 'key-blur.editor', function () {
|
||||
if ( editor.displayed() ) {
|
||||
editor.submit();
|
||||
}
|
||||
} );
|
||||
|
||||
// Restore full key navigation on close
|
||||
editor.one( 'close', function () {
|
||||
dt.keys.enable( true );
|
||||
dt.off( 'key-blur.editor' );
|
||||
} );
|
||||
},
|
||||
|
||||
|
||||
|
@ -386,25 +614,34 @@ $.extend( KeyTable.prototype, {
|
|||
*
|
||||
* @param {DataTables.Api|integer} row Can be given as an API instance that
|
||||
* contains the cell to focus or as an integer. As the latter it is the
|
||||
* visible row index - NOT the data index
|
||||
* visible row index (from the whole data set) - NOT the data index
|
||||
* @param {integer} [column] Not required if a cell is given as the first
|
||||
* parameter. Otherwise this is the column data index for the cell to
|
||||
* focus on
|
||||
* @param {boolean} [shift=true] Should the viewport be moved to show cell
|
||||
* @private
|
||||
*/
|
||||
_focus: function ( row, column, shift )
|
||||
_focus: function ( row, column, shift, originalEvent )
|
||||
{
|
||||
var that = this;
|
||||
var dt = this.s.dt;
|
||||
var pageInfo = dt.page.info();
|
||||
var lastFocus = this.s.lastFocus;
|
||||
|
||||
if ( ! originalEvent) {
|
||||
originalEvent = null;
|
||||
}
|
||||
|
||||
if ( ! this.s.enable ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( typeof row !== 'number' ) {
|
||||
// Its an API instance - check that there is actually a row
|
||||
if ( ! row.any() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Convert the cell to a row and column
|
||||
var index = row.index();
|
||||
column = index.column;
|
||||
|
@ -412,6 +649,11 @@ $.extend( KeyTable.prototype, {
|
|||
.rows( { filter: 'applied', order: 'applied' } )
|
||||
.indexes()
|
||||
.indexOf( index.row );
|
||||
|
||||
// Don't focus rows that were filtered out.
|
||||
if ( row < 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// For server-side processing normalise the row by adding the start
|
||||
// point, since `rows().indexes()` includes only rows that are
|
||||
|
@ -425,11 +667,13 @@ $.extend( KeyTable.prototype, {
|
|||
// page
|
||||
if ( pageInfo.length !== -1 && (row < pageInfo.start || row >= pageInfo.start+pageInfo.length) ) {
|
||||
this.s.focusDraw = true;
|
||||
this.s.waitingForDraw = true;
|
||||
|
||||
dt
|
||||
.one( 'draw', function () {
|
||||
that.s.focusDraw = false;
|
||||
that._focus( row, column );
|
||||
that.s.waitingForDraw = false;
|
||||
that._focus( row, column, undefined, originalEvent );
|
||||
} )
|
||||
.page( Math.floor( row / pageInfo.length ) )
|
||||
.draw( false );
|
||||
|
@ -448,11 +692,15 @@ $.extend( KeyTable.prototype, {
|
|||
row -= pageInfo.start;
|
||||
}
|
||||
|
||||
var cell = dt.cell( ':eq('+row+')', column, {search: 'applied'} );
|
||||
// Get the cell from the current position - ignoring any cells which might
|
||||
// not have been rendered (therefore can't use `:eq()` selector).
|
||||
var cells = dt.cells( null, column, {search: 'applied', order: 'applied'} ).flatten();
|
||||
var cell = dt.cell( cells[ row ] );
|
||||
|
||||
if ( lastFocus ) {
|
||||
// Don't trigger a refocus on the same cell
|
||||
if ( lastFocus.node() === cell.node() ) {
|
||||
if ( lastFocus.node === cell.node() ) {
|
||||
this._emitEvent( 'key-refocus', [ this.s.dt, cell, originalEvent || null ] );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -460,9 +708,14 @@ $.extend( KeyTable.prototype, {
|
|||
this._blur();
|
||||
}
|
||||
|
||||
// Clear focus from other tables
|
||||
this._removeOtherFocus();
|
||||
|
||||
var node = $( cell.node() );
|
||||
node.addClass( this.c.className );
|
||||
|
||||
this._updateFixedColumns(column);
|
||||
|
||||
// Shift viewpoint and page to make cell visible
|
||||
if ( shift === undefined || shift === true ) {
|
||||
this._scroll( $(window), $(document.body), node, 'offset' );
|
||||
|
@ -476,9 +729,16 @@ $.extend( KeyTable.prototype, {
|
|||
}
|
||||
|
||||
// Event and finish
|
||||
this.s.lastFocus = cell;
|
||||
this.s.lastFocus = {
|
||||
cell: cell,
|
||||
node: cell.node(),
|
||||
relative: {
|
||||
row: dt.rows( { page: 'current' } ).indexes().indexOf( cell.index().row ),
|
||||
column: cell.index().column
|
||||
}
|
||||
};
|
||||
|
||||
this._emitEvent( 'key-focus', [ this.s.dt, cell ] );
|
||||
this._emitEvent( 'key-focus', [ this.s.dt, cell, originalEvent || null ] );
|
||||
dt.state.save();
|
||||
},
|
||||
|
||||
|
@ -491,22 +751,38 @@ $.extend( KeyTable.prototype, {
|
|||
*/
|
||||
_key: function ( e )
|
||||
{
|
||||
if ( ! this.s.enable ) {
|
||||
// If we are waiting for a draw to happen from another key event, then
|
||||
// do nothing for this new key press.
|
||||
if ( this.s.waitingForDraw ) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( e.keyCode === 0 || e.ctrlKey || e.metaKey || e.altKey ) {
|
||||
var enable = this.s.enable;
|
||||
var navEnable = enable === true || enable === 'navigation-only';
|
||||
if ( ! enable ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( (e.keyCode === 0 || e.ctrlKey || e.metaKey || e.altKey) && !(e.ctrlKey && e.altKey) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If not focused, then there is no key action to take
|
||||
var cell = this.s.lastFocus;
|
||||
if ( ! cell ) {
|
||||
var lastFocus = this.s.lastFocus;
|
||||
if ( ! lastFocus ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// And the last focus still exists!
|
||||
if ( ! this.s.dt.cell(lastFocus.node).any() ) {
|
||||
this.s.lastFocus = null;
|
||||
return;
|
||||
}
|
||||
|
||||
var that = this;
|
||||
var dt = this.s.dt;
|
||||
var scrolling = this.s.dt.settings()[0].oScroll.sY ? true : false;
|
||||
|
||||
// If we are not listening for this key, do nothing
|
||||
if ( this.c.keys && $.inArray( e.keyCode, this.c.keys ) === -1 ) {
|
||||
|
@ -515,68 +791,93 @@ $.extend( KeyTable.prototype, {
|
|||
|
||||
switch( e.keyCode ) {
|
||||
case 9: // tab
|
||||
// `enable` can be tab-only
|
||||
this._shift( e, e.shiftKey ? 'left' : 'right', true );
|
||||
break;
|
||||
|
||||
case 27: // esc
|
||||
if ( this.s.blurable && this.s.enable === true ) {
|
||||
if ( this.s.blurable && enable === true ) {
|
||||
this._blur();
|
||||
}
|
||||
break;
|
||||
|
||||
case 33: // page up (previous page)
|
||||
case 34: // page down (next page)
|
||||
e.preventDefault();
|
||||
var index = dt.cells( {page: 'current'} ).nodes().indexOf( cell.node() );
|
||||
if ( navEnable && !scrolling ) {
|
||||
e.preventDefault();
|
||||
|
||||
dt
|
||||
.one( 'draw', function () {
|
||||
var nodes = dt.cells( {page: 'current'} ).nodes();
|
||||
|
||||
that._focus( dt.cell( index < nodes.length ?
|
||||
nodes[ index ] :
|
||||
nodes[ nodes.length-1 ]
|
||||
) );
|
||||
} )
|
||||
.page( e.keyCode === 33 ? 'previous' : 'next' )
|
||||
.draw( false );
|
||||
dt
|
||||
.page( e.keyCode === 33 ? 'previous' : 'next' )
|
||||
.draw( false );
|
||||
}
|
||||
break;
|
||||
|
||||
case 35: // end (end of current page)
|
||||
case 36: // home (start of current page)
|
||||
e.preventDefault();
|
||||
var indexes = dt.cells( {page: 'current'} ).indexes();
|
||||
if ( navEnable ) {
|
||||
e.preventDefault();
|
||||
var indexes = dt.cells( {page: 'current'} ).indexes();
|
||||
var colIndexes = this._columns();
|
||||
|
||||
this._focus( dt.cell(
|
||||
indexes[ e.keyCode === 35 ? indexes.length-1 : 0 ]
|
||||
) );
|
||||
this._focus( dt.cell(
|
||||
indexes[ e.keyCode === 35 ? indexes.length-1 : colIndexes[0] ]
|
||||
), null, true, e );
|
||||
}
|
||||
break;
|
||||
|
||||
case 37: // left arrow
|
||||
this._shift( e, 'left' );
|
||||
if ( navEnable ) {
|
||||
this._shift( e, 'left' );
|
||||
}
|
||||
break;
|
||||
|
||||
case 38: // up arrow
|
||||
this._shift( e, 'up' );
|
||||
if ( navEnable ) {
|
||||
this._shift( e, 'up' );
|
||||
}
|
||||
break;
|
||||
|
||||
case 39: // right arrow
|
||||
this._shift( e, 'right' );
|
||||
if ( navEnable ) {
|
||||
this._shift( e, 'right' );
|
||||
}
|
||||
break;
|
||||
|
||||
case 40: // down arrow
|
||||
this._shift( e, 'down' );
|
||||
if ( navEnable ) {
|
||||
this._shift( e, 'down' );
|
||||
}
|
||||
break;
|
||||
|
||||
case 113: // F2 - Excel like hard edit
|
||||
if ( this.c.editor ) {
|
||||
this._editor(null, e, true);
|
||||
break;
|
||||
}
|
||||
// else fallthrough
|
||||
|
||||
default:
|
||||
// Everything else - pass through only when fully enabled
|
||||
if ( this.s.enable === true ) {
|
||||
this._emitEvent( 'key', [ dt, e.keyCode, this.s.lastFocus, e ] );
|
||||
if ( enable === true ) {
|
||||
this._emitEvent( 'key', [ dt, e.keyCode, this.s.lastFocus.cell, e ] );
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove focus from all tables other than this one
|
||||
*/
|
||||
_removeOtherFocus: function ()
|
||||
{
|
||||
var thisTable = this.s.dt.table().node();
|
||||
|
||||
$.fn.dataTable.tables({api:true}).iterator('table', function (settings) {
|
||||
if (this.table().node() !== thisTable) {
|
||||
this.cell.blur();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Scroll a container to make a cell visible in it. This can be used for
|
||||
|
@ -600,6 +901,12 @@ $.extend( KeyTable.prototype, {
|
|||
var containerHeight = container.height();
|
||||
var containerWidth = container.width();
|
||||
|
||||
// If Scroller is being used, the table can be `position: absolute` and that
|
||||
// needs to be taken account of in the offset. If no Scroller, this will be 0
|
||||
if ( posOff === 'position' ) {
|
||||
offset.top += parseInt( cell.closest('table').css('top'), 10 );
|
||||
}
|
||||
|
||||
// Top correction
|
||||
if ( offset.top < scrollTop ) {
|
||||
scroller.scrollTop( offset.top );
|
||||
|
@ -639,7 +946,7 @@ $.extend( KeyTable.prototype, {
|
|||
var dt = this.s.dt;
|
||||
var pageInfo = dt.page.info();
|
||||
var rows = pageInfo.recordsDisplay;
|
||||
var currentCell = this.s.lastFocus;
|
||||
var currentCell = this.s.lastFocus.cell;
|
||||
var columns = this._columns();
|
||||
|
||||
if ( ! currentCell ) {
|
||||
|
@ -692,16 +999,19 @@ $.extend( KeyTable.prototype, {
|
|||
row++;
|
||||
}
|
||||
|
||||
if ( row >= 0 && row < rows && $.inArray( column, columns ) !== -1
|
||||
) {
|
||||
e.preventDefault();
|
||||
if ( row >= 0 && row < rows && $.inArray( column, columns ) !== -1 ) {
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
this._focus( row, column );
|
||||
this._focus( row, column, true, e );
|
||||
}
|
||||
else if ( ! keyBlurable || ! this.c.blurable ) {
|
||||
// No new focus, but if the table isn't blurable, then don't loose
|
||||
// focus
|
||||
e.preventDefault();
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
else {
|
||||
this._blur();
|
||||
|
@ -736,9 +1046,34 @@ $.extend( KeyTable.prototype, {
|
|||
} )
|
||||
.insertBefore( dt.table().node() );
|
||||
|
||||
div.children().on( 'focus', function () {
|
||||
that._focus( dt.cell(':eq(0)', '0:visible', {page: 'current'}) );
|
||||
div.children().on( 'focus', function (e) {
|
||||
var cell = dt.cell(':eq(0)', that._columns(), {page: 'current'});
|
||||
|
||||
if ( cell.any() ) {
|
||||
that._focus( cell, null, true, e );
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Update fixed columns if they are enabled and if the cell we are
|
||||
* focusing is inside a fixed column
|
||||
* @param {integer} column Index of the column being changed
|
||||
* @private
|
||||
*/
|
||||
_updateFixedColumns: function( column )
|
||||
{
|
||||
var dt = this.s.dt;
|
||||
var settings = dt.settings()[0];
|
||||
|
||||
if ( settings._oFixedColumns ) {
|
||||
var leftCols = settings._oFixedColumns.s.iLeftColumns;
|
||||
var rightCols = settings.aoColumns.length - settings._oFixedColumns.s.iRightColumns;
|
||||
|
||||
if (column < leftCols || column >= rightCols) {
|
||||
dt.fixedColumns().update();
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
|
@ -763,6 +1098,18 @@ KeyTable.defaults = {
|
|||
*/
|
||||
className: 'focus',
|
||||
|
||||
/**
|
||||
* Enable or disable clipboard support
|
||||
* @type {Boolean}
|
||||
*/
|
||||
clipboard: true,
|
||||
|
||||
/**
|
||||
* Orthogonal data that should be copied to clipboard
|
||||
* @type {string}
|
||||
*/
|
||||
clipboardOrthogonal: 'display',
|
||||
|
||||
/**
|
||||
* Columns that can be focused. This is automatically merged with the
|
||||
* visible columns as only visible columns can gain focus.
|
||||
|
@ -776,6 +1123,12 @@ KeyTable.defaults = {
|
|||
*/
|
||||
editor: null,
|
||||
|
||||
/**
|
||||
* Trigger editing immediately on focus
|
||||
* @type {boolean}
|
||||
*/
|
||||
editOnFocus: false,
|
||||
|
||||
/**
|
||||
* Select a cell to automatically select on start up. `null` for no
|
||||
* automatic selection
|
||||
|
@ -798,7 +1151,7 @@ KeyTable.defaults = {
|
|||
|
||||
|
||||
|
||||
KeyTable.version = "2.1.2";
|
||||
KeyTable.version = "2.5.1";
|
||||
|
||||
|
||||
$.fn.dataTable.KeyTable = KeyTable;
|
||||
|
@ -837,6 +1190,14 @@ DataTable.Api.register( 'keys.enable()', function ( opts ) {
|
|||
} );
|
||||
} );
|
||||
|
||||
DataTable.Api.register( 'keys.move()', function ( dir ) {
|
||||
return this.iterator( 'table', function (ctx) {
|
||||
if ( ctx.keytable ) {
|
||||
ctx.keytable._shift( null, dir, false );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Cell selector
|
||||
DataTable.ext.selector.cell.push( function ( settings, opts, cells ) {
|
||||
var focused = opts.focused;
|
||||
|
@ -870,7 +1231,7 @@ $(document).on( 'preInit.dt.dtk', function (e, settings, json) {
|
|||
var defaults = DataTable.defaults.keys;
|
||||
|
||||
if ( init || defaults ) {
|
||||
var opts = $.extend( {}, init, defaults );
|
||||
var opts = $.extend( {}, defaults, init );
|
||||
|
||||
if ( init !== false ) {
|
||||
new KeyTable( settings, opts );
|
||||
|
|
|
@ -1,18 +1,25 @@
|
|||
/*!
|
||||
KeyTable 2.1.2
|
||||
©2009-2016 SpryMedia Ltd - datatables.net/license
|
||||
KeyTable 2.5.1
|
||||
©2009-2019 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(k){return e(k,window,document)}):"object"===typeof exports?module.exports=function(k,g){k||(k=window);if(!g||!g.fn.dataTable)g=require("datatables.net")(k,g).$;return e(g,k,k.document)}:e(jQuery,window,document)})(function(e,k,g,n){var h=e.fn.dataTable,l=function(a,b){if(!h.versionCheck||!h.versionCheck("1.10.8"))throw"KeyTable requires DataTables 1.10.8 or newer";this.c=e.extend(!0,{},h.defaults.keyTable,
|
||||
l.defaults,b);this.s={dt:new h.Api(a),enable:!0,focusDraw:!1};this.dom={};var d=this.s.dt.settings()[0],c=d.keytable;if(c)return c;d.keytable=this;this._constructor()};e.extend(l.prototype,{blur:function(){this._blur()},enable:function(a){this.s.enable=a},focus:function(a,b){this._focus(this.s.dt.cell(a,b))},focused:function(a){if(!this.s.lastFocus)return!1;var b=this.s.lastFocus.index();return a.row===b.row&&a.column===b.column},_constructor:function(){this._tabInput();var a=this,b=this.s.dt,d=e(b.table().node());
|
||||
"static"===d.css("position")&&d.css("position","relative");e(b.table().body()).on("click.keyTable","th, td",function(){if(!1!==a.s.enable){var c=b.cell(this);c.any()&&a._focus(c,null,!1)}});e(g).on("keydown.keyTable",function(b){a._key(b)});if(this.c.blurable)e(g).on("click.keyTable",function(c){e(c.target).parents(".dataTables_filter").length&&a._blur();e(c.target).parents().filter(b.table().container()).length||e(c.target).parents("div.DTE").length||a._blur()});if(this.c.editor)b.on("key.keyTable",
|
||||
function(b,c,d,e,g){a._editor(d,g)});if(b.settings()[0].oFeatures.bStateSave)b.on("stateSaveParams.keyTable",function(b,c,d){d.keyTable=a.s.lastFocus?a.s.lastFocus.index():null});b.on("xhr.keyTable",function(){if(!a.s.focusDraw){var c=a.s.lastFocus;c&&(a.s.lastFocus=null,b.one("draw",function(){a._focus(c)}))}});b.on("destroy.keyTable",function(){b.off(".keyTable");e(b.table().body()).off("click.keyTable","th, td");e(g.body).off("keydown.keyTable").off("click.keyTable")});var c=b.state.loaded();if(c&&
|
||||
c.keyTable)b.one("init",function(){var a=b.cell(c.keyTable);a.any()&&a.focus()});else this.c.focus&&b.cell(this.c.focus).focus()},_blur:function(){if(this.s.enable&&this.s.lastFocus){var a=this.s.lastFocus;e(a.node()).removeClass(this.c.className);this.s.lastFocus=null;this._emitEvent("key-blur",[this.s.dt,a])}},_columns:function(){var a=this.s.dt,b=a.columns(this.c.columns).indexes(),d=[];a.columns(":visible").every(function(a){-1!==b.indexOf(a)&&d.push(a)});return d},_editor:function(a,b){var d=
|
||||
this.s.dt,c=this.c.editor;b.stopPropagation();13===a&&b.preventDefault();c.inline(this.s.lastFocus.index());var f=e("div.DTE input, div.DTE textarea");f.length&&f[0].select();d.keys.enable("navigation-only");d.one("key-blur.editor",function(){c.displayed()&&c.submit()});c.one("close",function(){d.keys.enable(!0);d.off("key-blur.editor")})},_emitEvent:function(a,b){this.s.dt.iterator("table",function(d){e(d.nTable).triggerHandler(a,b)})},_focus:function(a,b,d){var c=this,f=this.s.dt,i=f.page.info(),
|
||||
m=this.s.lastFocus;if(this.s.enable){if("number"!==typeof a){var j=a.index(),b=j.column,a=f.rows({filter:"applied",order:"applied"}).indexes().indexOf(j.row);i.serverSide&&(a+=i.start)}if(-1!==i.length&&(a<i.start||a>=i.start+i.length))this.s.focusDraw=!0,f.one("draw",function(){c.s.focusDraw=!1;c._focus(a,b)}).page(Math.floor(a/i.length)).draw(!1);else if(-1!==e.inArray(b,this._columns())){i.serverSide&&(a-=i.start);i=f.cell(":eq("+a+")",b,{search:"applied"});if(m){if(m.node()===i.node())return;
|
||||
this._blur()}m=e(i.node());m.addClass(this.c.className);if(d===n||!0===d)this._scroll(e(k),e(g.body),m,"offset"),d=f.table().body().parentNode,d!==f.table().header().parentNode&&(d=e(d.parentNode),this._scroll(d,d,m,"position"));this.s.lastFocus=i;this._emitEvent("key-focus",[this.s.dt,i]);f.state.save()}}},_key:function(a){if(this.s.enable&&!(0===a.keyCode||a.ctrlKey||a.metaKey||a.altKey)){var b=this.s.lastFocus;if(b){var d=this,c=this.s.dt;if(!(this.c.keys&&-1===e.inArray(a.keyCode,this.c.keys)))switch(a.keyCode){case 9:this._shift(a,
|
||||
a.shiftKey?"left":"right",!0);break;case 27:this.s.blurable&&!0===this.s.enable&&this._blur();break;case 33:case 34:a.preventDefault();var f=c.cells({page:"current"}).nodes().indexOf(b.node());c.one("draw",function(){var a=c.cells({page:"current"}).nodes();d._focus(c.cell(f<a.length?a[f]:a[a.length-1]))}).page(33===a.keyCode?"previous":"next").draw(!1);break;case 35:case 36:a.preventDefault();b=c.cells({page:"current"}).indexes();this._focus(c.cell(b[35===a.keyCode?b.length-1:0]));break;case 37:this._shift(a,
|
||||
"left");break;case 38:this._shift(a,"up");break;case 39:this._shift(a,"right");break;case 40:this._shift(a,"down");break;default:!0===this.s.enable&&this._emitEvent("key",[c,a.keyCode,this.s.lastFocus,a])}}}},_scroll:function(a,b,d,c){var c=d[c](),f=d.outerHeight(),d=d.outerWidth(),e=b.scrollTop(),g=b.scrollLeft(),j=a.height(),a=a.width();c.top<e&&b.scrollTop(c.top);c.left<g&&b.scrollLeft(c.left);c.top+f>e+j&&f<j&&b.scrollTop(c.top+f-j);c.left+d>g+a&&d<a&&b.scrollLeft(c.left+d-a)},_shift:function(a,
|
||||
b,d){var c=this.s.dt,f=c.page.info(),i=f.recordsDisplay,g=this.s.lastFocus,j=this._columns();if(g){var h=c.rows({filter:"applied",order:"applied"}).indexes().indexOf(g.index().row);f.serverSide&&(h+=f.start);c=c.columns(j).indexes().indexOf(g.index().column);f=j[c];"right"===b?c>=j.length-1?(h++,f=j[0]):f=j[c+1]:"left"===b?0===c?(h--,f=j[j.length-1]):f=j[c-1]:"up"===b?h--:"down"===b&&h++;0<=h&&h<i&&-1!==e.inArray(f,j)?(a.preventDefault(),this._focus(h,f)):!d||!this.c.blurable?a.preventDefault():this._blur()}},
|
||||
_tabInput:function(){var a=this,b=this.s.dt,d=null!==this.c.tabIndex?this.c.tabIndex:b.settings()[0].iTabIndex;if(-1!=d)e('<div><input type="text" tabindex="'+d+'"/></div>').css({position:"absolute",height:1,width:0,overflow:"hidden"}).insertBefore(b.table().node()).children().on("focus",function(){a._focus(b.cell(":eq(0)","0:visible",{page:"current"}))})}});l.defaults={blurable:!0,className:"focus",columns:"",editor:null,focus:null,keys:null,tabIndex:null};l.version="2.1.2";e.fn.dataTable.KeyTable=
|
||||
l;e.fn.DataTable.KeyTable=l;h.Api.register("cell.blur()",function(){return this.iterator("table",function(a){a.keytable&&a.keytable.blur()})});h.Api.register("cell().focus()",function(){return this.iterator("cell",function(a,b,d){a.keytable&&a.keytable.focus(b,d)})});h.Api.register("keys.disable()",function(){return this.iterator("table",function(a){a.keytable&&a.keytable.enable(!1)})});h.Api.register("keys.enable()",function(a){return this.iterator("table",function(b){b.keytable&&b.keytable.enable(a===
|
||||
n?!0:a)})});h.ext.selector.cell.push(function(a,b,d){var b=b.focused,a=a.keytable,c=[];if(!a||b===n)return d;for(var e=0,g=d.length;e<g;e++)(!0===b&&a.focused(d[e])||!1===b&&!a.focused(d[e]))&&c.push(d[e]);return c});e(g).on("preInit.dt.dtk",function(a,b){if("dt"===a.namespace){var d=b.oInit.keys,c=h.defaults.keys;if(d||c)c=e.extend({},d,c),!1!==d&&new l(b,c)}});return l});
|
||||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(k){return e(k,window,document)}):"object"===typeof exports?module.exports=function(k,i){k||(k=window);if(!i||!i.fn.dataTable)i=require("datatables.net")(k,i).$;return e(i,k,k.document)}:e(jQuery,window,document)})(function(e,k,i,o){var l=e.fn.dataTable,p=0,m=function(a,b){if(!l.versionCheck||!l.versionCheck("1.10.8"))throw"KeyTable requires DataTables 1.10.8 or newer";this.c=e.extend(!0,{},l.defaults.keyTable,
|
||||
m.defaults,b);this.s={dt:new l.Api(a),enable:!0,focusDraw:!1,waitingForDraw:!1,lastFocus:null,namespace:".keyTable-"+p++};this.dom={};var c=this.s.dt.settings()[0],d=c.keytable;if(d)return d;c.keytable=this;this._constructor()};e.extend(m.prototype,{blur:function(){this._blur()},enable:function(a){this.s.enable=a},focus:function(a,b){this._focus(this.s.dt.cell(a,b))},focused:function(a){if(!this.s.lastFocus)return!1;var b=this.s.lastFocus.cell.index();return a.row===b.row&&a.column===b.column},_constructor:function(){this._tabInput();
|
||||
var a=this,b=this.s.dt,c=e(b.table().node()),d=this.s.namespace,f=!1;"static"===c.css("position")&&c.css("position","relative");e(b.table().body()).on("click"+d,"th, td",function(d){if(!1!==a.s.enable){var c=b.cell(this);c.any()&&a._focus(c,null,!1,d)}});e(i).on("keydown"+d,function(b){f||a._key(b)});if(this.c.blurable)e(i).on("mousedown"+d,function(d){e(d.target).parents(".dataTables_filter").length&&a._blur();e(d.target).parents().filter(b.table().container()).length||e(d.target).parents("div.DTE").length||
|
||||
e(d.target).parents("div.editor-datetime").length||e(d.target).parents().filter(".DTFC_Cloned").length||a._blur()});if(this.c.editor){var j=this.c.editor;j.on("open.keyTableMain",function(b,c){"inline"!==c&&a.s.enable&&(a.enable(!1),j.one("close"+d,function(){a.enable(!0)}))});if(this.c.editOnFocus)b.on("key-focus"+d+" key-refocus"+d,function(b,d,c,f){a._editor(null,f,!0)});b.on("key"+d,function(b,d,c,f,e){a._editor(c,e,!1)});e(b.table().body()).on("dblclick"+d,"th, td",function(d){!1!==a.s.enable&&
|
||||
b.cell(this).any()&&a._editor(null,d,!0)});j.on("preSubmit",function(){f=!0}).on("preSubmitCancelled",function(){f=!1}).on("submitComplete",function(){f=!1})}if(b.settings()[0].oFeatures.bStateSave)b.on("stateSaveParams"+d,function(b,d,c){c.keyTable=a.s.lastFocus?a.s.lastFocus.cell.index():null});b.on("draw"+d,function(d){if(!a.s.focusDraw){var c=a.s.lastFocus;if(c&&c.node&&e(c.node).closest("body")===i.body){var c=a.s.lastFocus.relative,f=b.page.info(),g=c.row+f.start;0!==f.recordsDisplay&&(g>=f.recordsDisplay&&
|
||||
(g=f.recordsDisplay-1),a._focus(g,c.column,!0,d))}}});this.c.clipboard&&this._clipboard();b.on("destroy"+d,function(){a._blur(!0);b.off(d);e(b.table().body()).off("click"+d,"th, td").off("dblclick"+d,"th, td");e(i).off("mousedown"+d).off("keydown"+d).off("copy"+d).off("paste"+d)});var g=b.state.loaded();if(g&&g.keyTable)b.one("init",function(){var a=b.cell(g.keyTable);a.any()&&a.focus()});else this.c.focus&&b.cell(this.c.focus).focus()},_blur:function(a){if(this.s.enable&&this.s.lastFocus){var b=
|
||||
this.s.lastFocus.cell;e(b.node()).removeClass(this.c.className);this.s.lastFocus=null;a||(this._updateFixedColumns(b.index().column),this._emitEvent("key-blur",[this.s.dt,b]))}},_clipboard:function(){var a=this.s.dt,b=this,c=this.s.namespace;k.getSelection&&(e(i).on("copy"+c,function(a){var a=a.originalEvent,c=k.getSelection().toString(),e=b.s.lastFocus;!c&&e&&(a.clipboardData.setData("text/plain",e.cell.render(b.c.clipboardOrthogonal)),a.preventDefault())}),e(i).on("paste"+c,function(d){var d=d.originalEvent,
|
||||
c=b.s.lastFocus,e=i.activeElement,g=b.c.editor,h;if(c&&(!e||"body"===e.nodeName.toLowerCase()))d.preventDefault(),k.clipboardData&&k.clipboardData.getData?h=k.clipboardData.getData("Text"):d.clipboardData&&d.clipboardData.getData&&(h=d.clipboardData.getData("text/plain")),g?g.inline(c.cell.index()).set(g.displayed()[0],h).submit():(c.cell.data(h),a.draw(!1))}))},_columns:function(){var a=this.s.dt,b=a.columns(this.c.columns).indexes(),c=[];a.columns(":visible").every(function(a){-1!==b.indexOf(a)&&
|
||||
c.push(a)});return c},_editor:function(a,b,c){var d=this,f=this.s.dt,j=this.c.editor,g=this.s.lastFocus.cell,h=this.s.namespace;if(!e("div.DTE",g.node()).length&&!(null!==a&&(0<=a&&9>=a||11===a||12===a||14<=a&&31>=a||112<=a&&123>=a||127<=a&&159>=a))){b.stopPropagation();13===a&&b.preventDefault();var n=function(){j.one("open"+h,function(){j.off("cancelOpen"+h);c||e("div.DTE_Field_InputControl input, div.DTE_Field_InputControl textarea").select();f.keys.enable(c?"tab-only":"navigation-only");f.on("key-blur.editor",
|
||||
function(a,b,c){j.displayed()&&c.node()===g.node()&&j.submit()});c&&e(f.table().container()).addClass("dtk-focus-alt");j.on("preSubmitCancelled"+h,function(){setTimeout(function(){d._focus(g,null,!1)},50)});j.on("submitUnsuccessful"+h,function(){d._focus(g,null,!1)});j.one("close",function(){f.keys.enable(!0);f.off("key-blur.editor");j.off(h);e(f.table().container()).removeClass("dtk-focus-alt")})}).one("cancelOpen"+h,function(){j.off(h)}).inline(g.index())};13===a?(c=!0,e(i).one("keyup",function(){n()})):
|
||||
n()}},_emitEvent:function(a,b){this.s.dt.iterator("table",function(c){e(c.nTable).triggerHandler(a,b)})},_focus:function(a,b,c,d){var f=this,j=this.s.dt,g=j.page.info(),h=this.s.lastFocus;d||(d=null);if(this.s.enable){if("number"!==typeof a){if(!a.any())return;var n=a.index(),b=n.column,a=j.rows({filter:"applied",order:"applied"}).indexes().indexOf(n.row);if(0>a)return;g.serverSide&&(a+=g.start)}if(-1!==g.length&&(a<g.start||a>=g.start+g.length))this.s.focusDraw=!0,this.s.waitingForDraw=!0,j.one("draw",
|
||||
function(){f.s.focusDraw=!1;f.s.waitingForDraw=!1;f._focus(a,b,o,d)}).page(Math.floor(a/g.length)).draw(!1);else if(-1!==e.inArray(b,this._columns())){g.serverSide&&(a-=g.start);g=j.cells(null,b,{search:"applied",order:"applied"}).flatten();g=j.cell(g[a]);if(h){if(h.node===g.node()){this._emitEvent("key-refocus",[this.s.dt,g,d||null]);return}this._blur()}this._removeOtherFocus();h=e(g.node());h.addClass(this.c.className);this._updateFixedColumns(b);if(c===o||!0===c)this._scroll(e(k),e(i.body),h,"offset"),
|
||||
c=j.table().body().parentNode,c!==j.table().header().parentNode&&(c=e(c.parentNode),this._scroll(c,c,h,"position"));this.s.lastFocus={cell:g,node:g.node(),relative:{row:j.rows({page:"current"}).indexes().indexOf(g.index().row),column:g.index().column}};this._emitEvent("key-focus",[this.s.dt,g,d||null]);j.state.save()}}},_key:function(a){if(this.s.waitingForDraw)a.preventDefault();else{var b=this.s.enable,c=!0===b||"navigation-only"===b;if(b&&(!(0===a.keyCode||a.ctrlKey||a.metaKey||a.altKey)||a.ctrlKey&&
|
||||
a.altKey)){var d=this.s.lastFocus;if(d)if(this.s.dt.cell(d.node).any()){var d=this.s.dt,f=this.s.dt.settings()[0].oScroll.sY?!0:!1;if(!(this.c.keys&&-1===e.inArray(a.keyCode,this.c.keys)))switch(a.keyCode){case 9:this._shift(a,a.shiftKey?"left":"right",!0);break;case 27:this.s.blurable&&!0===b&&this._blur();break;case 33:case 34:c&&!f&&(a.preventDefault(),d.page(33===a.keyCode?"previous":"next").draw(!1));break;case 35:case 36:c&&(a.preventDefault(),b=d.cells({page:"current"}).indexes(),c=this._columns(),
|
||||
this._focus(d.cell(b[35===a.keyCode?b.length-1:c[0]]),null,!0,a));break;case 37:c&&this._shift(a,"left");break;case 38:c&&this._shift(a,"up");break;case 39:c&&this._shift(a,"right");break;case 40:c&&this._shift(a,"down");break;case 113:if(this.c.editor){this._editor(null,a,!0);break}default:!0===b&&this._emitEvent("key",[d,a.keyCode,this.s.lastFocus.cell,a])}}else this.s.lastFocus=null}}},_removeOtherFocus:function(){var a=this.s.dt.table().node();e.fn.dataTable.tables({api:!0}).iterator("table",
|
||||
function(){this.table().node()!==a&&this.cell.blur()})},_scroll:function(a,b,c,d){var f=c[d](),e=c.outerHeight(),g=c.outerWidth(),h=b.scrollTop(),n=b.scrollLeft(),i=a.height(),a=a.width();"position"===d&&(f.top+=parseInt(c.closest("table").css("top"),10));f.top<h&&b.scrollTop(f.top);f.left<n&&b.scrollLeft(f.left);f.top+e>h+i&&e<i&&b.scrollTop(f.top+e-i);f.left+g>n+a&&g<a&&b.scrollLeft(f.left+g-a)},_shift:function(a,b,c){var d=this.s.dt,f=d.page.info(),j=f.recordsDisplay,g=this.s.lastFocus.cell,h=
|
||||
this._columns();if(g){var i=d.rows({filter:"applied",order:"applied"}).indexes().indexOf(g.index().row);f.serverSide&&(i+=f.start);d=d.columns(h).indexes().indexOf(g.index().column);f=h[d];"right"===b?d>=h.length-1?(i++,f=h[0]):f=h[d+1]:"left"===b?0===d?(i--,f=h[h.length-1]):f=h[d-1]:"up"===b?i--:"down"===b&&i++;0<=i&&i<j&&-1!==e.inArray(f,h)?(a&&a.preventDefault(),this._focus(i,f,!0,a)):!c||!this.c.blurable?a&&a.preventDefault():this._blur()}},_tabInput:function(){var a=this,b=this.s.dt,c=null!==
|
||||
this.c.tabIndex?this.c.tabIndex:b.settings()[0].iTabIndex;if(-1!=c)e('<div><input type="text" tabindex="'+c+'"/></div>').css({position:"absolute",height:1,width:0,overflow:"hidden"}).insertBefore(b.table().node()).children().on("focus",function(c){var f=b.cell(":eq(0)",a._columns(),{page:"current"});f.any()&&a._focus(f,null,!0,c)})},_updateFixedColumns:function(a){var b=this.s.dt,c=b.settings()[0];if(c._oFixedColumns){var d=c.aoColumns.length-c._oFixedColumns.s.iRightColumns;(a<c._oFixedColumns.s.iLeftColumns||
|
||||
a>=d)&&b.fixedColumns().update()}}});m.defaults={blurable:!0,className:"focus",clipboard:!0,clipboardOrthogonal:"display",columns:"",editor:null,editOnFocus:!1,focus:null,keys:null,tabIndex:null};m.version="2.5.1";e.fn.dataTable.KeyTable=m;e.fn.DataTable.KeyTable=m;l.Api.register("cell.blur()",function(){return this.iterator("table",function(a){a.keytable&&a.keytable.blur()})});l.Api.register("cell().focus()",function(){return this.iterator("cell",function(a,b,c){a.keytable&&a.keytable.focus(b,c)})});
|
||||
l.Api.register("keys.disable()",function(){return this.iterator("table",function(a){a.keytable&&a.keytable.enable(!1)})});l.Api.register("keys.enable()",function(a){return this.iterator("table",function(b){b.keytable&&b.keytable.enable(a===o?!0:a)})});l.Api.register("keys.move()",function(a){return this.iterator("table",function(b){b.keytable&&b.keytable._shift(null,a,!1)})});l.ext.selector.cell.push(function(a,b,c){var b=b.focused,a=a.keytable,d=[];if(!a||b===o)return c;for(var f=0,e=c.length;f<
|
||||
e;f++)(!0===b&&a.focused(c[f])||!1===b&&!a.focused(c[f]))&&d.push(c[f]);return d});e(i).on("preInit.dt.dtk",function(a,b){if("dt"===a.namespace){var c=b.oInit.keys,d=l.defaults.keys;if(c||d)d=e.extend({},d,c),!1!==c&&new m(b,d)}});return m});
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"_from": "datatables.net-keytable@2.5.1",
|
||||
"_id": "datatables.net-keytable@2.5.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-06b1ilIyIaEK3jcCqHjcZCIBjgSBwW/Aj/H8TMS/J0pO//UR/N0t3O9lvklqZurTtKCkP2HDaS+hgTavgyWnJA==",
|
||||
"_location": "/datatables.net-keytable",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-keytable@2.5.1",
|
||||
"name": "datatables.net-keytable",
|
||||
"escapedName": "datatables.net-keytable",
|
||||
"rawSpec": "2.5.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.5.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/datatables.net-keytable-bs4"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-keytable/-/datatables.net-keytable-2.5.1.tgz",
|
||||
"_shasum": "7a6ba0b8085eaacc2cdc20f6348e8abd77b899c6",
|
||||
"_spec": "datatables.net-keytable@2.5.1",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella\\node_modules\\datatables.net-keytable-bs4",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net": "^1.10.15",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "KeyTable for DataTables ",
|
||||
"files": [
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"spreadsheet",
|
||||
"excel",
|
||||
"keyboard",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/dataTables.keyTable.js",
|
||||
"name": "datatables.net-keytable",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DataTables/Dist-DataTables-KeyTable.git"
|
||||
},
|
||||
"version": "2.5.1"
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-responsive-bs",
|
||||
"description": "Responsive for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"js/responsive.bootstrap.js",
|
||||
"css/responsive.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"responsive",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-responsive": ">=1.0.7"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "2.1.0",
|
||||
"_release": "2.1.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.1.0",
|
||||
"commit": "80574a9f204e1032c15dd51bdd661bd16179e4aa"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-Responsive-Bootstrap.git",
|
||||
"_target": "^2.0.2",
|
||||
"_originalSource": "datatables.net-responsive-bs"
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
Copyright SpryMedia Limited and other contributors
|
||||
http://datatables.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-responsive-bs",
|
||||
"description": "Responsive for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"js/responsive.bootstrap.js",
|
||||
"css/responsive.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"responsive",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-responsive": ">=1.0.7"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before{top:9px;left:4px;height:14px;width:14px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#337ab7}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed>tbody>tr.child td:before{display:none}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#337ab7}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable>tbody>tr.child{padding:0.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul li{border-bottom:1px solid #efefef;padding:0.5em 0}table.dataTable>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}div.dtr-bs-modal table.table tr:first-child td{border-top:none}
|
|
@ -1,6 +1,6 @@
|
|||
# Responsive for DataTables with styling for [Bootstrap](http://getbootstrap.com/)
|
||||
# Responsive for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)
|
||||
|
||||
This package contains distribution files required to style [Responsive extension](https://datatables.net/extensions/responsive) for [DataTables](https://datatables.net/) with styling for [Bootstrap](http://getbootstrap.com/).
|
||||
This package contains distribution files required to style [Responsive extension](https://datatables.net/extensions/responsive) for [DataTables](https://datatables.net/) with styling for [Bootstrap 4](http://getbootstrap.com/).
|
||||
|
||||
In the modern world of responsive web design tables can often cause a particular problem for designers due to their row based layout. Responsive is an extension for DataTables that resolves that problem by optimising the table's layout for different screen sizes through the dynamic insertion and removal of columns from the table.
|
||||
|
||||
|
@ -14,18 +14,18 @@ For inclusion of this library using a standard `<script>` tag, rather than using
|
|||
### npm
|
||||
|
||||
```
|
||||
npm install datatables.net-responsive-bs
|
||||
npm install datatables.net-responsive-bs4
|
||||
```
|
||||
|
||||
```
|
||||
var $ = require( 'jquery' );
|
||||
require( 'datatables.net-responsive-bs' )( window, $ );
|
||||
require( 'datatables.net-responsive-bs4' )( $ );
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```
|
||||
bower install --save datatables.net-responsive-bs
|
||||
bower install --save datatables.net-responsive-bs4
|
||||
```
|
||||
|
||||
|
|
@ -8,15 +8,15 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
|
|||
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
|
||||
display: none !important;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child {
|
||||
position: relative;
|
||||
padding-left: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
|
||||
top: 9px;
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child:before {
|
||||
top: 12px;
|
||||
left: 4px;
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
|
@ -28,19 +28,17 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
|
|||
box-shadow: 0 0 3px #444;
|
||||
box-sizing: content-box;
|
||||
text-align: center;
|
||||
text-indent: 0 !important;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
line-height: 14px;
|
||||
content: '+';
|
||||
background-color: #337ab7;
|
||||
background-color: #0275d8;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
|
||||
content: '-';
|
||||
background-color: #d33333;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
|
||||
display: none;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
|
||||
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
|
||||
padding-left: 27px;
|
||||
|
@ -76,10 +74,11 @@ table.dataTable.dtr-column > tbody > tr > th.control:before {
|
|||
box-shadow: 0 0 3px #444;
|
||||
box-sizing: content-box;
|
||||
text-align: center;
|
||||
text-indent: 0 !important;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
line-height: 14px;
|
||||
content: '+';
|
||||
background-color: #337ab7;
|
||||
background-color: #0275d8;
|
||||
}
|
||||
table.dataTable.dtr-column > tbody > tr.parent td.control:before,
|
||||
table.dataTable.dtr-column > tbody > tr.parent th.control:before {
|
||||
|
@ -92,20 +91,20 @@ table.dataTable > tbody > tr.child {
|
|||
table.dataTable > tbody > tr.child:hover {
|
||||
background: transparent !important;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul {
|
||||
table.dataTable > tbody > tr.child ul.dtr-details {
|
||||
display: inline-block;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul li {
|
||||
table.dataTable > tbody > tr.child ul.dtr-details > li {
|
||||
border-bottom: 1px solid #efefef;
|
||||
padding: 0.5em 0;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul li:first-child {
|
||||
table.dataTable > tbody > tr.child ul.dtr-details > li:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul li:last-child {
|
||||
table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
table.dataTable > tbody > tr.child span.dtr-title {
|
|
@ -0,0 +1 @@
|
|||
table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr[role="row"]>th:first-child:before{top:12px;left:4px;height:14px;width:14px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#0275d8}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#0275d8}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable>tbody>tr.child{padding:0.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details>li{border-bottom:1px solid #efefef;padding:0.5em 0}table.dataTable>tbody>tr.child ul.dtr-details>li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details>li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}div.dtr-bs-modal table.table tr:first-child td{border-top:none}
|
|
@ -1,11 +1,11 @@
|
|||
/*! Bootstrap integration for DataTables' Responsive
|
||||
* ©2015-2016 SpryMedia Ltd - datatables.net/license
|
||||
/*! Bootstrap 4 integration for DataTables' Responsive
|
||||
* ©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-bs', 'datatables.net-responsive'], function ( $ ) {
|
||||
define( ['jquery', 'datatables.net-bs4', 'datatables.net-responsive'], function ( $ ) {
|
||||
return factory( $, window, document );
|
||||
} );
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
|
||||
if ( ! $ || ! $.fn.dataTable ) {
|
||||
$ = require('datatables.net-bs')(root, $).$;
|
||||
$ = require('datatables.net-bs4')(root, $).$;
|
||||
}
|
||||
|
||||
if ( ! $.fn.dataTable.Responsive ) {
|
||||
|
@ -59,9 +59,13 @@ _display.modal = function ( options ) {
|
|||
else {
|
||||
if ( ! update ) {
|
||||
if ( options && options.header ) {
|
||||
_modal.find('div.modal-header')
|
||||
var header = _modal.find('div.modal-header');
|
||||
var button = header.find('button').detach();
|
||||
|
||||
header
|
||||
.empty()
|
||||
.append( '<h4 class="modal-title">'+options.header( row )+'</h4>' );
|
||||
.append( '<h4 class="modal-title">'+options.header( row )+'</h4>' )
|
||||
.append( button );
|
||||
}
|
||||
|
||||
_modal.find( 'div.modal-body' )
|
|
@ -0,0 +1,6 @@
|
|||
/*!
|
||||
Bootstrap 4 integration for DataTables' Responsive
|
||||
©2016 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-responsive"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.Responsive||require("datatables.net-responsive")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){var a=c.fn.dataTable,b=a.Responsive.display,g=b.modal,e=c('<div class="modal fade dtr-bs-modal" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"/></div></div></div>');
|
||||
b.modal=function(a){return function(b,d,f){if(c.fn.modal){if(!d){if(a&&a.header){var d=e.find("div.modal-header"),h=d.find("button").detach();d.empty().append('<h4 class="modal-title">'+a.header(b)+"</h4>").append(h)}e.find("div.modal-body").empty().append(f());e.appendTo("body").modal()}}else g(b,d,f)}};return a.Responsive});
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"_from": "datatables.net-responsive-bs4",
|
||||
"_id": "datatables.net-responsive-bs4@2.2.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-SQaWI0uLuPcaiBBin9zX+MuQfTSIkK1bYxbXqUV6NLkHCVa6PMQK7Rvftj0ywG4R7uOtjbzY8nSVqxEKvQI0Vg==",
|
||||
"_location": "/datatables.net-responsive-bs4",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-responsive-bs4",
|
||||
"name": "datatables.net-responsive-bs4",
|
||||
"escapedName": "datatables.net-responsive-bs4",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-responsive-bs4/-/datatables.net-responsive-bs4-2.2.3.tgz",
|
||||
"_shasum": "639de17c1d31210ebf2b3c25f1c774c13f729e94",
|
||||
"_spec": "datatables.net-responsive-bs4",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net-bs4": "^1.10.15",
|
||||
"datatables.net-responsive": "2.2.3",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Responsive for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)",
|
||||
"files": [
|
||||
"css/**/*.css",
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"responsive",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap 4"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/responsive.bootstrap4.js",
|
||||
"name": "datatables.net-responsive-bs4",
|
||||
"style": "css/responsive.bootstrap4.css",
|
||||
"version": "2.2.3"
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-responsive",
|
||||
"description": "Responsive for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.responsive.js"
|
||||
],
|
||||
"keywords": [
|
||||
"responsive",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "2.1.0",
|
||||
"_release": "2.1.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "2.1.0",
|
||||
"commit": "e62a8224143063790e7c997758315351a02542b3"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-Responsive.git",
|
||||
"_target": "^2.0.2",
|
||||
"_originalSource": "datatables.net-responsive"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Responsive for DataTables
|
||||
|
||||
This package contains distribution files for the [Responsive extension](https://datatables.net/extensions/responsive) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for Responsive must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getboostrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
This package contains distribution files for the [Responsive extension](https://datatables.net/extensions/responsive) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for Responsive must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
|
||||
In the modern world of responsive web design tables can often cause a particular problem for designers due to their row based layout. Responsive is an extension for DataTables that resolves that problem by optimising the table's layout for different screen sizes through the dynamic insertion and removal of columns from the table.
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-responsive",
|
||||
"description": "Responsive for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.responsive.js"
|
||||
],
|
||||
"keywords": [
|
||||
"responsive",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
/*! Responsive 2.1.0
|
||||
* 2014-2016 SpryMedia Ltd - datatables.net/license
|
||||
/*! Responsive 2.2.3
|
||||
* 2014-2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @summary Responsive
|
||||
* @description Responsive tables plug-in for DataTables
|
||||
* @version 2.1.0
|
||||
* @version 2.2.3
|
||||
* @file dataTables.responsive.js
|
||||
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
||||
* @contact www.sprymedia.co.uk/contact
|
||||
* @copyright Copyright 2014-2016 SpryMedia Ltd.
|
||||
* @copyright Copyright 2014-2018 SpryMedia Ltd.
|
||||
*
|
||||
* This source file is free software, available under the following license:
|
||||
* MIT license - http://datatables.net/license/mit
|
||||
|
@ -97,8 +97,8 @@ var DataTable = $.fn.dataTable;
|
|||
*/
|
||||
var Responsive = function ( settings, opts ) {
|
||||
// Sanity check that we are using DataTables 1.10 or newer
|
||||
if ( ! DataTable.versionCheck || ! DataTable.versionCheck( '1.10.3' ) ) {
|
||||
throw 'DataTables Responsive requires DataTables 1.10.3 or newer';
|
||||
if ( ! DataTable.versionCheck || ! DataTable.versionCheck( '1.10.10' ) ) {
|
||||
throw 'DataTables Responsive requires DataTables 1.10.10 or newer';
|
||||
}
|
||||
|
||||
this.s = {
|
||||
|
@ -166,7 +166,7 @@ $.extend( Responsive.prototype, {
|
|||
// new data is added
|
||||
dtPrivateSettings.oApi._fnCallbackReg( dtPrivateSettings, 'aoRowCreatedCallback', function (tr, data, idx) {
|
||||
if ( $.inArray( false, that.s.current ) !== -1 ) {
|
||||
$('td, th', tr).each( function ( i ) {
|
||||
$('>td, >th', tr).each( function ( i ) {
|
||||
var idx = dt.column.index( 'toData', i );
|
||||
|
||||
if ( that.s.current[idx] === false ) {
|
||||
|
@ -208,10 +208,21 @@ $.extend( Responsive.prototype, {
|
|||
|
||||
// DataTables will trigger this event on every column it shows and
|
||||
// hides individually
|
||||
dt.on( 'column-visibility.dtr', function (e, ctx, col, vis) {
|
||||
that._classLogic();
|
||||
that._resizeAuto();
|
||||
that._resize();
|
||||
dt.on( 'column-visibility.dtr', function () {
|
||||
// Use a small debounce to allow multiple columns to be set together
|
||||
if ( that._timer ) {
|
||||
clearTimeout( that._timer );
|
||||
}
|
||||
|
||||
that._timer = setTimeout( function () {
|
||||
that._timer = null;
|
||||
|
||||
that._classLogic();
|
||||
that._resizeAuto();
|
||||
that._resize();
|
||||
|
||||
that._redrawChildren();
|
||||
}, 100 );
|
||||
} );
|
||||
|
||||
// Redraw the details box on each draw which will happen if the data
|
||||
|
@ -236,6 +247,26 @@ $.extend( Responsive.prototype, {
|
|||
that._resize();
|
||||
});
|
||||
|
||||
// On Ajax reload we want to reopen any child rows which are displayed
|
||||
// by responsive
|
||||
dt.on( 'preXhr.dtr', function () {
|
||||
var rowIds = [];
|
||||
dt.rows().every( function () {
|
||||
if ( this.child.isShown() ) {
|
||||
rowIds.push( this.id(true) );
|
||||
}
|
||||
} );
|
||||
|
||||
dt.one( 'draw.dtr', function () {
|
||||
that._resizeAuto();
|
||||
that._resize();
|
||||
|
||||
dt.rows( rowIds ).every( function () {
|
||||
that._detailsDisplay( this, false );
|
||||
} );
|
||||
} );
|
||||
});
|
||||
|
||||
dt.on( 'init.dtr', function (e, settings, details) {
|
||||
that._resizeAuto();
|
||||
that._resize();
|
||||
|
@ -294,7 +325,10 @@ $.extend( Responsive.prototype, {
|
|||
// Class logic - determine which columns are in this breakpoint based
|
||||
// on the classes. If no class control (i.e. `auto`) then `-` is used
|
||||
// to indicate this to the rest of the function
|
||||
var display = $.map( columns, function ( col ) {
|
||||
var display = $.map( columns, function ( col, i ) {
|
||||
if ( dt.column(i).visible() === false ) {
|
||||
return 'not-visible';
|
||||
}
|
||||
return col.auto && col.minWidth === null ?
|
||||
false :
|
||||
col.auto === true ?
|
||||
|
@ -362,7 +396,7 @@ $.extend( Responsive.prototype, {
|
|||
var showControl = false;
|
||||
|
||||
for ( i=0, ien=columns.length ; i<ien ; i++ ) {
|
||||
if ( ! columns[i].control && ! columns[i].never && ! display[i] ) {
|
||||
if ( ! columns[i].control && ! columns[i].never && display[i] === false ) {
|
||||
showControl = true;
|
||||
break;
|
||||
}
|
||||
|
@ -372,6 +406,11 @@ $.extend( Responsive.prototype, {
|
|||
if ( columns[i].control ) {
|
||||
display[i] = showControl;
|
||||
}
|
||||
|
||||
// Replace not visible string with false from the control column detection above
|
||||
if ( display[i] === 'not-visible' ) {
|
||||
display[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Finally we need to make sure that there is at least one column that
|
||||
|
@ -598,7 +637,7 @@ $.extend( Responsive.prototype, {
|
|||
}
|
||||
|
||||
// Check that the row is actually a DataTable's controlled node
|
||||
if ( ! dt.row( $(this).closest('tr') ).length ) {
|
||||
if ( $.inArray( $(this).closest('tr').get(0), dt.rows().nodes().toArray() ) === -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -736,7 +775,7 @@ $.extend( Responsive.prototype, {
|
|||
// any columns that are not visible but can be shown
|
||||
var collapsedClass = false;
|
||||
for ( i=0, ien=columns.length ; i<ien ; i++ ) {
|
||||
if ( columnsVis[i] === false && ! columns[i].never && ! columns[i].control ) {
|
||||
if ( columnsVis[i] === false && ! columns[i].never && ! columns[i].control && ! dt.column(i).visible() === false ) {
|
||||
collapsedClass = true;
|
||||
break;
|
||||
}
|
||||
|
@ -745,8 +784,13 @@ $.extend( Responsive.prototype, {
|
|||
$( dt.table().node() ).toggleClass( 'collapsed', collapsedClass );
|
||||
|
||||
var changed = false;
|
||||
var visible = 0;
|
||||
|
||||
dt.columns().eq(0).each( function ( colIdx, i ) {
|
||||
if ( columnsVis[i] === true ) {
|
||||
visible++;
|
||||
}
|
||||
|
||||
if ( columnsVis[i] !== oldVis[i] ) {
|
||||
changed = true;
|
||||
that._setColumnVis( colIdx, columnsVis[i] );
|
||||
|
@ -758,6 +802,11 @@ $.extend( Responsive.prototype, {
|
|||
|
||||
// Inform listeners of the change
|
||||
$(dt.table().node()).trigger( 'responsive-resize.dt', [dt, this.s.current] );
|
||||
|
||||
// If no records, update the "No records" display element
|
||||
if ( dt.page.info().recordsDisplay === 0 ) {
|
||||
$('td', dt.table().body()).eq(0).attr('colspan', visible);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -786,6 +835,15 @@ $.extend( Responsive.prototype, {
|
|||
return;
|
||||
}
|
||||
|
||||
// Need to restore all children. They will be reinstated by a re-render
|
||||
if ( ! $.isEmptyObject( _childNodeStore ) ) {
|
||||
$.each( _childNodeStore, function ( key ) {
|
||||
var idx = key.split('-');
|
||||
|
||||
_childNodesRestore( dt, idx[0]*1, idx[1]*1 );
|
||||
} );
|
||||
}
|
||||
|
||||
// Clone the table with the current data in it
|
||||
var tableWidth = dt.table().node().offsetWidth;
|
||||
var columnWidths = dt.columns;
|
||||
|
@ -801,7 +859,8 @@ $.extend( Responsive.prototype, {
|
|||
} )
|
||||
.to$()
|
||||
.clone( false )
|
||||
.css( 'display', 'table-cell' );
|
||||
.css( 'display', 'table-cell' )
|
||||
.css( 'min-width', 0 );
|
||||
|
||||
// Body rows - we don't need to take account of DataTables' column
|
||||
// visibility since we implement our own here (hence the `display` set)
|
||||
|
@ -842,12 +901,17 @@ $.extend( Responsive.prototype, {
|
|||
// multiple times. For example, cloning and inserting a checked radio
|
||||
// clears the chcecked state of the original radio.
|
||||
$( clonedTable ).find( '[name]' ).removeAttr( 'name' );
|
||||
|
||||
// A position absolute table would take the table out of the flow of
|
||||
// our container element, bypassing the height and width (Scroller)
|
||||
$( clonedTable ).css( 'position', 'relative' )
|
||||
|
||||
var inserted = $('<div/>')
|
||||
.css( {
|
||||
width: 1,
|
||||
height: 1,
|
||||
overflow: 'hidden'
|
||||
overflow: 'hidden',
|
||||
clear: 'both'
|
||||
} )
|
||||
.append( clonedTable );
|
||||
|
||||
|
@ -882,6 +946,13 @@ $.extend( Responsive.prototype, {
|
|||
$( dt.column( col ).header() ).css( 'display', display );
|
||||
$( dt.column( col ).footer() ).css( 'display', display );
|
||||
dt.column( col ).nodes().to$().css( 'display', display );
|
||||
|
||||
// If the are child nodes stored, we might need to reinsert them
|
||||
if ( ! $.isEmptyObject( _childNodeStore ) ) {
|
||||
dt.cells( null, col ).indexes().each( function (idx) {
|
||||
_childNodesRestore( dt, idx.row, idx.column );
|
||||
} );
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
@ -903,13 +974,22 @@ $.extend( Responsive.prototype, {
|
|||
|
||||
cells.filter( '[data-dtr-keyboard]' ).removeData( '[data-dtr-keyboard]' );
|
||||
|
||||
var selector = typeof target === 'number' ?
|
||||
':eq('+target+')' :
|
||||
target;
|
||||
if ( typeof target === 'number' ) {
|
||||
dt.cells( null, target, { page: 'current' } ).nodes().to$()
|
||||
.attr( 'tabIndex', ctx.iTabIndex )
|
||||
.data( 'dtr-keyboard', 1 );
|
||||
}
|
||||
else {
|
||||
// This is a bit of a hack - we need to limit the selected nodes to just
|
||||
// those of this table
|
||||
if ( target === 'td:first-child, th:first-child' ) {
|
||||
target = '>td:first-child, >th:first-child';
|
||||
}
|
||||
|
||||
$( selector, dt.rows( { page: 'current' } ).nodes() )
|
||||
.attr( 'tabIndex', ctx.iTabIndex )
|
||||
.data( 'dtr-keyboard', 1 );
|
||||
$( target, dt.rows( { page: 'current' } ).nodes() )
|
||||
.attr( 'tabIndex', ctx.iTabIndex )
|
||||
.data( 'dtr-keyboard', 1 );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
|
@ -1037,6 +1117,52 @@ Responsive.display = {
|
|||
};
|
||||
|
||||
|
||||
var _childNodeStore = {};
|
||||
|
||||
function _childNodes( dt, row, col ) {
|
||||
var name = row+'-'+col;
|
||||
|
||||
if ( _childNodeStore[ name ] ) {
|
||||
return _childNodeStore[ name ];
|
||||
}
|
||||
|
||||
// https://jsperf.com/childnodes-array-slice-vs-loop
|
||||
var nodes = [];
|
||||
var children = dt.cell( row, col ).node().childNodes;
|
||||
for ( var i=0, ien=children.length ; i<ien ; i++ ) {
|
||||
nodes.push( children[i] );
|
||||
}
|
||||
|
||||
_childNodeStore[ name ] = nodes;
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
function _childNodesRestore( dt, row, col ) {
|
||||
var name = row+'-'+col;
|
||||
|
||||
if ( ! _childNodeStore[ name ] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var node = dt.cell( row, col ).node();
|
||||
var store = _childNodeStore[ name ];
|
||||
var parent = store[0].parentNode;
|
||||
var parentChildren = parent.childNodes;
|
||||
var a = [];
|
||||
|
||||
for ( var i=0, ien=parentChildren.length ; i<ien ; i++ ) {
|
||||
a.push( parentChildren[i] );
|
||||
}
|
||||
|
||||
for ( var j=0, jen=a.length ; j<jen ; j++ ) {
|
||||
node.appendChild( a[j] );
|
||||
}
|
||||
|
||||
_childNodeStore[ name ] = undefined;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display methods - functions which define how the hidden data should be shown
|
||||
* in the table.
|
||||
|
@ -1046,6 +1172,33 @@ Responsive.display = {
|
|||
* @static
|
||||
*/
|
||||
Responsive.renderer = {
|
||||
listHiddenNodes: function () {
|
||||
return function ( api, rowIdx, columns ) {
|
||||
var ul = $('<ul data-dtr-index="'+rowIdx+'" class="dtr-details"/>');
|
||||
var found = false;
|
||||
|
||||
var data = $.each( columns, function ( i, col ) {
|
||||
if ( col.hidden ) {
|
||||
$(
|
||||
'<li data-dtr-index="'+col.columnIndex+'" data-dt-row="'+col.rowIndex+'" data-dt-column="'+col.columnIndex+'">'+
|
||||
'<span class="dtr-title">'+
|
||||
col.title+
|
||||
'</span> '+
|
||||
'</li>'
|
||||
)
|
||||
.append( $('<span class="dtr-data"/>').append( _childNodes( api, col.rowIndex, col.columnIndex ) ) )// api.cell( col.rowIndex, col.columnIndex ).node().childNodes ) )
|
||||
.appendTo( ul );
|
||||
|
||||
found = true;
|
||||
}
|
||||
} );
|
||||
|
||||
return found ?
|
||||
ul :
|
||||
false;
|
||||
};
|
||||
},
|
||||
|
||||
listHidden: function () {
|
||||
return function ( api, rowIdx, columns ) {
|
||||
var data = $.map( columns, function ( col ) {
|
||||
|
@ -1062,7 +1215,7 @@ Responsive.renderer = {
|
|||
} ).join('');
|
||||
|
||||
return data ?
|
||||
$('<ul data-dtr-index="'+rowIdx+'"/>').append( data ) :
|
||||
$('<ul data-dtr-index="'+rowIdx+'" class="dtr-details"/>').append( data ) :
|
||||
false;
|
||||
}
|
||||
},
|
||||
|
@ -1080,7 +1233,7 @@ Responsive.renderer = {
|
|||
'</tr>';
|
||||
} ).join('');
|
||||
|
||||
return $('<table class="'+options.tableClass+'" width="100%"/>').append( data );
|
||||
return $('<table class="'+options.tableClass+' dtr-details" width="100%"/>').append( data );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1194,6 +1347,14 @@ Api.register( 'responsive.hasHidden()', function () {
|
|||
false;
|
||||
} );
|
||||
|
||||
Api.registerPlural( 'columns().responsiveHidden()', 'column().responsiveHidden()', function () {
|
||||
return this.iterator( 'column', function ( settings, column ) {
|
||||
return settings._responsive ?
|
||||
settings._responsive.s.current[ column ] :
|
||||
false;
|
||||
}, 1 );
|
||||
} );
|
||||
|
||||
|
||||
/**
|
||||
* Version information
|
||||
|
@ -1201,7 +1362,7 @@ Api.register( 'responsive.hasHidden()', function () {
|
|||
* @name Responsive.version
|
||||
* @static
|
||||
*/
|
||||
Responsive.version = '2.1.0';
|
||||
Responsive.version = '2.2.3';
|
||||
|
||||
|
||||
$.fn.dataTable.Responsive = Responsive;
|
||||
|
|
|
@ -1,26 +1,30 @@
|
|||
/*!
|
||||
Responsive 2.1.0
|
||||
2014-2016 SpryMedia Ltd - datatables.net/license
|
||||
Responsive 2.2.3
|
||||
2014-2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(l){return c(l,window,document)}):"object"===typeof exports?module.exports=function(l,k){l||(l=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(l,k).$;return c(k,l,l.document)}:c(jQuery,window,document)})(function(c,l,k,p){var m=c.fn.dataTable,j=function(a,b){if(!m.versionCheck||!m.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new m.Api(a),columns:[],
|
||||
current:[]};this.s.dt.settings()[0].responsive||(b&&"string"===typeof b.details?b.details={type:b.details}:b&&!1===b.details?b.details={type:!1}:b&&!0===b.details&&(b.details={type:"inline"}),this.c=c.extend(!0,{},j.defaults,m.defaults.responsive,b),a.responsive=this,this._constructor())};c.extend(j.prototype,{_constructor:function(){var a=this,b=this.s.dt,d=b.settings()[0],e=c(l).width();b.settings()[0]._responsive=this;c(l).on("resize.dtr orientationchange.dtr",m.util.throttle(function(){var b=
|
||||
c(l).width();b!==e&&(a._resize(),e=b)}));d.oApi._fnCallbackReg(d,"aoRowCreatedCallback",function(e){-1!==c.inArray(!1,a.s.current)&&c("td, th",e).each(function(e){e=b.column.index("toData",e);!1===a.s.current[e]&&c(this).css("display","none")})});b.on("destroy.dtr",function(){b.off(".dtr");c(b.table().body()).off(".dtr");c(l).off("resize.dtr orientationchange.dtr");c.each(a.s.current,function(b,e){!1===e&&a._setColumnVis(b,!0)})});this.c.breakpoints.sort(function(a,b){return a.width<b.width?1:a.width>
|
||||
b.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!==d.type&&(a._detailsInit(),b.on("column-visibility.dtr",function(){a._classLogic();a._resizeAuto();a._resize()}),b.on("draw.dtr",function(){a._redrawChildren()}),c(b.table().node()).addClass("dtr-"+d.type));b.on("column-reorder.dtr",function(){a._classLogic();a._resizeAuto();a._resize()});b.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});b.on("init.dtr",function(){a._resizeAuto();a._resize();c.inArray(false,
|
||||
a.s.current)&&b.columns.adjust()});this._resize()},_columnsVisiblity:function(a){var b=this.s.dt,d=this.s.columns,e,f,g=d.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),h=c.map(d,function(b){return b.auto&&null===b.minWidth?!1:!0===b.auto?"-":-1!==c.inArray(a,b.includeIn)}),n=0;e=0;for(f=h.length;e<f;e++)!0===h[e]&&(n+=d[e].minWidth);e=b.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;b=
|
||||
b.table().container().offsetWidth-e-n;e=0;for(f=h.length;e<f;e++)d[e].control&&(b-=d[e].minWidth);n=!1;e=0;for(f=g.length;e<f;e++){var i=g[e].columnIdx;"-"===h[i]&&(!d[i].control&&d[i].minWidth)&&(n||0>b-d[i].minWidth?(n=!0,h[i]=!1):h[i]=!0,b-=d[i].minWidth)}g=!1;e=0;for(f=d.length;e<f;e++)if(!d[e].control&&!d[e].never&&!h[e]){g=!0;break}e=0;for(f=d.length;e<f;e++)d[e].control&&(h[e]=g);-1===c.inArray(!0,h)&&(h[0]=!0);return h},_classLogic:function(){var a=this,b=this.c.breakpoints,d=this.s.dt,e=
|
||||
d.columns().eq(0).map(function(a){var b=this.column(a),e=b.header().className,a=d.settings()[0].aoColumns[a].responsivePriority;a===p&&(b=c(b.header()).data("priority"),a=b!==p?1*b:1E4);return{className:e,includeIn:[],auto:!1,control:!1,never:e.match(/\bnever\b/)?!0:!1,priority:a}}),f=function(a,b){var d=e[a].includeIn;-1===c.inArray(b,d)&&d.push(b)},g=function(c,d,i,g){if(i)if("max-"===i){g=a._find(d).width;d=0;for(i=b.length;d<i;d++)b[d].width<=g&&f(c,b[d].name)}else if("min-"===i){g=a._find(d).width;
|
||||
d=0;for(i=b.length;d<i;d++)b[d].width>=g&&f(c,b[d].name)}else{if("not-"===i){d=0;for(i=b.length;d<i;d++)-1===b[d].name.indexOf(g)&&f(c,b[d].name)}}else e[c].includeIn.push(d)};e.each(function(a,e){for(var d=a.className.split(" "),f=!1,j=0,l=d.length;j<l;j++){var k=c.trim(d[j]);if("all"===k){f=!0;a.includeIn=c.map(b,function(a){return a.name});return}if("none"===k||a.never){f=!0;return}if("control"===k){f=!0;a.control=!0;return}c.each(b,function(a,b){var d=b.name.split("-"),c=k.match(RegExp("(min\\-|max\\-|not\\-)?("+
|
||||
d[0]+")(\\-[_a-zA-Z0-9])?"));c&&(f=!0,c[2]===d[0]&&c[3]==="-"+d[1]?g(e,b.name,c[1],c[2]+c[3]):c[2]===d[0]&&!c[3]&&g(e,b.name,c[1],c[2]))})}f||(a.auto=!0)});this.s.columns=e},_detailsDisplay:function(a,b){var d=this,e=this.s.dt,f=this.c.details;if(f&&!1!==f.type){var g=f.display(a,b,function(){return f.renderer(e,a[0],d._detailsObj(a[0]))});(!0===g||!1===g)&&c(e.table().node()).triggerHandler("responsive-display.dt",[e,a,g,b])}},_detailsInit:function(){var a=this,b=this.s.dt,d=this.c.details;"inline"===
|
||||
d.type&&(d.target="td:first-child, th:first-child");b.on("draw.dtr",function(){a._tabIndexes()});a._tabIndexes();c(b.table().body()).on("keyup.dtr","td, th",function(a){a.keyCode===13&&c(this).data("dtr-keyboard")&&c(this).click()});var e=d.target;c(b.table().body()).on("click.dtr mousedown.dtr mouseup.dtr","string"===typeof e?e:"td, th",function(d){if(c(b.table().node()).hasClass("collapsed")&&b.row(c(this).closest("tr")).length){if(typeof e==="number"){var g=e<0?b.columns().eq(0).length+e:e;if(b.cell(this).index().column!==
|
||||
g)return}g=b.row(c(this).closest("tr"));d.type==="click"?a._detailsDisplay(g,false):d.type==="mousedown"?c(this).css("outline","none"):d.type==="mouseup"&&c(this).blur().css("outline","")}})},_detailsObj:function(a){var b=this,d=this.s.dt;return c.map(this.s.columns,function(e,c){if(!e.never&&!e.control)return{title:d.settings()[0].aoColumns[c].sTitle,data:d.cell(a,c).render(b.c.orthogonal),hidden:d.column(c).visible()&&!b.s.current[c],columnIndex:c,rowIndex:a}})},_find:function(a){for(var b=this.c.breakpoints,
|
||||
d=0,c=b.length;d<c;d++)if(b[d].name===a)return b[d]},_redrawChildren:function(){var a=this,b=this.s.dt;b.rows({page:"current"}).iterator("row",function(c,e){b.row(e);a._detailsDisplay(b.row(e),!0)})},_resize:function(){var a=this,b=this.s.dt,d=c(l).width(),e=this.c.breakpoints,f=e[0].name,g=this.s.columns,h,j=this.s.current.slice();for(h=e.length-1;0<=h;h--)if(d<=e[h].width){f=e[h].name;break}var i=this._columnsVisiblity(f);this.s.current=i;e=!1;h=0;for(d=g.length;h<d;h++)if(!1===i[h]&&!g[h].never&&
|
||||
!g[h].control){e=!0;break}c(b.table().node()).toggleClass("collapsed",e);var k=!1;b.columns().eq(0).each(function(b,c){i[c]!==j[c]&&(k=!0,a._setColumnVis(b,i[c]))});k&&(this._redrawChildren(),c(b.table().node()).trigger("responsive-resize.dt",[b,this.s.current]))},_resizeAuto:function(){var a=this.s.dt,b=this.s.columns;if(this.c.auto&&-1!==c.inArray(!0,c.map(b,function(a){return a.auto}))){a.table().node();var d=a.table().node().cloneNode(!1),e=c(a.table().header().cloneNode(!1)).appendTo(d),f=c(a.table().body()).clone(!1,
|
||||
!1).empty().appendTo(d),g=a.columns().header().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display","table-cell");c(f).append(c(a.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(f=a.table().footer()){var f=c(f.cloneNode(!1)).appendTo(d),h=a.columns().footer().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display","table-cell");c("<tr/>").append(h).appendTo(f)}c("<tr/>").append(g).appendTo(e);"inline"===this.c.details.type&&
|
||||
c(d).addClass("dtr-inline collapsed");c(d).find("[name]").removeAttr("name");d=c("<div/>").css({width:1,height:1,overflow:"hidden"}).append(d);d.insertBefore(a.table().node());g.each(function(c){c=a.column.index("fromVisible",c);b[c].minWidth=this.offsetWidth||0});d.remove()}},_setColumnVis:function(a,b){var d=this.s.dt,e=b?"":"none";c(d.column(a).header()).css("display",e);c(d.column(a).footer()).css("display",e);d.column(a).nodes().to$().css("display",e)},_tabIndexes:function(){var a=this.s.dt,
|
||||
b=a.cells({page:"current"}).nodes().to$(),d=a.settings()[0],e=this.c.details.target;b.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");c("number"===typeof e?":eq("+e+")":e,a.rows({page:"current"}).nodes()).attr("tabIndex",d.iTabIndex).data("dtr-keyboard",1)}});j.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];j.display={childRow:function(a,b,d){if(b){if(c(a.node()).hasClass("parent"))return a.child(d(),
|
||||
"child").show(),!0}else{if(a.child.isShown())return a.child(!1),c(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();c(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,b,d){if(!b&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),c(a.node()).removeClass("parent"),!1;a.child(d(),"child").show();c(a.node()).addClass("parent");return!0},modal:function(a){return function(b,d,e){if(d)c("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();
|
||||
c(k).off("keypress.dtr")},g=c('<div class="dtr-modal"/>').append(c('<div class="dtr-modal-display"/>').append(c('<div class="dtr-modal-content"/>').append(e())).append(c('<div class="dtr-modal-close">×</div>').click(function(){f()}))).append(c('<div class="dtr-modal-background"/>').click(function(){f()})).appendTo("body");c(k).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}a&&a.header&&c("div.dtr-modal-content").prepend("<h2>"+a.header(b)+"</h2>")}}};j.renderer={listHidden:function(){return function(a,
|
||||
b,d){return(a=c.map(d,function(a){return a.hidden?'<li data-dtr-index="'+a.columnIndex+'" data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><span class="dtr-title">'+a.title+'</span> <span class="dtr-data">'+a.data+"</span></li>":""}).join(""))?c('<ul data-dtr-index="'+b+'"/>').append(a):!1}},tableAll:function(a){a=c.extend({tableClass:""},a);return function(b,d,e){b=c.map(e,function(a){return'<tr data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><td>'+a.title+":</td> <td>"+
|
||||
a.data+"</td></tr>"}).join("");return c('<table class="'+a.tableClass+'" width="100%"/>').append(b)}}};j.defaults={breakpoints:j.breakpoints,auto:!0,details:{display:j.display.childRow,renderer:j.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var o=c.fn.dataTable.Api;o.register("responsive()",function(){return this});o.register("responsive.index()",function(a){a=c(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});o.register("responsive.rebuild()",function(){return this.iterator("table",
|
||||
function(a){a._responsive&&a._responsive._classLogic()})});o.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});o.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==c.inArray(!1,a._responsive.s.current):!1});j.version="2.1.0";c.fn.dataTable.Responsive=j;c.fn.DataTable.Responsive=j;c(k).on("preInit.dt.dtr",function(a,b){if("dt"===a.namespace&&(c(b.nTable).hasClass("responsive")||
|
||||
c(b.nTable).hasClass("dt-responsive")||b.oInit.responsive||m.defaults.responsive)){var d=b.oInit.responsive;!1!==d&&new j(b,c.isPlainObject(d)?d:{})}});return j});
|
||||
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(l){return d(l,window,document)}):"object"===typeof exports?module.exports=function(l,j){l||(l=window);if(!j||!j.fn.dataTable)j=require("datatables.net")(l,j).$;return d(j,l,l.document)}:d(jQuery,window,document)})(function(d,l,j,q){function t(a,b,c){var e=b+"-"+c;if(n[e])return n[e];for(var d=[],a=a.cell(b,c).node().childNodes,b=0,c=a.length;b<c;b++)d.push(a[b]);return n[e]=d}function r(a,b,d){var e=b+
|
||||
"-"+d;if(n[e]){for(var a=a.cell(b,d).node(),d=n[e][0].parentNode.childNodes,b=[],f=0,g=d.length;f<g;f++)b.push(d[f]);d=0;for(f=b.length;d<f;d++)a.appendChild(b[d]);n[e]=q}}var o=d.fn.dataTable,i=function(a,b){if(!o.versionCheck||!o.versionCheck("1.10.10"))throw"DataTables Responsive requires DataTables 1.10.10 or newer";this.s={dt:new o.Api(a),columns:[],current:[]};this.s.dt.settings()[0].responsive||(b&&"string"===typeof b.details?b.details={type:b.details}:b&&!1===b.details?b.details={type:!1}:
|
||||
b&&!0===b.details&&(b.details={type:"inline"}),this.c=d.extend(!0,{},i.defaults,o.defaults.responsive,b),a.responsive=this,this._constructor())};d.extend(i.prototype,{_constructor:function(){var a=this,b=this.s.dt,c=b.settings()[0],e=d(l).width();b.settings()[0]._responsive=this;d(l).on("resize.dtr orientationchange.dtr",o.util.throttle(function(){var b=d(l).width();b!==e&&(a._resize(),e=b)}));c.oApi._fnCallbackReg(c,"aoRowCreatedCallback",function(e){-1!==d.inArray(!1,a.s.current)&&d(">td, >th",
|
||||
e).each(function(e){e=b.column.index("toData",e);!1===a.s.current[e]&&d(this).css("display","none")})});b.on("destroy.dtr",function(){b.off(".dtr");d(b.table().body()).off(".dtr");d(l).off("resize.dtr orientationchange.dtr");d.each(a.s.current,function(b,e){!1===e&&a._setColumnVis(b,!0)})});this.c.breakpoints.sort(function(a,b){return a.width<b.width?1:a.width>b.width?-1:0});this._classLogic();this._resizeAuto();c=this.c.details;!1!==c.type&&(a._detailsInit(),b.on("column-visibility.dtr",function(){a._timer&&
|
||||
clearTimeout(a._timer);a._timer=setTimeout(function(){a._timer=null;a._classLogic();a._resizeAuto();a._resize();a._redrawChildren()},100)}),b.on("draw.dtr",function(){a._redrawChildren()}),d(b.table().node()).addClass("dtr-"+c.type));b.on("column-reorder.dtr",function(){a._classLogic();a._resizeAuto();a._resize()});b.on("column-sizing.dtr",function(){a._resizeAuto();a._resize()});b.on("preXhr.dtr",function(){var e=[];b.rows().every(function(){this.child.isShown()&&e.push(this.id(true))});b.one("draw.dtr",
|
||||
function(){a._resizeAuto();a._resize();b.rows(e).every(function(){a._detailsDisplay(this,false)})})});b.on("init.dtr",function(){a._resizeAuto();a._resize();d.inArray(false,a.s.current)&&b.columns.adjust()});this._resize()},_columnsVisiblity:function(a){var b=this.s.dt,c=this.s.columns,e,f,g=c.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),h=d.map(c,function(e,c){return!1===b.column(c).visible()?
|
||||
"not-visible":e.auto&&null===e.minWidth?!1:!0===e.auto?"-":-1!==d.inArray(a,e.includeIn)}),m=0;e=0;for(f=h.length;e<f;e++)!0===h[e]&&(m+=c[e].minWidth);e=b.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;m=b.table().container().offsetWidth-e-m;e=0;for(f=h.length;e<f;e++)c[e].control&&(m-=c[e].minWidth);var s=!1;e=0;for(f=g.length;e<f;e++){var k=g[e].columnIdx;"-"===h[k]&&(!c[k].control&&c[k].minWidth)&&(s||0>m-c[k].minWidth?(s=!0,h[k]=!1):h[k]=!0,m-=c[k].minWidth)}g=!1;e=0;for(f=c.length;e<f;e++)if(!c[e].control&&
|
||||
!c[e].never&&!1===h[e]){g=!0;break}e=0;for(f=c.length;e<f;e++)c[e].control&&(h[e]=g),"not-visible"===h[e]&&(h[e]=!1);-1===d.inArray(!0,h)&&(h[0]=!0);return h},_classLogic:function(){var a=this,b=this.c.breakpoints,c=this.s.dt,e=c.columns().eq(0).map(function(a){var b=this.column(a),e=b.header().className,a=c.settings()[0].aoColumns[a].responsivePriority;a===q&&(b=d(b.header()).data("priority"),a=b!==q?1*b:1E4);return{className:e,includeIn:[],auto:!1,control:!1,never:e.match(/\bnever\b/)?!0:!1,priority:a}}),
|
||||
f=function(a,b){var c=e[a].includeIn;-1===d.inArray(b,c)&&c.push(b)},g=function(d,c,g,k){if(g)if("max-"===g){k=a._find(c).width;c=0;for(g=b.length;c<g;c++)b[c].width<=k&&f(d,b[c].name)}else if("min-"===g){k=a._find(c).width;c=0;for(g=b.length;c<g;c++)b[c].width>=k&&f(d,b[c].name)}else{if("not-"===g){c=0;for(g=b.length;c<g;c++)-1===b[c].name.indexOf(k)&&f(d,b[c].name)}}else e[d].includeIn.push(c)};e.each(function(a,e){for(var c=a.className.split(" "),f=!1,i=0,l=c.length;i<l;i++){var j=d.trim(c[i]);
|
||||
if("all"===j){f=!0;a.includeIn=d.map(b,function(a){return a.name});return}if("none"===j||a.never){f=!0;return}if("control"===j){f=!0;a.control=!0;return}d.each(b,function(a,b){var d=b.name.split("-"),c=j.match(RegExp("(min\\-|max\\-|not\\-)?("+d[0]+")(\\-[_a-zA-Z0-9])?"));c&&(f=!0,c[2]===d[0]&&c[3]==="-"+d[1]?g(e,b.name,c[1],c[2]+c[3]):c[2]===d[0]&&!c[3]&&g(e,b.name,c[1],c[2]))})}f||(a.auto=!0)});this.s.columns=e},_detailsDisplay:function(a,b){var c=this,e=this.s.dt,f=this.c.details;if(f&&!1!==f.type){var g=
|
||||
f.display(a,b,function(){return f.renderer(e,a[0],c._detailsObj(a[0]))});(!0===g||!1===g)&&d(e.table().node()).triggerHandler("responsive-display.dt",[e,a,g,b])}},_detailsInit:function(){var a=this,b=this.s.dt,c=this.c.details;"inline"===c.type&&(c.target="td:first-child, th:first-child");b.on("draw.dtr",function(){a._tabIndexes()});a._tabIndexes();d(b.table().body()).on("keyup.dtr","td, th",function(a){a.keyCode===13&&d(this).data("dtr-keyboard")&&d(this).click()});var e=c.target;d(b.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",
|
||||
"string"===typeof e?e:"td, th",function(c){if(d(b.table().node()).hasClass("collapsed")&&d.inArray(d(this).closest("tr").get(0),b.rows().nodes().toArray())!==-1){if(typeof e==="number"){var g=e<0?b.columns().eq(0).length+e:e;if(b.cell(this).index().column!==g)return}g=b.row(d(this).closest("tr"));c.type==="click"?a._detailsDisplay(g,false):c.type==="mousedown"?d(this).css("outline","none"):c.type==="mouseup"&&d(this).blur().css("outline","")}})},_detailsObj:function(a){var b=this,c=this.s.dt;return d.map(this.s.columns,
|
||||
function(e,d){if(!e.never&&!e.control)return{title:c.settings()[0].aoColumns[d].sTitle,data:c.cell(a,d).render(b.c.orthogonal),hidden:c.column(d).visible()&&!b.s.current[d],columnIndex:d,rowIndex:a}})},_find:function(a){for(var b=this.c.breakpoints,c=0,e=b.length;c<e;c++)if(b[c].name===a)return b[c]},_redrawChildren:function(){var a=this,b=this.s.dt;b.rows({page:"current"}).iterator("row",function(c,e){b.row(e);a._detailsDisplay(b.row(e),!0)})},_resize:function(){var a=this,b=this.s.dt,c=d(l).width(),
|
||||
e=this.c.breakpoints,f=e[0].name,g=this.s.columns,h,m=this.s.current.slice();for(h=e.length-1;0<=h;h--)if(c<=e[h].width){f=e[h].name;break}var i=this._columnsVisiblity(f);this.s.current=i;e=!1;h=0;for(c=g.length;h<c;h++)if(!1===i[h]&&!g[h].never&&!g[h].control&&!1===!b.column(h).visible()){e=!0;break}d(b.table().node()).toggleClass("collapsed",e);var k=!1,j=0;b.columns().eq(0).each(function(b,c){!0===i[c]&&j++;i[c]!==m[c]&&(k=!0,a._setColumnVis(b,i[c]))});k&&(this._redrawChildren(),d(b.table().node()).trigger("responsive-resize.dt",
|
||||
[b,this.s.current]),0===b.page.info().recordsDisplay&&d("td",b.table().body()).eq(0).attr("colspan",j))},_resizeAuto:function(){var a=this.s.dt,b=this.s.columns;if(this.c.auto&&-1!==d.inArray(!0,d.map(b,function(a){return a.auto}))){d.isEmptyObject(n)||d.each(n,function(b){b=b.split("-");r(a,1*b[0],1*b[1])});a.table().node();var c=a.table().node().cloneNode(!1),e=d(a.table().header().cloneNode(!1)).appendTo(c),f=d(a.table().body()).clone(!1,!1).empty().appendTo(c),g=a.columns().header().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display",
|
||||
"table-cell").css("min-width",0);d(f).append(d(a.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(f=a.table().footer()){var f=d(f.cloneNode(!1)).appendTo(c),h=a.columns().footer().filter(function(b){return a.column(b).visible()}).to$().clone(!1).css("display","table-cell");d("<tr/>").append(h).appendTo(f)}d("<tr/>").append(g).appendTo(e);"inline"===this.c.details.type&&d(c).addClass("dtr-inline collapsed");d(c).find("[name]").removeAttr("name");d(c).css("position","relative");
|
||||
c=d("<div/>").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(c);c.insertBefore(a.table().node());g.each(function(c){c=a.column.index("fromVisible",c);b[c].minWidth=this.offsetWidth||0});c.remove()}},_setColumnVis:function(a,b){var c=this.s.dt,e=b?"":"none";d(c.column(a).header()).css("display",e);d(c.column(a).footer()).css("display",e);c.column(a).nodes().to$().css("display",e);d.isEmptyObject(n)||c.cells(null,a).indexes().each(function(a){r(c,a.row,a.column)})},_tabIndexes:function(){var a=
|
||||
this.s.dt,b=a.cells({page:"current"}).nodes().to$(),c=a.settings()[0],e=this.c.details.target;b.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");"number"===typeof e?a.cells(null,e,{page:"current"}).nodes().to$().attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1):("td:first-child, th:first-child"===e&&(e=">td:first-child, >th:first-child"),d(e,a.rows({page:"current"}).nodes()).attr("tabIndex",c.iTabIndex).data("dtr-keyboard",1))}});i.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",
|
||||
width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];i.display={childRow:function(a,b,c){if(b){if(d(a.node()).hasClass("parent"))return a.child(c(),"child").show(),!0}else{if(a.child.isShown())return a.child(!1),d(a.node()).removeClass("parent"),!1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0}},childRowImmediate:function(a,b,c){if(!b&&a.child.isShown()||!a.responsive.hasHidden())return a.child(!1),d(a.node()).removeClass("parent"),
|
||||
!1;a.child(c(),"child").show();d(a.node()).addClass("parent");return!0},modal:function(a){return function(b,c,e){if(c)d("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();d(j).off("keypress.dtr")},g=d('<div class="dtr-modal"/>').append(d('<div class="dtr-modal-display"/>').append(d('<div class="dtr-modal-content"/>').append(e())).append(d('<div class="dtr-modal-close">×</div>').click(function(){f()}))).append(d('<div class="dtr-modal-background"/>').click(function(){f()})).appendTo("body");
|
||||
d(j).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}a&&a.header&&d("div.dtr-modal-content").prepend("<h2>"+a.header(b)+"</h2>")}}};var n={};i.renderer={listHiddenNodes:function(){return function(a,b,c){var e=d('<ul data-dtr-index="'+b+'" class="dtr-details"/>'),f=!1;d.each(c,function(b,c){c.hidden&&(d('<li data-dtr-index="'+c.columnIndex+'" data-dt-row="'+c.rowIndex+'" data-dt-column="'+c.columnIndex+'"><span class="dtr-title">'+c.title+"</span> </li>").append(d('<span class="dtr-data"/>').append(t(a,
|
||||
c.rowIndex,c.columnIndex))).appendTo(e),f=!0)});return f?e:!1}},listHidden:function(){return function(a,b,c){return(a=d.map(c,function(a){return a.hidden?'<li data-dtr-index="'+a.columnIndex+'" data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><span class="dtr-title">'+a.title+'</span> <span class="dtr-data">'+a.data+"</span></li>":""}).join(""))?d('<ul data-dtr-index="'+b+'" class="dtr-details"/>').append(a):!1}},tableAll:function(a){a=d.extend({tableClass:""},a);return function(b,
|
||||
c,e){b=d.map(e,function(a){return'<tr data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><td>'+a.title+":</td> <td>"+a.data+"</td></tr>"}).join("");return d('<table class="'+a.tableClass+' dtr-details" width="100%"/>').append(b)}}};i.defaults={breakpoints:i.breakpoints,auto:!0,details:{display:i.display.childRow,renderer:i.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var p=d.fn.dataTable.Api;p.register("responsive()",function(){return this});p.register("responsive.index()",
|
||||
function(a){a=d(a);return{column:a.data("dtr-index"),row:a.parent().data("dtr-index")}});p.register("responsive.rebuild()",function(){return this.iterator("table",function(a){a._responsive&&a._responsive._classLogic()})});p.register("responsive.recalc()",function(){return this.iterator("table",function(a){a._responsive&&(a._responsive._resizeAuto(),a._responsive._resize())})});p.register("responsive.hasHidden()",function(){var a=this.context[0];return a._responsive?-1!==d.inArray(!1,a._responsive.s.current):
|
||||
!1});p.registerPlural("columns().responsiveHidden()","column().responsiveHidden()",function(){return this.iterator("column",function(a,b){return a._responsive?a._responsive.s.current[b]:!1},1)});i.version="2.2.3";d.fn.dataTable.Responsive=i;d.fn.DataTable.Responsive=i;d(j).on("preInit.dt.dtr",function(a,b){if("dt"===a.namespace&&(d(b.nTable).hasClass("responsive")||d(b.nTable).hasClass("dt-responsive")||b.oInit.responsive||o.defaults.responsive)){var c=b.oInit.responsive;!1!==c&&new i(b,d.isPlainObject(c)?
|
||||
c:{})}});return i});
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"_from": "datatables.net-responsive@2.2.3",
|
||||
"_id": "datatables.net-responsive@2.2.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-8D6VtZcyuH3FG0Hn5A4LPZQEOX3+HrRFM7HjpmsQc/nQDBbdeBLkJX4Sh/o1nzFTSneuT1Wh/lYZHVPpjcN+Sw==",
|
||||
"_location": "/datatables.net-responsive",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-responsive@2.2.3",
|
||||
"name": "datatables.net-responsive",
|
||||
"escapedName": "datatables.net-responsive",
|
||||
"rawSpec": "2.2.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.2.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/datatables.net-responsive-bs4"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-responsive/-/datatables.net-responsive-2.2.3.tgz",
|
||||
"_shasum": "50a2b1b4955b16b32f573a3f00f473b0bfbee913",
|
||||
"_spec": "datatables.net-responsive@2.2.3",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella\\node_modules\\datatables.net-responsive-bs4",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net": "^1.10.15",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Responsive for DataTables ",
|
||||
"files": [
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"responsive",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/dataTables.responsive.js",
|
||||
"name": "datatables.net-responsive",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DataTables/Dist-DataTables-Responsive.git"
|
||||
},
|
||||
"version": "2.2.3"
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-scroller-bs",
|
||||
"description": "Scroller for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"css/scroller.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"virtual scrolling",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-scroller": ">=1.3.0"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "1.4.2",
|
||||
"_release": "1.4.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.2",
|
||||
"commit": "f86b60ef991aabb6e6d9b10e98134eed606f3ccc"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-Scroller-Bootstrap.git",
|
||||
"_target": "^1.4.1",
|
||||
"_originalSource": "datatables.net-scroller-bs"
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
Copyright SpryMedia Limited and other contributors
|
||||
http://datatables.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-scroller-bs",
|
||||
"description": "Scroller for DataTables with styling for [Bootstrap](http://getbootstrap.com/)",
|
||||
"main": [
|
||||
"css/scroller.bootstrap.css"
|
||||
],
|
||||
"keywords": [
|
||||
"virtual scrolling",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net-bs": ">=1.10.9",
|
||||
"datatables.net-scroller": ">=1.3.0"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
div.DTS {
|
||||
display: block !important;
|
||||
}
|
||||
div.DTS tbody th,
|
||||
div.DTS tbody td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.DTS div.DTS_Loading {
|
||||
z-index: 1;
|
||||
}
|
||||
div.DTS div.dataTables_scrollBody {
|
||||
background: repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, white 10px, white 20px);
|
||||
}
|
||||
div.DTS div.dataTables_scrollBody table {
|
||||
z-index: 2;
|
||||
}
|
||||
div.DTS div.dataTables_paginate,
|
||||
div.DTS div.dataTables_length {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.DTS tbody tr.even {
|
||||
background-color: white;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
div.DTS{display:block !important}div.DTS tbody th,div.DTS tbody td{white-space:nowrap}div.DTS div.DTS_Loading{z-index:1}div.DTS div.dataTables_scrollBody{background:repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, #fff 10px, #fff 20px)}div.DTS div.dataTables_scrollBody table{z-index:2}div.DTS div.dataTables_paginate,div.DTS div.dataTables_length{display:none}div.DTS tbody tr.even{background-color:white}
|
|
@ -1,6 +1,6 @@
|
|||
# Scroller for DataTables with styling for [Bootstrap](http://getbootstrap.com/)
|
||||
# Scroller for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)
|
||||
|
||||
This package contains distribution files required to style [Scroller extension](https://datatables.net/extensions/scroller) for [DataTables](https://datatables.net/) with styling for [Bootstrap](http://getbootstrap.com/).
|
||||
This package contains distribution files required to style [Scroller extension](https://datatables.net/extensions/scroller) for [DataTables](https://datatables.net/) with styling for [Bootstrap 4](http://getbootstrap.com/).
|
||||
|
||||
Scroller is a virtual rendering plug-in for DataTables which allows large datasets to be drawn on screen very quickly. Virtual rendering means is that only the visible portion of the table is drawn, while the scrolling container gives the visual impression that the whole table is visible, allowing excellent browser performance.
|
||||
|
||||
|
@ -14,18 +14,18 @@ For inclusion of this library using a standard `<script>` tag, rather than using
|
|||
### npm
|
||||
|
||||
```
|
||||
npm install datatables.net-scroller-bs
|
||||
npm install datatables.net-scroller-bs4
|
||||
```
|
||||
|
||||
```
|
||||
var $ = require( 'jquery' );
|
||||
require( 'datatables.net-scroller-bs' )( window, $ );
|
||||
require( 'datatables.net-scroller-bs4' )( $ );
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```
|
||||
bower install --save datatables.net-scroller-bs
|
||||
bower install --save datatables.net-scroller-bs4
|
||||
```
|
||||
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
div.dts {
|
||||
display: block !important;
|
||||
}
|
||||
div.dts tbody th,
|
||||
div.dts tbody td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dts div.dts_loading {
|
||||
z-index: 1;
|
||||
}
|
||||
div.dts div.dts_label {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
|
||||
text-align: right;
|
||||
border-radius: 3px;
|
||||
padding: 0.4em;
|
||||
z-index: 2;
|
||||
display: none;
|
||||
}
|
||||
div.dts div.dataTables_scrollBody {
|
||||
background: repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, white 10px, white 20px);
|
||||
}
|
||||
div.dts div.dataTables_scrollBody table {
|
||||
z-index: 2;
|
||||
}
|
||||
div.dts div.dataTables_paginate,
|
||||
div.dts div.dataTables_length {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.DTS div.dataTables_scrollBody table {
|
||||
background-color: white;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
div.dts{display:block !important}div.dts tbody th,div.dts tbody td{white-space:nowrap}div.dts div.dts_loading{z-index:1}div.dts div.dts_label{position:absolute;right:10px;background:rgba(0,0,0,0.8);color:white;box-shadow:3px 3px 10px rgba(0,0,0,0.5);text-align:right;border-radius:3px;padding:0.4em;z-index:2;display:none}div.dts div.dataTables_scrollBody{background:repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, #fff 10px, #fff 20px)}div.dts div.dataTables_scrollBody table{z-index:2}div.dts div.dataTables_paginate,div.dts div.dataTables_length{display:none}div.DTS div.dataTables_scrollBody table{background-color:white}
|
|
@ -0,0 +1,38 @@
|
|||
/*! Bootstrap 4 styling wrapper for Scroller
|
||||
* ©2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
(function( factory ){
|
||||
if ( typeof define === 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( ['jquery', 'datatables.net-bs4', 'datatables.net-scroller'], function ( $ ) {
|
||||
return factory( $, window, document );
|
||||
} );
|
||||
}
|
||||
else if ( typeof exports === 'object' ) {
|
||||
// CommonJS
|
||||
module.exports = function (root, $) {
|
||||
if ( ! root ) {
|
||||
root = window;
|
||||
}
|
||||
|
||||
if ( ! $ || ! $.fn.dataTable ) {
|
||||
$ = require('datatables.net-bs4')(root, $).$;
|
||||
}
|
||||
|
||||
if ( ! $.fn.dataTable.Scroller ) {
|
||||
require('datatables.net-scroller')(root, $);
|
||||
}
|
||||
|
||||
return factory( $, root, root.document );
|
||||
};
|
||||
}
|
||||
else {
|
||||
// Browser
|
||||
factory( jQuery, window, document );
|
||||
}
|
||||
}(function( $, window, document, undefined ) {
|
||||
|
||||
return $.fn.dataTable;
|
||||
|
||||
}));
|
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
Bootstrap 4 styling wrapper for Scroller
|
||||
©2018 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-scroller"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);if(!b||!b.fn.dataTable)b=require("datatables.net-bs4")(a,b).$;b.fn.dataTable.Scroller||require("datatables.net-scroller")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c){return c.fn.dataTable});
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"_from": "datatables.net-scroller-bs4",
|
||||
"_id": "datatables.net-scroller-bs4@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-NMZNU36aAfNYmryZz8j5EsO6mnUxoyx+5j8PxSNfyrNhMVFtFmSCRJrWNfmfYN5zpOe3/XgjbXytaD5LdWHszg==",
|
||||
"_location": "/datatables.net-scroller-bs4",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-scroller-bs4",
|
||||
"name": "datatables.net-scroller-bs4",
|
||||
"escapedName": "datatables.net-scroller-bs4",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-scroller-bs4/-/datatables.net-scroller-bs4-2.0.1.tgz",
|
||||
"_shasum": "aa7d33eee1cd26e03c6e5598116292d91874acae",
|
||||
"_spec": "datatables.net-scroller-bs4",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net-bs4": "^1.10.15",
|
||||
"datatables.net-scroller": "2.0.1",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Scroller for DataTables with styling for [Bootstrap 4](http://getbootstrap.com/)",
|
||||
"files": [
|
||||
"css/**/*.css",
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"virtual scrolling",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"Bootstrap 4"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/scroller.bootstrap4.js",
|
||||
"name": "datatables.net-scroller-bs4",
|
||||
"style": "css/scroller.bootstrap4.css",
|
||||
"version": "2.0.1"
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-scroller",
|
||||
"description": "Scroller for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.scroller.js"
|
||||
],
|
||||
"keywords": [
|
||||
"virtual scrolling",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "1.4.2",
|
||||
"_release": "1.4.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.2",
|
||||
"commit": "8626dca4ad6777ed440e8cd9c46703d63a344ecf"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables-Scroller.git",
|
||||
"_target": "^1.4.1",
|
||||
"_originalSource": "datatables.net-scroller"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Scroller for DataTables
|
||||
|
||||
This package contains distribution files for the [Scroller extension](https://datatables.net/extensions/scroller) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for Scroller must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getboostrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
This package contains distribution files for the [Scroller extension](https://datatables.net/extensions/scroller) for [DataTables](https://datatables.net/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for Scroller must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
|
||||
Scroller is a virtual rendering plug-in for DataTables which allows large datasets to be drawn on screen very quickly. Virtual rendering means is that only the visible portion of the table is drawn, while the scrolling container gives the visual impression that the whole table is visible, allowing excellent browser performance.
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net-scroller",
|
||||
"description": "Scroller for DataTables ",
|
||||
"main": [
|
||||
"js/dataTables.scroller.js"
|
||||
],
|
||||
"keywords": [
|
||||
"virtual scrolling",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7",
|
||||
"datatables.net": ">=1.10.9"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,27 +1,28 @@
|
|||
/*!
|
||||
Scroller 1.4.2
|
||||
©2011-2016 SpryMedia Ltd - datatables.net/license
|
||||
Scroller 2.0.1
|
||||
©2011-2019 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(h){return e(h,window,document)}):"object"===typeof exports?module.exports=function(h,j){h||(h=window);if(!j||!j.fn.dataTable)j=require("datatables.net")(h,j).$;return e(j,h,h.document)}:e(jQuery,window,document)})(function(e,h,j,l){var m=e.fn.dataTable,g=function(a,b){this instanceof g?(b===l&&(b={}),this.s={dt:e.fn.dataTable.Api(a).settings()[0],tableTop:0,tableBottom:0,redrawTop:0,redrawBottom:0,autoHeight:!0,
|
||||
viewportRows:0,stateTO:null,drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1},this.s=e.extend(this.s,g.oDefaults,b),this.s.heights.row=this.s.rowHeight,this.dom={force:j.createElement("div"),scroller:null,table:null,loader:null},this.s.dt.oScroller||(this.s.dt.oScroller=this,this._fnConstruct())):alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};e.extend(g.prototype,{fnRowToPixels:function(a,
|
||||
b,c){a=c?this._domain("virtualToPhysical",a*this.s.heights.row):this.s.baseScrollTop+(a-this.s.baseRowTop)*this.s.heights.row;return b||b===l?parseInt(a,10):a},fnPixelsToRow:function(a,b,c){var d=a-this.s.baseScrollTop,a=c?this._domain("physicalToVirtual",a)/this.s.heights.row:d/this.s.heights.row+this.s.baseRowTop;return b||b===l?parseInt(a,10):a},fnScrollToRow:function(a,b){var c=this,d=!1,f=this.fnRowToPixels(a),i=a-(this.s.displayBuffer-1)/2*this.s.viewportRows;0>i&&(i=0);if((f>this.s.redrawBottom||
|
||||
f<this.s.redrawTop)&&this.s.dt._iDisplayStart!==i)d=!0,f=this.fnRowToPixels(a,!1,!0);"undefined"==typeof b||b?(this.s.ani=d,e(this.dom.scroller).animate({scrollTop:f},function(){setTimeout(function(){c.s.ani=!1},25)})):e(this.dom.scroller).scrollTop(f)},fnMeasure:function(a){this.s.autoHeight&&this._fnCalcRowHeight();var b=this.s.heights;b.row&&(b.viewport=e(this.dom.scroller).height(),this.s.viewportRows=parseInt(b.viewport/b.row,10)+1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer);
|
||||
(a===l||a)&&this.s.dt.oInstance.fnDraw(!1)},fnPageInfo:function(){var a=this.dom.scroller.scrollTop,b=this.s.dt.fnRecordsDisplay(),c=Math.ceil(this.fnPixelsToRow(a+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.fnPixelsToRow(a,!1,this.s.ani)),end:b<c?b-1:c-1}},_fnConstruct:function(){var a=this;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width="1px";this.dom.scroller=
|
||||
e("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0];this.dom.scroller.appendChild(this.dom.force);this.dom.scroller.style.position="relative";this.dom.table=e(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";e(this.s.dt.nTableWrapper).addClass("DTS");this.s.loadingIndicator&&(this.dom.loader=e('<div class="dataTables_processing DTS_Loading">'+this.s.dt.oLanguage.sLoadingRecords+"</div>").css("display",
|
||||
"none"),e(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader));this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1);this.fnMeasure(!1);this.s.ingnoreScroll=!0;this.s.stateSaveThrottle=this.s.dt.oApi._fnThrottle(function(){a.s.dt.oApi._fnSaveState(a.s.dt)},500);e(this.dom.scroller).on("scroll.DTS",function(){a._fnScroll.call(a)});e(this.dom.scroller).on("touchstart.DTS",function(){a._fnScroll.call(a)});this.s.dt.aoDrawCallback.push({fn:function(){a.s.dt.bInitialised&&
|
||||
a._fnDrawCallback.call(a)},sName:"Scroller"});e(h).on("resize.DTS",function(){a.fnMeasure(false);a._fnInfo()});var b=!0;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(c,d){if(b&&a.s.dt.oLoadedState){d.iScroller=a.s.dt.oLoadedState.iScroller;d.iScrollerTopRow=a.s.dt.oLoadedState.iScrollerTopRow;b=false}else{d.iScroller=a.dom.scroller.scrollTop;d.iScrollerTopRow=a.s.topRowFloat}},"Scroller_State");this.s.dt.oLoadedState&&(this.s.topRowFloat=this.s.dt.oLoadedState.iScrollerTopRow||
|
||||
0);e(this.s.dt.nTable).one("init.dt",function(){a.fnMeasure()});this.s.dt.aoDestroyCallback.push({sName:"Scroller",fn:function(){e(h).off("resize.DTS");e(a.dom.scroller).off("touchstart.DTS scroll.DTS");e(a.s.dt.nTableWrapper).removeClass("DTS");e("div.DTS_Loading",a.dom.scroller.parentNode).remove();e(a.s.dt.nTable).off("init.dt");a.dom.table.style.position="";a.dom.table.style.top="";a.dom.table.style.left=""}})}else this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller")},
|
||||
_fnScroll:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d;if(!this.s.skip&&!this.s.ingnoreScroll)if(this.s.dt.bFiltered||this.s.dt.bSorted)this.s.lastScrollTop=0;else{this._fnInfo();clearTimeout(this.s.stateTO);this.s.stateTO=setTimeout(function(){a.s.dt.oApi._fnSaveState(a.s.dt)},250);if(c<this.s.redrawTop||c>this.s.redrawBottom){var f=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);Math.abs(c-this.s.lastScrollTop)>b.viewport||this.s.ani?(d=parseInt(this._domain("physicalToVirtual",
|
||||
c)/b.row,10)-f,this.s.topRowFloat=this._domain("physicalToVirtual",c)/b.row):(d=this.fnPixelsToRow(c)-f,this.s.topRowFloat=this.fnPixelsToRow(c,!1));0>=d?d=0:d+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?(d=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,0>d&&(d=0)):0!==d%2&&d++;if(d!=this.s.dt._iDisplayStart&&(this.s.tableTop=e(this.s.dt.nTable).offset().top,this.s.tableBottom=e(this.s.dt.nTable).height()+this.s.tableTop,b=function(){if(a.s.scrollDrawReq===null)a.s.scrollDrawReq=
|
||||
c;a.s.dt._iDisplayStart=d;a.s.dt.oApi._fnDraw(a.s.dt)},this.s.dt.oFeatures.bServerSide?(clearTimeout(this.s.drawTO),this.s.drawTO=setTimeout(b,this.s.serverWait)):b(),this.dom.loader&&!this.s.loaderVisible))this.dom.loader.css("display","block"),this.s.loaderVisible=!0}else this.s.topRowFloat=this._domain("physicalToVirtual",c)/b.row;this.s.lastScrollTop=c;this.s.stateSaveThrottle()}},_domain:function(a,b){var c=this.s.heights,d;if(c.virtual===c.scroll)return b;var e=(c.scroll-c.viewport)/2,i=(c.virtual-
|
||||
c.viewport)/2;d=i/(e*e);if("virtualToPhysical"===a){if(b<i)return Math.pow(b/d,0.5);b=2*i-b;return 0>b?c.scroll:2*e-Math.pow(b/d,0.5)}if("physicalToVirtual"===a){if(b<e)return b*b*d;b=2*e-b;return 0>b?c.virtual:2*i-b*b*d}},_fnDrawCallback:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d=e(this.s.dt.nTable).height(),f=this.s.dt._iDisplayStart,i=this.s.dt._iDisplayLength,g=this.s.dt.fnRecordsDisplay();this.s.skip=!0;this._fnScrollForce();c=0===f?this.s.topRowFloat*b.row:f+i>=g?
|
||||
b.scroll-(g-this.s.topRowFloat)*b.row:this._domain("virtualToPhysical",this.s.topRowFloat*b.row);this.dom.scroller.scrollTop=c;this.s.baseScrollTop=c;this.s.baseRowTop=this.s.topRowFloat;var h=c-(this.s.topRowFloat-f)*b.row;0===f?h=0:f+i>=g&&(h=b.scroll-d);this.dom.table.style.top=h+"px";this.s.tableTop=h;this.s.tableBottom=d+this.s.tableTop;d=(c-this.s.tableTop)*this.s.boundaryScale;this.s.redrawTop=c-d;this.s.redrawBottom=c+d;this.s.skip=!1;this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&
|
||||
"undefined"!=typeof this.s.dt.oLoadedState.iScroller?((c=(this.s.dt.sAjaxSource||a.s.dt.ajax)&&!this.s.dt.oFeatures.bServerSide?!0:!1)&&2==this.s.dt.iDraw||!c&&1==this.s.dt.iDraw)&&setTimeout(function(){e(a.dom.scroller).scrollTop(a.s.dt.oLoadedState.iScroller);a.s.redrawTop=a.s.dt.oLoadedState.iScroller-b.viewport/2;setTimeout(function(){a.s.ingnoreScroll=!1},0)},0):a.s.ingnoreScroll=!1;this.s.dt.oFeatures.bInfo&&setTimeout(function(){a._fnInfo.call(a)},0);this.dom.loader&&this.s.loaderVisible&&
|
||||
(this.dom.loader.css("display","none"),this.s.loaderVisible=!1)},_fnScrollForce:function(){var a=this.s.heights;a.virtual=a.row*this.s.dt.fnRecordsDisplay();a.scroll=a.virtual;1E6<a.scroll&&(a.scroll=1E6);this.dom.force.style.height=a.scroll>this.s.heights.row?a.scroll+"px":this.s.heights.row+"px"},_fnCalcRowHeight:function(){var a=this.s.dt,b=a.nTable,c=b.cloneNode(!1),d=e("<tbody/>").appendTo(c),f=e('<div class="'+a.oClasses.sWrapper+' DTS"><div class="'+a.oClasses.sScrollWrapper+'"><div class="'+
|
||||
a.oClasses.sScrollBody+'"></div></div></div>');for(e("tbody tr:lt(4)",b).clone().appendTo(d);3>e("tr",d).length;)d.append("<tr><td> </td></tr>");e("div."+a.oClasses.sScrollBody,f).append(c);a=this.s.dt.nHolding||b.parentNode;e(a).is(":visible")||(a="body");f.appendTo(a);this.s.heights.row=e("tr",d).eq(1).outerHeight();f.remove()},_fnInfo:function(){if(this.s.dt.oFeatures.bInfo){var a=this.s.dt,b=a.oLanguage,c=this.dom.scroller.scrollTop,d=Math.floor(this.fnPixelsToRow(c,!1,this.s.ani)+1),f=a.fnRecordsTotal(),
|
||||
i=a.fnRecordsDisplay(),c=Math.ceil(this.fnPixelsToRow(c+this.s.heights.viewport,!1,this.s.ani)),c=i<c?i:c,g=a.fnFormatNumber(d),h=a.fnFormatNumber(c),j=a.fnFormatNumber(f),k=a.fnFormatNumber(i),g=0===a.fnRecordsDisplay()&&a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfoEmpty+b.sInfoPostFix:0===a.fnRecordsDisplay()?b.sInfoEmpty+" "+b.sInfoFiltered.replace("_MAX_",j)+b.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfo.replace("_START_",g).replace("_END_",h).replace("_MAX_",j).replace("_TOTAL_",
|
||||
k)+b.sInfoPostFix:b.sInfo.replace("_START_",g).replace("_END_",h).replace("_MAX_",j).replace("_TOTAL_",k)+" "+b.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+b.sInfoPostFix;(b=b.fnInfoCallback)&&(g=b.call(a.oInstance,a,d,c,f,i,g));d=a.aanFeatures.i;if("undefined"!=typeof d){f=0;for(i=d.length;f<i;f++)e(d[f]).html(g)}e(a.nTable).triggerHandler("info.dt")}}});g.defaults={trace:!1,rowHeight:"auto",serverWait:200,displayBuffer:9,boundaryScale:0.5,loadingIndicator:!1};g.oDefaults=
|
||||
g.defaults;g.version="1.4.2";"function"==typeof e.fn.dataTable&&"function"==typeof e.fn.dataTableExt.fnVersionCheck&&e.fn.dataTableExt.fnVersionCheck("1.10.0")?e.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var b=a.oInit;new g(a,b.scroller||b.oScroller||{})},cFeature:"S",sFeature:"Scroller"}):alert("Warning: Scroller requires DataTables 1.10.0 or greater - www.datatables.net/download");e(j).on("preInit.dt.dtscroller",function(a,b){if("dt"===a.namespace){var c=b.oInit.scroller,d=m.defaults.scroller;
|
||||
if(c||d)d=e.extend({},c,d),!1!==c&&new g(b,d)}});e.fn.dataTable.Scroller=g;e.fn.DataTable.Scroller=g;var k=e.fn.dataTable.Api;k.register("scroller()",function(){return this});k.register("scroller().rowToPixels()",function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.fnRowToPixels(a,b,c)});k.register("scroller().pixelsToRow()",function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.fnPixelsToRow(a,b,c)});k.register("scroller().scrollToRow()",
|
||||
function(a,b){this.iterator("table",function(c){c.oScroller&&c.oScroller.fnScrollToRow(a,b)});return this});k.register("row().scrollTo()",function(a){var b=this;this.iterator("row",function(c,d){if(c.oScroller){var e=b.rows({order:"applied",search:"applied"}).indexes().indexOf(d);c.oScroller.fnScrollToRow(e,a)}});return this});k.register("scroller.measure()",function(a){this.iterator("table",function(b){b.oScroller&&b.oScroller.fnMeasure(a)});return this});k.register("scroller.page()",function(){var a=
|
||||
this.context;if(a.length&&a[0].oScroller)return a[0].oScroller.fnPageInfo()});return g});
|
||||
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(h){return e(h,window,document)}):"object"===typeof exports?module.exports=function(h,i){h||(h=window);if(!i||!i.fn.dataTable)i=require("datatables.net")(h,i).$;return e(i,h,h.document)}:e(jQuery,window,document)})(function(e,h,i,l){var m=e.fn.dataTable,g=function(a,b){if(this instanceof g){b===l&&(b={});var c=e.fn.dataTable.Api(a);this.s={dt:c.settings()[0],dtApi:c,tableTop:0,tableBottom:0,redrawTop:0,
|
||||
redrawBottom:0,autoHeight:!0,viewportRows:0,stateTO:null,drawTO:null,heights:{jump:null,page:null,virtual:null,scroll:null,row:null,viewport:null,labelFactor:1},topRowFloat:0,scrollDrawDiff:null,loaderVisible:!1,forceReposition:!1,baseRowTop:0,baseScrollTop:0,mousedown:!1,lastScrollTop:0};this.s=e.extend(this.s,g.oDefaults,b);this.s.heights.row=this.s.rowHeight;this.dom={force:i.createElement("div"),label:e('<div class="dts_label">0</div>'),scroller:null,table:null,loader:null};this.s.dt.oScroller||
|
||||
(this.s.dt.oScroller=this,this.construct())}else alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")};e.extend(g.prototype,{measure:function(a){this.s.autoHeight&&this._calcRowHeight();var b=this.s.heights;b.row&&(b.viewport=e.contains(i,this.dom.scroller)?this.dom.scroller.clientHeight:this._parseHeight(e(this.dom.scroller).css("height")),b.viewport||(b.viewport=this._parseHeight(e(this.dom.scroller).css("max-height"))),this.s.viewportRows=parseInt(b.viewport/b.row,10)+
|
||||
1,this.s.dt._iDisplayLength=this.s.viewportRows*this.s.displayBuffer);var c=this.dom.label.outerHeight();b.labelFactor=(b.viewport-c)/b.scroll;(a===l||a)&&this.s.dt.oInstance.fnDraw(!1)},pageInfo:function(){var a=this.dom.scroller.scrollTop,b=this.s.dt.fnRecordsDisplay(),c=Math.ceil(this.pixelsToRow(a+this.s.heights.viewport,!1,this.s.ani));return{start:Math.floor(this.pixelsToRow(a,!1,this.s.ani)),end:b<c?b-1:c-1}},pixelsToRow:function(a,b,c){a-=this.s.baseScrollTop;c=c?(this._domain("physicalToVirtual",
|
||||
this.s.baseScrollTop)+a)/this.s.heights.row:a/this.s.heights.row+this.s.baseRowTop;return b||b===l?parseInt(c,10):c},rowToPixels:function(a,b,c){a-=this.s.baseRowTop;c=c?this._domain("virtualToPhysical",this.s.baseScrollTop):this.s.baseScrollTop;c+=a*this.s.heights.row;return b||b===l?parseInt(c,10):c},scrollToRow:function(a,b){var c=this,d=!1,f=this.rowToPixels(a),k=a-(this.s.displayBuffer-1)/2*this.s.viewportRows;0>k&&(k=0);if((f>this.s.redrawBottom||f<this.s.redrawTop)&&this.s.dt._iDisplayStart!==
|
||||
k)d=!0,f=this._domain("virtualToPhysical",a*this.s.heights.row),this.s.redrawTop<f&&f<this.s.redrawBottom&&(this.s.forceReposition=!0,b=!1);b===l||b?(this.s.ani=d,e(this.dom.scroller).animate({scrollTop:f},function(){setTimeout(function(){c.s.ani=!1},250)})):e(this.dom.scroller).scrollTop(f)},construct:function(){var a=this,b=this.s.dtApi;if(this.s.dt.oFeatures.bPaginate){this.dom.force.style.position="relative";this.dom.force.style.top="0px";this.dom.force.style.left="0px";this.dom.force.style.width=
|
||||
"1px";this.dom.scroller=e("div."+this.s.dt.oClasses.sScrollBody,this.s.dt.nTableWrapper)[0];this.dom.scroller.appendChild(this.dom.force);this.dom.scroller.style.position="relative";this.dom.table=e(">table",this.dom.scroller)[0];this.dom.table.style.position="absolute";this.dom.table.style.top="0px";this.dom.table.style.left="0px";e(b.table().container()).addClass("dts DTS");this.s.loadingIndicator&&(this.dom.loader=e('<div class="dataTables_processing dts_loading">'+this.s.dt.oLanguage.sLoadingRecords+
|
||||
"</div>").css("display","none"),e(this.dom.scroller.parentNode).css("position","relative").append(this.dom.loader));this.dom.label.appendTo(this.dom.scroller);this.s.heights.row&&"auto"!=this.s.heights.row&&(this.s.autoHeight=!1);this.measure(!1);this.s.ingnoreScroll=!0;this.s.stateSaveThrottle=this.s.dt.oApi._fnThrottle(function(){a.s.dtApi.state.save()},500);e(this.dom.scroller).on("scroll.dt-scroller",function(){a._scroll.call(a)});e(this.dom.scroller).on("touchstart.dt-scroller",function(){a._scroll.call(a)});
|
||||
e(this.dom.scroller).on("mousedown.dt-scroller",function(){a.s.mousedown=true}).on("mouseup.dt-scroller",function(){a.s.mouseup=false;a.dom.label.css("display","none")});e(h).on("resize.dt-scroller",function(){a.measure(false);a._info()});var c=!0,d=b.state.loaded();b.on("stateSaveParams.scroller",function(b,e,h){h.scroller={topRow:c&&d&&d.scroller?d.scroller.topRow:a.s.topRowFloat,baseScrollTop:a.s.baseScrollTop,baseRowTop:a.s.baseRowTop};c=false});d&&d.scroller&&(this.s.topRowFloat=d.scroller.topRow,
|
||||
this.s.baseScrollTop=d.scroller.baseScrollTop,this.s.baseRowTop=d.scroller.baseRowTop);b.on("init.scroller",function(){a.measure(false);a.s.scrollType="jump";a._draw();b.on("draw.scroller",function(){a._draw()})});b.on("preDraw.dt.scroller",function(){a._scrollForce()});b.on("destroy.scroller",function(){e(h).off("resize.dt-scroller");e(a.dom.scroller).off(".dt-scroller");e(a.s.dt.nTable).off(".scroller");e(a.s.dt.nTableWrapper).removeClass("DTS");e("div.DTS_Loading",a.dom.scroller.parentNode).remove();
|
||||
a.dom.table.style.position="";a.dom.table.style.top="";a.dom.table.style.left=""})}else this.s.dt.oApi._fnLog(this.s.dt,0,"Pagination must be enabled for Scroller")},_calcRowHeight:function(){var a=this.s.dt,b=a.nTable,c=b.cloneNode(!1),d=e("<tbody/>").appendTo(c),f=e('<div class="'+a.oClasses.sWrapper+' DTS"><div class="'+a.oClasses.sScrollWrapper+'"><div class="'+a.oClasses.sScrollBody+'"></div></div></div>');e("tbody tr:lt(4)",b).clone().appendTo(d);var k=e("tr",d).length;if(1===k)d.prepend("<tr><td> </td></tr>"),
|
||||
d.append("<tr><td> </td></tr>");else for(;3>k;k++)d.append("<tr><td> </td></tr>");e("div."+a.oClasses.sScrollBody,f).append(c);a=this.s.dt.nHolding||b.parentNode;e(a).is(":visible")||(a="body");f.appendTo(a);this.s.heights.row=e("tr",d).eq(1).outerHeight();f.remove()},_draw:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d=e(this.s.dt.nTable).height(),f=this.s.dt._iDisplayStart,k=this.s.dt._iDisplayLength,h=this.s.dt.fnRecordsDisplay();this.s.skip=!0;if((this.s.dt.bSorted||
|
||||
this.s.dt.bFiltered)&&0===f&&!this.s.dt._drawHold)this.s.topRowFloat=0;c="jump"===this.s.scrollType?this._domain("virtualToPhysical",this.s.topRowFloat*b.row):c;this.s.baseScrollTop=c;this.s.baseRowTop=this.s.topRowFloat;var g=c-(this.s.topRowFloat-f)*b.row;0===f?g=0:f+k>=h&&(g=b.scroll-d);this.dom.table.style.top=g+"px";this.s.tableTop=g;this.s.tableBottom=d+this.s.tableTop;d=(c-this.s.tableTop)*this.s.boundaryScale;this.s.redrawTop=c-d;this.s.redrawBottom=c+d>b.scroll-b.viewport-b.row?b.scroll-
|
||||
b.viewport-b.row:c+d;this.s.skip=!1;this.s.dt.oFeatures.bStateSave&&null!==this.s.dt.oLoadedState&&"undefined"!=typeof this.s.dt.oLoadedState.iScroller?((c=(this.s.dt.sAjaxSource||a.s.dt.ajax)&&!this.s.dt.oFeatures.bServerSide?!0:!1)&&2==this.s.dt.iDraw||!c&&1==this.s.dt.iDraw)&&setTimeout(function(){e(a.dom.scroller).scrollTop(a.s.dt.oLoadedState.iScroller);a.s.redrawTop=a.s.dt.oLoadedState.iScroller-b.viewport/2;setTimeout(function(){a.s.ingnoreScroll=!1},0)},0):a.s.ingnoreScroll=!1;this.s.dt.oFeatures.bInfo&&
|
||||
setTimeout(function(){a._info.call(a)},0);this.dom.loader&&this.s.loaderVisible&&(this.dom.loader.css("display","none"),this.s.loaderVisible=!1)},_domain:function(a,b){var c=this.s.heights,d;if(c.virtual===c.scroll||1E4>b)return b;if("virtualToPhysical"===a&&b>=c.virtual-1E4)return d=c.virtual-b,c.scroll-d;if("physicalToVirtual"===a&&b>=c.scroll-1E4)return d=c.scroll-b,c.virtual-d;c=(c.virtual-1E4-1E4)/(c.scroll-1E4-1E4);d=1E4-1E4*c;return"virtualToPhysical"===a?(b-d)/c:c*b+d},_info:function(){if(this.s.dt.oFeatures.bInfo){var a=
|
||||
this.s.dt,b=a.oLanguage,c=this.dom.scroller.scrollTop,d=Math.floor(this.pixelsToRow(c,!1,this.s.ani)+1),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),c=Math.ceil(this.pixelsToRow(c+this.s.heights.viewport,!1,this.s.ani)),c=g<c?g:c,h=a.fnFormatNumber(d),i=a.fnFormatNumber(c),j=a.fnFormatNumber(f),l=a.fnFormatNumber(g),h=0===a.fnRecordsDisplay()&&a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfoEmpty+b.sInfoPostFix:0===a.fnRecordsDisplay()?b.sInfoEmpty+" "+b.sInfoFiltered.replace("_MAX_",j)+b.sInfoPostFix:
|
||||
a.fnRecordsDisplay()==a.fnRecordsTotal()?b.sInfo.replace("_START_",h).replace("_END_",i).replace("_MAX_",j).replace("_TOTAL_",l)+b.sInfoPostFix:b.sInfo.replace("_START_",h).replace("_END_",i).replace("_MAX_",j).replace("_TOTAL_",l)+" "+b.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+b.sInfoPostFix;(b=b.fnInfoCallback)&&(h=b.call(a.oInstance,a,d,c,f,g,h));d=a.aanFeatures.i;if("undefined"!=typeof d){f=0;for(g=d.length;f<g;f++)e(d[f]).html(h)}e(a.nTable).triggerHandler("info.dt")}},
|
||||
_parseHeight:function(a){var b,c=/^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(px|em|rem|vh)$/.exec(a);if(null===c)return 0;a=parseFloat(c[1]);c=c[2];"px"===c?b=a:"vh"===c?b=a/100*e(h).height():"rem"===c?b=a*parseFloat(e(":root").css("font-size")):"em"===c&&(b=a*parseFloat(e("body").css("font-size")));return b?b:0},_scroll:function(){var a=this,b=this.s.heights,c=this.dom.scroller.scrollTop,d;if(!this.s.skip&&!this.s.ingnoreScroll&&c!==this.s.lastScrollTop)if(this.s.dt.bFiltered||this.s.dt.bSorted)this.s.lastScrollTop=
|
||||
0;else{this._info();clearTimeout(this.s.stateTO);this.s.stateTO=setTimeout(function(){a.s.dtApi.state.save()},250);this.s.scrollType=Math.abs(c-this.s.lastScrollTop)>b.viewport?"jump":"cont";this.s.topRowFloat="cont"===this.s.scrollType?this.pixelsToRow(c,!1,!1):this._domain("physicalToVirtual",c)/b.row;0>this.s.topRowFloat&&(this.s.topRowFloat=0);if(this.s.forceReposition||c<this.s.redrawTop||c>this.s.redrawBottom){var f=Math.ceil((this.s.displayBuffer-1)/2*this.s.viewportRows);d=parseInt(this.s.topRowFloat,
|
||||
10)-f;this.s.forceReposition=!1;0>=d?d=0:d+this.s.dt._iDisplayLength>this.s.dt.fnRecordsDisplay()?(d=this.s.dt.fnRecordsDisplay()-this.s.dt._iDisplayLength,0>d&&(d=0)):0!==d%2&&d++;if(d!=this.s.dt._iDisplayStart&&(this.s.tableTop=e(this.s.dt.nTable).offset().top,this.s.tableBottom=e(this.s.dt.nTable).height()+this.s.tableTop,f=function(){if(a.s.scrollDrawReq===null)a.s.scrollDrawReq=c;a.s.dt._iDisplayStart=d;a.s.dt.oApi._fnDraw(a.s.dt)},this.s.dt.oFeatures.bServerSide?(clearTimeout(this.s.drawTO),
|
||||
this.s.drawTO=setTimeout(f,this.s.serverWait)):f(),this.dom.loader&&!this.s.loaderVisible))this.dom.loader.css("display","block"),this.s.loaderVisible=!0}else this.s.topRowFloat=this.pixelsToRow(c,!1,!0);this.s.lastScrollTop=c;this.s.stateSaveThrottle();"jump"===this.s.scrollType&&this.s.mousedown&&this.dom.label.html(this.s.dt.fnFormatNumber(parseInt(this.s.topRowFloat,10)+1)).css("top",c+c*b.labelFactor).css("display","block")}},_scrollForce:function(){var a=this.s.heights;a.virtual=a.row*this.s.dt.fnRecordsDisplay();
|
||||
a.scroll=a.virtual;1E6<a.scroll&&(a.scroll=1E6);this.dom.force.style.height=a.scroll>this.s.heights.row?a.scroll+"px":this.s.heights.row+"px"}});g.defaults={boundaryScale:0.5,displayBuffer:9,loadingIndicator:!1,rowHeight:"auto",serverWait:200};g.oDefaults=g.defaults;g.version="2.0.1";e(i).on("preInit.dt.dtscroller",function(a,b){if("dt"===a.namespace){var c=b.oInit.scroller,d=m.defaults.scroller;if(c||d)d=e.extend({},c,d),!1!==c&&new g(b,d)}});e.fn.dataTable.Scroller=g;e.fn.DataTable.Scroller=g;var j=
|
||||
e.fn.dataTable.Api;j.register("scroller()",function(){return this});j.register("scroller().rowToPixels()",function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.rowToPixels(a,b,c)});j.register("scroller().pixelsToRow()",function(a,b,c){var d=this.context;if(d.length&&d[0].oScroller)return d[0].oScroller.pixelsToRow(a,b,c)});j.register(["scroller().scrollToRow()","scroller.toPosition()"],function(a,b){this.iterator("table",function(c){c.oScroller&&c.oScroller.scrollToRow(a,
|
||||
b)});return this});j.register("row().scrollTo()",function(a){var b=this;this.iterator("row",function(c,d){if(c.oScroller){var e=b.rows({order:"applied",search:"applied"}).indexes().indexOf(d);c.oScroller.scrollToRow(e,a)}});return this});j.register("scroller.measure()",function(a){this.iterator("table",function(b){b.oScroller&&b.oScroller.measure(a)});return this});j.register("scroller.page()",function(){var a=this.context;if(a.length&&a[0].oScroller)return a[0].oScroller.pageInfo()});return g});
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"_from": "datatables.net-scroller@2.0.1",
|
||||
"_id": "datatables.net-scroller@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-FnbJXT1Zu8FVK+wXcMuEVyFJkLXDi65i+jPCSVH2ZkNSPp+mfeBVtZH41MLGspNouP/IdudKIoCXzPNR/+OhpQ==",
|
||||
"_location": "/datatables.net-scroller",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "datatables.net-scroller@2.0.1",
|
||||
"name": "datatables.net-scroller",
|
||||
"escapedName": "datatables.net-scroller",
|
||||
"rawSpec": "2.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/datatables.net-scroller-bs4"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/datatables.net-scroller/-/datatables.net-scroller-2.0.1.tgz",
|
||||
"_shasum": "17040d3f1da9b4e174729b6b7f0e36b6bf818adc",
|
||||
"_spec": "datatables.net-scroller@2.0.1",
|
||||
"_where": "C:\\Users\\William\\Documents\\proyectos\\gentelella\\node_modules\\datatables.net-scroller-bs4",
|
||||
"author": {
|
||||
"name": "SpryMedia Ltd",
|
||||
"url": "http://datatables.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://datatables.net/forums"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"datatables.net": "^1.10.15",
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Scroller for DataTables ",
|
||||
"files": [
|
||||
"js/**/*.js"
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"keywords": [
|
||||
"virtual scrolling",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "js/dataTables.scroller.js",
|
||||
"name": "datatables.net-scroller",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/DataTables/Dist-DataTables-Scroller.git"
|
||||
},
|
||||
"version": "2.0.1"
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net",
|
||||
"description": "DataTables for jQuery ",
|
||||
"main": [
|
||||
"js/jquery.dataTables.js"
|
||||
],
|
||||
"keywords": [
|
||||
"filter",
|
||||
"sort",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT",
|
||||
"version": "1.10.12",
|
||||
"_release": "1.10.12",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.10.12",
|
||||
"commit": "f938fceb3fbb5b63a0a4c8bde3755dbc61722c2f"
|
||||
},
|
||||
"_source": "https://github.com/DataTables/Dist-DataTables.git",
|
||||
"_target": "^1.10.11",
|
||||
"_originalSource": "datatables.net"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# DataTables for jQuery
|
||||
|
||||
This package contains distribution files for the [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for DataTables must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getboostrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
This package contains distribution files for the [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for DataTables must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/).
|
||||
|
||||
DataTables is a table enhancing library which adds features such as paging, ordering, search, scrolling and many more to a static HTML page. A comprehensive API is also available that can be used to manipulate the table. Please refer to the [DataTables web-site](//datatables.net) for a full range of documentation and examples.
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"name": "datatables.net",
|
||||
"description": "DataTables for jQuery ",
|
||||
"main": [
|
||||
"js/jquery.dataTables.js"
|
||||
],
|
||||
"keywords": [
|
||||
"filter",
|
||||
"sort",
|
||||
"DataTables",
|
||||
"jQuery",
|
||||
"table",
|
||||
"DataTables"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7"
|
||||
},
|
||||
"moduleType": [
|
||||
"globals",
|
||||
"amd",
|
||||
"node"
|
||||
],
|
||||
"ignore": [
|
||||
"composer.json",
|
||||
"datatables.json",
|
||||
"package.json"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "SpryMedia Ltd",
|
||||
"homepage": "https://datatables.net"
|
||||
}
|
||||
],
|
||||
"homepage": "https://datatables.net",
|
||||
"license": "MIT"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue