From b016a75ef69f1bb48e2cb04d4744299759f1b7f5 Mon Sep 17 00:00:00 2001
From: BonfaceKilz
Date: Tue, 24 May 2022 12:11:10 +0300
Subject: Align "Add New" button with the actions column
---
wqflask/wqflask/templates/case_attributes.html | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
(limited to 'wqflask')
diff --git a/wqflask/wqflask/templates/case_attributes.html b/wqflask/wqflask/templates/case_attributes.html
index bd72f346..1779f0a9 100644
--- a/wqflask/wqflask/templates/case_attributes.html
+++ b/wqflask/wqflask/templates/case_attributes.html
@@ -92,9 +92,6 @@
Case Attributes Reference Table
-
- Add New
-
@@ -120,6 +117,11 @@
{% endfor %}
+
+
+
+ Add New
+
@@ -167,7 +169,7 @@
{% endfor %}
-
+
{% endif %}
{% if deletions %}
Delete Existing Case Attributes
@@ -253,13 +255,13 @@
// Append table with add row form on add new button click
$(".add-new").click(function(){
$(this).attr("disabled", "disabled");
- let index = $("table tbody tr:last-child").index();
+ let index = $("table tbody tr:nth-last-child(2)").index();
let row = '' +
' ' +
' ' +
'' + actions + ' ' +
' ';
- $("table").append(row);
+ $(row).insertBefore("#addNew")
$("table tbody tr").eq(index + 1).find(".add, .edit").toggle();
});
// Add row on add button click
--
cgit v1.2.3