diff --git a/asset-manifest.json b/asset-manifest.json
index f0f931b..f00be64 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,8 +1,8 @@
{
"files": {
"main.css": "/table-sort-js/static/css/main.0f3f41ac.chunk.css",
- "main.js": "/table-sort-js/static/js/main.b5316d8e.chunk.js",
- "main.js.map": "/table-sort-js/static/js/main.b5316d8e.chunk.js.map",
+ "main.js": "/table-sort-js/static/js/main.0dcd68c8.chunk.js",
+ "main.js.map": "/table-sort-js/static/js/main.0dcd68c8.chunk.js.map",
"runtime-main.js": "/table-sort-js/static/js/runtime-main.0ab85869.js",
"runtime-main.js.map": "/table-sort-js/static/js/runtime-main.0ab85869.js.map",
"static/js/2.6f1221a6.chunk.js": "/table-sort-js/static/js/2.6f1221a6.chunk.js",
@@ -15,6 +15,6 @@
"static/js/runtime-main.0ab85869.js",
"static/js/2.6f1221a6.chunk.js",
"static/css/main.0f3f41ac.chunk.css",
- "static/js/main.b5316d8e.chunk.js"
+ "static/js/main.0dcd68c8.chunk.js"
]
}
\ No newline at end of file
diff --git a/index.html b/index.html
index e8fea36..6820c37 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
Manual testing of table sort js
Last Name | First Name | Birth Date | Employee ID | Department | Runtime | File Size | data-sort days | dates in dd/mm/yyyy | file version |
---|
Franklin | Benjamin | 1706-1-17 | 1 | k-level | 1h 1m 17s | 10b | Tuesday | 17/6/1978 | 1.18.1 |
da Vinci | Zarlo | 1452-4-15 | 13000 | | 1m 45s | 192038998987021b | Wednesday | 18/10/2027 | 239.123.23 |
Statham | Jason | 1967-7-26 | | HR | 11m 40s | 134809b | Friday | 4/9/2008 | 3423.342.34 |
Micheal | Angelo | 1958-8-21 | 54 | Marketing | 29s | 30980980b | Thursday | 2/3/1879 | 890.93.908 |
Ben | | 1994/9/23 | 134 | Marketing | 41s | 902938402398b | Monday | 8/6/1978 | 2/3/1879 |
Testing table containing colspan and data-sort and multiple tbodies
| Category | Show | Overall | On Our Dates | On Our Dates | First Sold Out |
---|
|
| Comedy | Show 1 | 18/25 | 72% | 3/4 | 75% | 2 | 1999-7-30 | | Music | Show 2 | 6/10 | 60% | 3/4 | 8 | 75% | 1999-8-04 |
| Theatre | Show 3 | 7/15 | 47% | 3/4 | 75% | 2.12 | 1999-7-19 |
| Comedy | 4 | 10/15 | 67% | 2/3 | 67% | 2.13 | 1999-7-19 |
| Comedy | 5 | 9/12 | 75% | 1/2 | 50% | 2.83 | 1999-7-29 |
| Comedy | 6 | 16/24 | 67% | 2/4 | 50% | 2.83 | 1999-7-26 |
| Comedy | 7 | 16/26 | 62% | 2/4 | 50% | 2.03 | 2022-7-31 |
Last Name | First Name | Birth Date | Employee ID | Department | Runtime | File Size | data-sort days | dates in dd/mm/yyyy |
---|
Franklin | Benjamin | 1706-1-17 | 1,000.00 | k-level | 1h 1m 17s | 10b | Tuesday | 17/6/1978 |
da Vinci | Zarlo | 1452-4-15 | -9,000.21 | | 1m 45s | 192038998987021b | Wednesday | 18/10/2027 |
Statham | Jason | 1967-7-26 | 55,990.23 | HR | 11m 40s | 134809b | Friday | 4/9/2008 |
Micheal | Angelo | 1958-8-21 | 1,000,000.23 | Marketing | 29s | 30980980b | Thursday | 2/3/1879 |
Ben | | 1994/9/23 | 90102 | Marketing | 41s | 902938402398b | Monday | 8/6/1978 |
Last Name | First Name | Birth Date | Employee ID | Department | Runtime | File Size | data-sort days | dates in dd/mm/yyyy |
---|
Franklin | Benjamin | 1706-1-17 | 1 | k-level | 1h 1m 17s | 10b | Tuesday | 17/6/1978 |
da Vinci | Zarlo | 1452-4-15 | 13000 | | 1m 45s | 192038998987021b | Wednesday | 18/10/2027 |
Statham | Jason | 1967-7-26 | | HR | 11m 40s | 134809b | Friday | 4/9/2008 |
Micheal | Angelo | 1958-8-21 | 54 | Marketing | 29s | 30980980b | Thursday | 2/3/1879 |
Ben | | 1994/9/23 | 134 | Marketing | 41s | 902938402398b | Monday | 8/6/1978 |
\ No newline at end of file
+Manual testing of table sort js
Last Name | First Name | Birth Date | Employee ID | Department | Runtime | File Size | data-sort days | dates in dd/mm/yyyy | file version |
Franklin | Benjamin | 1706-1-17 | 1 | k-level | 1h 1m 17s | 10b | Tuesday | 17/6/1978 | 1.18.1 |
da Vinci | Zarlo | 1452-4-15 | 13000 | | 1m 45s | 192038998987021b | Wednesday | 18/10/2027 | 239.123.23 |
Statham | Jason | 1967-7-26 | | HR | 11m 40s | 134809b | Friday | 4/9/2008 | 3423.342.34 |
Micheal | Angelo | 1958-8-21 | 54 | Marketing | 29s | 30980980b | Thursday | 2/3/1879 | 890.93.908 |
Ben | | 1994/9/23 | 134 | Marketing | 41s | 902938402398b | Monday | 8/6/1978 | 2/3/1879 |
Testing table containing colspan and data-sort and multiple tbodies
| Category | Show | Overall | On Our Dates | On Our Dates | First Sold Out |
---|
|
| Comedy | Show 1 | 18/25 | 72% | 3/4 | 75% | 2 | 1999-7-30 | | Music | Show 2 | 6/10 | 60% | 3/4 | 8 | 75% | 1999-8-04 |
| Theatre | Show 3 | 7/15 | 47% | 3/4 | 75% | 2.12 | 1999-7-19 |
| Comedy | 4 | 10/15 | 67% | 2/3 | 67% | 2.13 | 1999-7-19 |
| Comedy | 5 | 9/12 | 75% | 1/2 | 50% | 2.83 | 1999-7-29 |
| Comedy | 6 | 16/24 | 67% | 2/4 | 50% | 2.83 | 1999-7-26 |
| Comedy | 7 | 16/26 | 62% | 2/4 | 50% | 2.03 | 2022-7-31 |
Last Name | First Name | Birth Date | Employee ID | Department | Runtime | File Size | data-sort days | dates in dd/mm/yyyy |
---|
Franklin | Benjamin | 1706-1-17 | 1,000.00 | k-level | 1h 1m 17s | 10b | Tuesday | 17/6/1978 |
da Vinci | Zarlo | 1452-4-15 | -9,000.21 | | 1m 45s | 192038998987021b | Wednesday | 18/10/2027 |
Statham | Jason | 1967-7-26 | 55,990.23 | HR | 11m 40s | 134809b | Friday | 4/9/2008 |
Micheal | Angelo | 1958-8-21 | 1,000,000.23 | Marketing | 29s | 30980980b | Thursday | 2/3/1879 |
Ben | | 1994/9/23 | 90102 | Marketing | 41s | 902938402398b | Monday | 8/6/1978 |
Last Name | First Name | Birth Date | Employee ID | Department | Runtime | File Size | data-sort days | dates in dd/mm/yyyy |
---|
Franklin | Benjamin | 1706-1-17 | 1 | k-level | 1h 1m 17s | 10b | Tuesday | 17/6/1978 |
da Vinci | Zarlo | 1452-4-15 | 13000 | | 1m 45s | 192038998987021b | Wednesday | 18/10/2027 |
Statham | Jason | 1967-7-26 | | HR | 11m 40s | 134809b | Friday | 4/9/2008 |
Micheal | Angelo | 1958-8-21 | 54 | Marketing | 29s | 30980980b | Thursday | 2/3/1879 |
Ben | | 1994/9/23 | 134 | Marketing | 41s | 902938402398b | Monday | 8/6/1978 |
\ No newline at end of file
diff --git a/static/js/main.0dcd68c8.chunk.js b/static/js/main.0dcd68c8.chunk.js
new file mode 100644
index 0000000..19c382c
--- /dev/null
+++ b/static/js/main.0dcd68c8.chunk.js
@@ -0,0 +1,2 @@
+(this["webpackJsonptable-sort-js"]=this["webpackJsonptable-sort-js"]||[]).push([[0],{52:function(t,e,s){},62:function(t,e,s){"use strict";s.r(e);var c=s(0),a=s(23),r=s.n(a),i=s(24),o=s(25),n=s(29),l=s(28),d=s(10),j=s.n(d),b=(s(52),s(1)),h=function(t){Object(n.a)(s,t);var e=Object(l.a)(s);function s(){var t;Object(i.a)(this,s);for(var c=arguments.length,a=new Array(c),r=0;r {\n const repos = res.data;\n this.setState({ repos });\n });\n axios\n .get(\n `https://api.github.com/users/leewannacott?client_id=${process.env.REACT_APP_GITHUB_CLIENT_ID}&client_secret${process.env.REACT_APP_GITHUB_CLIENT_SECRET}`\n )\n .then((res) => {\n const user = res.data;\n this.setState({ user });\n });\n axios\n .get(\n `https://api.github.com/users/leewannacott/starred?client_id=${process.env.REACT_APP_GITHUB_CLIENT_ID}&client_secret${process.env.REACT_APP_GITHUB_CLIENT_SECRET}`\n )\n .then((res) => {\n const stars = res.data;\n this.setState({ stars });\n });\n }\n\n render() {\n return (\n \n
\n
\n
\n
\n
\n \n\n
\n
\n \n {\"Following: \" + this.state.user.following + \" \"}\n
\n {\"Followers: \" + this.state.user.followers + \" \"}\n
\n {\"Repositories: \" + this.state.user.public_repos}\n
\n {\"Stars: \" + this.state.stars.length + \" \"}\n
\n \n
\n
![\"GitHub](\"https://media.xconomy.com/wordpress/wp-content/images/2016/06/06161811/github-logo.jpg\"\n)
\n
\n
\n
\n Statistics on public repositories pulled from the GitHub API v3:\n
\n
\n
\n \n \n Repository Name | \n Language | \n Created | \n Description | \n Forks | \n Open issues | \n Watchers | \n Sktars | \n Size (MB) | \n
\n \n \n {this.state.repos.map((repo) => (\n \n \n {repo.name}\n | \n {repo.language} | \n \n {\" \"}\n {repo.created_at.split(\"-\")[0] +\n \"-\" +\n repo.created_at.split(\"-\")[1]}\n | \n {repo.description} | \n {repo.forks} | \n {repo.open_issues} | \n {repo.watchers} | \n {repo.stargazers_count} | \n {repo.size * 1000 + \"B\"} | \n
\n ))}\n \n
\n
\n
\n
\n );\n }\n}\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport TestTable from \"./test-table\";\nimport { BrowserRouter, Route } from \"react-router-dom\";\n\nReactDOM.render(\n \n \n \n ,\n\n document.getElementById(\"display\")\n);\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/static/js/main.b5316d8e.chunk.js b/static/js/main.b5316d8e.chunk.js
deleted file mode 100644
index dd1fa7d..0000000
--- a/static/js/main.b5316d8e.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(this["webpackJsonptable-sort-js"]=this["webpackJsonptable-sort-js"]||[]).push([[0],{52:function(t,e,s){},62:function(t,e,s){"use strict";s.r(e);var c=s(0),a=s(23),r=s.n(a),i=s(24),o=s(25),n=s(29),l=s(28),d=s(10),j=s.n(d),b=(s(52),s(1)),h=function(t){Object(n.a)(s,t);var e=Object(l.a)(s);function s(){var t;Object(i.a)(this,s);for(var c=arguments.length,a=new Array(c),r=0;r {\n const repos = res.data;\n this.setState({ repos });\n });\n axios\n .get(\n `https://api.github.com/users/leewannacott?client_id=${process.env.REACT_APP_GITHUB_CLIENT_ID}&client_secret${process.env.REACT_APP_GITHUB_CLIENT_SECRET}`\n )\n .then((res) => {\n const user = res.data;\n this.setState({ user });\n });\n axios\n .get(\n `https://api.github.com/users/leewannacott/starred?client_id=${process.env.REACT_APP_GITHUB_CLIENT_ID}&client_secret${process.env.REACT_APP_GITHUB_CLIENT_SECRET}`\n )\n .then((res) => {\n const stars = res.data;\n this.setState({ stars });\n });\n }\n\n render() {\n return (\n \n
\n
\n
\n
\n
\n \n\n
\n
\n \n {\"Following: \" + this.state.user.following + \" \"}\n
\n {\"Followers: \" + this.state.user.followers + \" \"}\n
\n {\"Repositories: \" + this.state.user.public_repos}\n
\n {\"Stars: \" + this.state.stars.length + \" \"}\n
\n \n
\n
![\"GitHub](\"https://media.xconomy.com/wordpress/wp-content/images/2016/06/06161811/github-logo.jpg\"\n)
\n
\n
\n
\n Statistics on public repositories pulled from the GitHub API v3:\n
\n
\n
\n \n \n Repository Name | \n Language | \n Created | \n Description | \n Forks | \n Open issues | \n Watchers | \n Sktars | \n Size (MB) | \n
\n \n \n {this.state.repos.map((repo) => (\n \n \n {repo.name}\n | \n {repo.language} | \n \n {\" \"}\n {repo.created_at.split(\"-\")[0] +\n \"-\" +\n repo.created_at.split(\"-\")[1]}\n | \n {repo.description} | \n {repo.forks} | \n {repo.open_issues} | \n {repo.watchers} | \n {repo.stargazers_count} | \n {repo.size * 1000 + \"B\"} | \n
\n ))}\n \n
\n
\n
\n
\n );\n }\n}\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport TestTable from \"./test-table\";\nimport { BrowserRouter, Route } from \"react-router-dom\";\n\nReactDOM.render(\n \n \n \n ,\n\n document.getElementById(\"display\")\n);\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/table-sort.js b/table-sort.js
index 345a4bf..54aca82 100644
--- a/table-sort.js
+++ b/table-sort.js
@@ -125,7 +125,11 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
headers: [],
};
for (let index of table.theads.keys()) {
- table.headers.push(table.theads.item(index).querySelectorAll("th"));
+ if (table.theads.item(index).querySelectorAll("th").length == 0) {
+ table.headers.push(table.theads.item(index).querySelectorAll("td"));
+ } else {
+ table.headers.push(table.theads.item(index).querySelectorAll("th"));
+ }
}
for (let index of table.bodies.keys()) {
if (table.bodies.item(index) == null) {