From 98925e4adbbc44dc1554ed2e5bfbd83dd7946651 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 9 Oct 2014 14:34:05 -0700 Subject: [PATCH] handle removal of last row and removal of hidden input for empty array --- domain-server/resources/web/js/settings.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/domain-server/resources/web/js/settings.js b/domain-server/resources/web/js/settings.js index ce8352e35c..385759b79c 100644 --- a/domain-server/resources/web/js/settings.js +++ b/domain-server/resources/web/js/settings.js @@ -425,6 +425,9 @@ function addTableRow(add_glyphicon) { if (isArray) { updateDataChangedForSiblingRows(row, true) + + // the addition of any table row should remove the empty-array-row + row.siblings('.empty-array-row').remove() } badgeSidebarForDifferences($(table)) @@ -451,6 +454,9 @@ function deleteTableRow(delete_glyphicon) { // this is the last row, we can't remove it completely since we need to post an empty array row.empty() + row.removeClass('new-row row-data') + row.addClass('empty-array-row') + row.html(""); }