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

Commit 6377211

Browse files
committed
v3.3.1 – reimplement squashed IE fix & change default mime for csv to "text/csv"
1 parent 451d163 commit 6377211

File tree

11 files changed

+22
-21
lines changed

11 files changed

+22
-21
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ In order to provide **Office Open XML SpreadsheetML Format ( .xlsx )** support,
5656
<script src="tableexport.js"></script>
5757
```
5858

59-
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.
59+
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.
60+
> \* 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`.
6061
6162
```html
6263
<script src="xlsx-core.js"></script>
@@ -204,14 +205,14 @@ $.fn.tableExport.rowDel = "\r\n";
204205

205206
### Browser Support
206207

207-
| | Chrome | Firefox | IE * | Opera | Safari * |
208+
| | Chrome | Firefox | IE | Opera | Safari * |
208209
| :------: | :------: | :-------: | :---: | :-----: | :------: |
209210
| __Android__ | &#10003; | &#10003; | - | &#10003; | - |
210211
| __iOS__ | &#10003; | - | - | - | &#10003; |
211212
| **Mac OSX**| &#10003; | &#10003; | - | &#10003; | &#10003; |
212213
| **Windows** | &#10003; | &#10003; | &#10003; | &#10003; | &#10003; |
213214

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

216217
### Live Demo
217218
A live, interactive demo can be found **[here](https://www.travismclarke.com/tableexport/#live-demo)**

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tableexport.js",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"authors": [
55
"clarketm <travis.m.clarke@gmail.com>"
66
],

dist/css/tableexport.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* TableExport.js 3.3.0 (https://www.travismclarke.com)
2+
* TableExport.js 3.3.1 (https://www.travismclarke.com)
33
* Copyright 2016 Travis Clarke
44
* Licensed under the MIT license
55
*/

dist/css/tableexport.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tableexport.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* TableExport.js 3.3.0 (https://www.travismclarke.com)
2+
* TableExport.js 3.3.1 (https://www.travismclarke.com)
33
* Copyright 2016 Travis Clarke
44
* Licensed under the MIT license
55
*/
@@ -341,7 +341,7 @@
341341
defaultClass: "csv",
342342
buttonContent: "Export to csv",
343343
separator: ",",
344-
mimeType: "application/csv",
344+
mimeType: "text/csv",
345345
fileExtension: ".csv"
346346
},
347347
/**
@@ -442,7 +442,7 @@
442442
* @param extension {String} file extension
443443
*/
444444
export2file: function (data, mime, name, extension) {
445-
if (XLSX && extension.startsWith(".xls")) {
445+
if (XLSX && extension.substr(0, 4) ==(".xls")) {
446446
var wb = new this.Workbook(),
447447
ws = this.createSheet(data);
448448

@@ -455,7 +455,7 @@
455455
}
456456
saveAs(new Blob([data],
457457
{type: mime + ";" + this.charset}),
458-
name + extension);
458+
name + extension, true);
459459
},
460460
/**
461461
* Updates the plugin instance with new/updated options

dist/js/tableexport.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tableexport",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"authors": [
55
"clarketm <travis.m.clarke@gmail.com>"
66
],

src/stable/css/tableexport.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* TableExport.js 3.3.0 (https://www.travismclarke.com)
2+
* TableExport.js 3.3.1 (https://www.travismclarke.com)
33
* Copyright 2016 Travis Clarke
44
* Licensed under the MIT license
55
*/

0 commit comments

Comments
 (0)