summaryrefslogtreecommitdiff
path: root/app/templates/workout
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonail.com>2022-04-18 17:39:01 -0500
committerstilbruch <stilbruch@protonail.com>2022-04-18 17:39:01 -0500
commitb4fd832e44d2cc9ff151ee2fdb6575bb888b0656 (patch)
tree8a29cd15e8886c9d01fc0e37cf27e7cebd955646 /app/templates/workout
parent05d7b80e092f9a3699fedfb08b85812d57cef0e8 (diff)
parentb16c2b562dc17748e5ab9423ef0f364662287eab (diff)
downloadStrengthy-b4fd832e44d2cc9ff151ee2fdb6575bb888b0656.tar.xz
Strengthy-b4fd832e44d2cc9ff151ee2fdb6575bb888b0656.zip
Merge branch 'master' of stilbruch.xyz:strengthy
Diffstat (limited to 'app/templates/workout')
-rw-r--r--app/templates/workout/create.html36
1 files changed, 18 insertions, 18 deletions
diff --git a/app/templates/workout/create.html b/app/templates/workout/create.html
index 72a056f..7446ec6 100644
--- a/app/templates/workout/create.html
+++ b/app/templates/workout/create.html
@@ -50,22 +50,20 @@
</div>
{% endfor %}
</div>
-<div class="field is-grouped is-grouped-right">
- <p class="buttons">
- <p id="add" class="button is-primary">
- <span class="icon is-small">
- <i class="fa fa-plus"></i>
- </span>
- <span>Add Exercise</span>
- </p>
-
- <button class="button is-success ">
- <span class="icon is-small">
- <i class="fa fa-check"></i>
- </span>
- <span>Create Workout</span>
- </button>
- </p>
+<div class="field is-horizontal is-grouped is-grouped-right">
+ <p id="add" class="button is-primary">
+ <span class="icon is-small">
+ <i class="fa fa-plus"></i>
+ </span>
+ </p>
+</div>
+<div class="field is-horizontal is-grouped is-grouped-right">
+ <button class="button is-success ">
+ <span class="icon is-small">
+ <i class="fa fa-check"></i>
+ </span>
+ <span>Create Workout</span>
+ </button>
</div>
<script>
@@ -92,8 +90,10 @@
}
function handleDel(elem) {
- // TODO: Make sure this isn't the last row
- elem.parentNode.parentNode.remove();
+ if (elem.parentNode.parentNode.parentNode.children.length > 1) {
+ console.log(elem.parentNode.parentNode.parentNode);
+ elem.parentNode.parentNode.remove();
+ }
}
document.getElementById("add").onclick = handleAdd;
</script>