Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
v3.3.1 – reimplement squashed IE fix & change default mime for csv to…
Browse files Browse the repository at this point in the history
… "text/csv"
  • Loading branch information
clarketm committed Nov 21, 2016
1 parent 451d163 commit 6377211
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 21 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ In order to provide **Office Open XML SpreadsheetML Format ( .xlsx )** support,
<script src="tableexport.js"></script>
```

To support older browsers ( **Firefox** < 20, **Opera** < 15 ) or **Safari** also include [Blob.js](https://github.com/clarketm/Blob.js/) before the [FileSaver.js](https://github.com/eligrey/FileSaver.js/) script.
To support older browsers ( **Chrome** < 20, **Firefox** < 13, **Opera** < 12.10, **IE** < 10, __Safari *__ < 6 ) also include the [Blob.js](https://github.com/clarketm/Blob.js/) polyfill before the [FileSaver.js](https://github.com/eligrey/FileSaver.js/) script.
> \* until [Safari](https://github.com/eligrey/FileSaver.js/issues/242) provides native support for either the [HTML5 download attribute](http://caniuse.com/#feat=download) or [service workers](http://caniuse.com/#search=service%20workers), limited `xlx` and `xlsx` support is provided by including the [Blob.js](https://github.com/clarketm/Blob.js/) polyfill, albeit the **filename** will always be labeled `unknown`.
```html
<script src="xlsx-core.js"></script>
Expand Down Expand Up @@ -204,14 +205,14 @@ $.fn.tableExport.rowDel = "\r\n";

### Browser Support

| | Chrome | Firefox | IE * | Opera | Safari * |
| | Chrome | Firefox | IE | Opera | Safari * |
| :------: | :------: | :-------: | :---: | :-----: | :------: |
| __Android__ | &#10003; | &#10003; | - | &#10003; | - |
| __iOS__ | &#10003; | - | - | - | &#10003; |
| **Mac OSX**| &#10003; | &#10003; | - | &#10003; | &#10003; |
| **Windows** | &#10003; | &#10003; | &#10003; | &#10003; | &#10003; |

*only _partial_ support: requires third-party dependency ([Blob.js](https://github.com/clarketm/Blob.js/))
*only _partial_ support for `xls` and `xlsx`: requires third-party dependency ([Blob.js](https://github.com/clarketm/Blob.js/))

### Live Demo
A live, interactive demo can be found **[here](https://www.travismclarke.com/tableexport/#live-demo)**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport.js",
"version": "3.3.0",
"version": "3.3.1",
"authors": [
"clarketm <travis.m.clarke@gmail.com>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js 3.3.0 (https://www.travismclarke.com)
* TableExport.js 3.3.1 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js 3.3.0 (https://www.travismclarke.com)
* TableExport.js 3.3.1 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -341,7 +341,7 @@
defaultClass: "csv",
buttonContent: "Export to csv",
separator: ",",
mimeType: "application/csv",
mimeType: "text/csv",
fileExtension: ".csv"
},
/**
Expand Down Expand Up @@ -442,7 +442,7 @@
* @param extension {String} file extension
*/
export2file: function (data, mime, name, extension) {
if (XLSX && extension.startsWith(".xls")) {
if (XLSX && extension.substr(0, 4) ==(".xls")) {
var wb = new this.Workbook(),
ws = this.createSheet(data);

Expand All @@ -455,7 +455,7 @@
}
saveAs(new Blob([data],
{type: mime + ";" + this.charset}),
name + extension);
name + extension, true);
},
/**
* Updates the plugin instance with new/updated options
Expand Down
4 changes: 2 additions & 2 deletions dist/js/tableexport.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport",
"version": "3.3.0",
"version": "3.3.1",
"authors": [
"clarketm <travis.m.clarke@gmail.com>"
],
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js 3.3.0 (https://www.travismclarke.com)
* TableExport.js 3.3.1 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
Loading

0 comments on commit 6377211

Please sign in to comment.