This repository has been archived by the owner on Jul 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
2,417 additions
and
710 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "tableexport.js", | ||
"version": "4.0.0-alpha.5", | ||
"version": "4.0.0-rc.1", | ||
"authors": [ | ||
"clarketm <[email protected]>" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
<link href="../assets/css/Bootstrap/bootstrap.min.css" rel="stylesheet"> | ||
<link href="../assets/css/Bootstrap/bootstrap-theme.min.css" rel="stylesheet"> | ||
<link href="../src/stable/css/tableexport.min.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
|
||
<iframe src="./default.html" frameborder="0" width="100%" scrolling="no" onload="this.height=screen.height/3;"></iframe> | ||
|
||
<div class="container-fluid"> | ||
<h1>Bootstrap | ||
<small><code>bootstrap: true</code></small> | ||
</h1> | ||
<div class="table-responsive"> | ||
<table id="bootstrap-table" class="table table-bordered"> | ||
<thead> | ||
<tr> | ||
<td>Name</td> | ||
<td>Position</td> | ||
<td>Age</td> | ||
<td>Salary</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Thor Walton</td> | ||
<td>Regional Director</td> | ||
<td>45</td> | ||
<td>$98,540</td> | ||
</tr> | ||
<tr> | ||
<td>Travis Clarke</td> | ||
<td>Software Engineer</td> | ||
<td>30</td> | ||
<td>$275,000</td> | ||
</tr> | ||
<tr> | ||
<td>Suki Burks</td> | ||
<td>Office Manager</td> | ||
<td>22</td> | ||
<td>$67,670</td> | ||
</tr> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<td class="disabled"></td> | ||
<td class="disabled"></td> | ||
<td class="disabled"></td> | ||
<th>$441,210</th> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript" src="../bower_components/jquery/dist/jquery.min.js"></script> | ||
<script type="text/javascript" src="../bower_components/xlsx-js/xlsx.core.min.js"></script> | ||
<script type="text/javascript" src="../bower_components/blobjs/Blob.min.js"></script> | ||
<script type="text/javascript" src="../bower_components/file-saverjs/FileSaver.min.js"></script> | ||
<script type="text/javascript" src="../src/stable/js/tableexport.min.js"></script> | ||
<script> | ||
|
||
// Bootstrap configuration classes ["base", "theme", "container"]. | ||
TableExport.prototype.bootstrap = ["btn", "btn-default", "btn-toolbar"]; | ||
// **** jQuery ************************** | ||
// $.fn.tableExport.bootstrap = ["btn", "btn-link", "btn-toolbar"]; | ||
// ************************************** | ||
|
||
var BootstrapTable = document.getElementById('bootstrap-table'); | ||
new TableExport(BootstrapTable, { | ||
bootstrap: true | ||
}); | ||
// **** jQuery ************************** | ||
// $(BootstrapTable).tableExport({ | ||
// bootstrap: true | ||
// }); | ||
// ************************************** | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Defaults</title> | ||
<link href="../src/stable/css/tableexport.min.css" rel="stylesheet"> | ||
<link href="./examples.css" rel="stylesheet"> | ||
</head> | ||
<body id="default"> | ||
|
||
<h1>Defaults</h1> | ||
|
||
<main> | ||
<article> | ||
<pre> | ||
headers: true, | ||
footers: true, | ||
formats: ['xls', 'csv', 'txt'], | ||
filename: 'id', | ||
bootstrap: false, | ||
position: 'bottom', | ||
ignoreRows: null, | ||
ignoreCols: null, | ||
trimWhitespace: true | ||
</pre> | ||
</article> | ||
|
||
<article> | ||
<table id="default-table" width="50%"> | ||
<thead> | ||
<tr> | ||
<th> | ||
|
||
Name | ||
|
||
</th> | ||
<th>Position</th> | ||
<th>Age</th> | ||
<th>Salary</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Thor Walton</td> | ||
<td>Regional Director</td> | ||
<td>45</td> | ||
<td>$98,540</td> | ||
</tr> | ||
<tr> | ||
<td>Travis Clarke</td> | ||
<td>Software Engineer</td> | ||
<td>30</td> | ||
<td>$275,000</td> | ||
</tr> | ||
<tr> | ||
<td>Suki Burks</td> | ||
<td>Office Manager</td> | ||
<td>22</td> | ||
<td>$67,670</td> | ||
</tr> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<td class="disabled"></td> | ||
<td class="disabled"></td> | ||
<td class="disabled"></td> | ||
<th>$441,210</th> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</article> | ||
</main> | ||
|
||
<hr> | ||
|
||
<script type="text/javascript" src="../bower_components/xlsx-js/xlsx.core.min.js"></script> | ||
<script type="text/javascript" src="../bower_components/blobjs/Blob.min.js"></script> | ||
<script type="text/javascript" src="../bower_components/file-saverjs/FileSaver.min.js"></script> | ||
<script type="text/javascript" src="../src/stable/js/tableexport.js"></script> | ||
<script> | ||
|
||
var DefaultTable = document.getElementById('default-table'); | ||
new TableExport(DefaultTable, { | ||
headers: true, // (Boolean), display table headers (th or td elements) in the <thead>, (default: true) | ||
footers: true, // (Boolean), display table footers (th or td elements) in the <tfoot>, (default: false) | ||
formats: ['xls', 'csv', 'txt'], // (String[]), filetype(s) for the export, (default: ['xls', 'csv', 'txt']) | ||
filename: 'id', // (id, String), filename for the downloaded file, (default: 'id') | ||
bootstrap: false, // (Boolean), style buttons using bootstrap, (default: false) | ||
position: 'bottom', // (top, bottom), position of the caption element relative to table, (default: 'bottom') | ||
ignoreRows: null, // (Number, Number[]), row indices to exclude from the exported file(s) (default: null) | ||
ignoreCols: null, // (Number, Number[]), column indices to exclude from the exported file(s) (default: null) | ||
ignoreCSS: '.tableexport-ignore', // (selector, selector[]), selector(s) to exclude cells from the exported file(s) (default: '.tableexport-ignore') | ||
emptyCSS: '.tableexport-empty', // (selector, selector[]), selector(s) to replace cells with an empty string in the exported file(s) (default: '.tableexport-empty') | ||
trimWhitespace: true // (Boolean), remove all leading/trailing newlines, spaces, and tabs from cell text in the exported file(s) (default: true) | ||
}); | ||
// **** jQuery ************************** | ||
// $(DefaultTable).tableExport({ | ||
// headers: true, | ||
// footers: true, | ||
// formats: ['xls', 'csv', 'txt'], | ||
// filename: 'id', | ||
// bootstrap: true, | ||
// position: 'bottom', | ||
// ignoreRows: null, | ||
// ignoreCols: null, | ||
// ignoreCSS: '.tableexport-ignore', | ||
// emptyCSS: '.tableexport-empty', | ||
// trimWhitespace: false | ||
// }); | ||
// ************************************** | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
body { | ||
margin-right: auto; | ||
margin-left: auto; | ||
padding-left: 15px; | ||
padding-right: 15px; | ||
} | ||
table, | ||
th, | ||
td { | ||
border: 1px solid black; | ||
} | ||
table { | ||
width: 50%; | ||
} | ||
#default table { | ||
width: 100%; | ||
} | ||
#default article { | ||
width: 45%; | ||
display: inline-block; | ||
} | ||
hr { | ||
margin-top: 22px; | ||
border: 0; | ||
border-top: 4px solid #eee; | ||
} | ||
h1 { | ||
font-size: 35px; | ||
font-family: Helvetica Neue, serif; | ||
font-weight: 500; | ||
line-height: 1.1; | ||
color: inherit; | ||
margin-top: 22px; | ||
margin-bottom: 11px; | ||
} | ||
code { | ||
font-family: Consolas, Menlo, Monaco, "Courier New", monospace; | ||
padding: 2px 4px; | ||
font-size: 80%; | ||
color: #c7254e; | ||
background-color: #f9f2f4; | ||
border-radius: 4px; | ||
} | ||
.small { | ||
font-size: 50%; | ||
} | ||
.info { | ||
background: rgba(85, 102, 156, 0.2); | ||
padding: 10px; | ||
border: 2px solid rgba(85, 102, 156, 0.8); | ||
width: 50%; | ||
line-height: 1.4; | ||
} | ||
.half { | ||
width: 50%; | ||
} | ||
.info.code { | ||
font-size: 80%; | ||
} | ||
.target { | ||
background: yellow; | ||
font-weight: bold; | ||
} | ||
.top { | ||
background: yellow; | ||
font-weight: bold; | ||
} | ||
#formats .bottom { | ||
background: yellow; | ||
font-weight: bold; | ||
} | ||
span.target { | ||
display: inline-block; | ||
padding: 0 4px; | ||
border-radius: 4px; | ||
} | ||
.disabled { | ||
background: rgba(146, 146, 146, 0.2); | ||
} | ||
.note { | ||
color: #b4b7b7; | ||
font-size: 90%; | ||
} | ||
span.note { | ||
font-size: 40%; | ||
} | ||
.ignore, | ||
.tableexport-ignore { | ||
background: lightsalmon; | ||
font-weight: bold; | ||
} | ||
.empty, | ||
.tableexport-empty { | ||
background: lightgreen; | ||
font-weight: bold; | ||
} | ||
#customXLSButton { | ||
background: lightgreen; | ||
font-size: 200%; | ||
} |
Oops, something went wrong.