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

Commit

Permalink
updated version #
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Mar 6, 2016
1 parent fdb3a4d commit 0e72b74
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dist/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v3.0.0 (http://www.clarketravis.com)
* TableExport.js v3.1.0 (http://www.clarketravis.com)
* Copyright 2015 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tableexport.min.js

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

5 changes: 1 addition & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ var gulp = require('gulp'),
js = require('gulp-uglify');

gulp.task('js', ['clean'], function () {
return gulp.src('./src/v3/tableexport-3.1.js')
.pipe(rename({
basename: "tableexport"
}))
return gulp.src('./src/stable/js/tableexport.js')
.pipe(gulp.dest('./dist/js/'))
.pipe(js({output: {comments: /^!|@preserve|@license|@cc_on/i}}))
.pipe(rename({
Expand Down
15 changes: 8 additions & 7 deletions src/stable/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v3.0.0 (http://www.clarketravis.com)
* TableExport.js v3.1.0 (http://www.clarketravis.com)
* Copyright 2015 Travis Clarke
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -40,13 +40,14 @@
data: dataURL,
name: name
}),
myFile = name + ".xlsx",
myContent = $.fn.tableExport.xlsx.buttonContent,
myClass = $.fn.tableExport.xlsx.defaultClass;
createObjButton(dataObject, myContent, myClass);
createObjButton(dataObject, myFile, myContent, myClass);
},
xls: function (rdel, name) {
var colD = $.fn.tableExport.xls.separator,
dataURL = 'data:application/vnd.ms-excel;charset=utf-8,' +
dataURL = 'data:application/vnd.ms-excel;charset=utf-16,' +
encodeURIComponent($rows.map(function (i, val) {
var $cols = $(val).find('th, td');
return $cols.map(function (i, val) {
Expand All @@ -61,7 +62,7 @@
csv: function (rdel, name) {
rdel = '"' + rdel + '"';
var colD = '"' + $.fn.tableExport.csv.separator + '"',
dataURL = 'data:text/csv;charset=utf-8,' +
dataURL = 'data:text/csv;charset=utf-16,' +
encodeURIComponent('"' + $rows.map(function (i, val) {
var $cols = $(val).find('th, td');
return $cols.map(function (i, val) {
Expand All @@ -75,7 +76,7 @@
},
txt: function (rdel, name) {
var colD = $.fn.tableExport.txt.separator,
dataURL = 'data:text/plain;charset=utf-8,' +
dataURL = 'data:text/plain;charset=utf-16,' +
encodeURIComponent($rows.map(function (i, val) {
var $cols = $(val).find('th, td');
return $cols.map(function (i, val) {
Expand Down Expand Up @@ -105,8 +106,8 @@
checkCaption(exportButton);
}

function createObjButton(dataObject, myContent, myClass) {
var exportButton = "<a href='#' data-obj='" + dataObject + "' download='" + dataObject.name + "' role='button' class='" + bootstrapClass + bootstrapTheme + myClass + "'>" + myContent + "</a>";
function createObjButton(dataObject, myFile, myContent, myClass) {
var exportButton = "<a href='#' data-obj='" + dataObject + "' download='" + myFile + "' role='button' class='" + bootstrapClass + bootstrapTheme + myClass + "'>" + myContent + "</a>";
checkCaption(exportButton);
addListener(myClass)
}
Expand Down
4 changes: 2 additions & 2 deletions src/stable/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 src/v3/tableexport-3.1.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v3.0.0 (http://www.clarketravis.com)
* TableExport.js v3.1.0 (http://www.clarketravis.com)
* Copyright 2015 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion src/v3/tableexport-3.1.min.js

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

0 comments on commit 0e72b74

Please sign in to comment.