summaryrefslogtreecommitdiff
path: root/app/static/js/record.js
diff options
context:
space:
mode:
authorFivePixels <o5pxels@gmail.com>2022-05-02 18:37:06 -0500
committerFivePixels <o5pxels@gmail.com>2022-05-02 18:37:06 -0500
commit746d2c2d31f47e3e475c0bf5ffbf2492db78be41 (patch)
tree6d9d0bdf6f99962fde5f86af536058821b510797 /app/static/js/record.js
parent8a8463c20da456f1ed93ba6a57460dd7a19fcefc (diff)
downloadStrengthy-746d2c2d31f47e3e475c0bf5ffbf2492db78be41.tar.xz
Strengthy-746d2c2d31f47e3e475c0bf5ffbf2492db78be41.zip
Fix indentation in record.html, update record.js logic
to add event listener to added sets, fix add sets button, update the home page href to prevent bug that sent user from /workout/record to just /workout
Diffstat (limited to 'app/static/js/record.js')
-rw-r--r--app/static/js/record.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/static/js/record.js b/app/static/js/record.js
index 3037c2f..137786e 100644
--- a/app/static/js/record.js
+++ b/app/static/js/record.js
@@ -87,11 +87,12 @@ function onClickSetCheck(elem) {
function onClickAddSet(elem) {
// Create the new row
- let tableBody = elem.parentElement.parentElement.children[1].children[1];
+ let tableBody = elem.parentElement.parentElement.children[2].children[1];
let row = tableBody.children[0].cloneNode(true);
// Add new row to table
setReset(row);
setSetid(row, tableBody.children.length)
+ row.addEventListener('keydown', handleEnterKey)
tableBody.appendChild(row)
}