diff --git a/domain-server/resources/web/js/settings.js b/domain-server/resources/web/js/settings.js index 4c2da87887..ff10c84d44 100644 --- a/domain-server/resources/web/js/settings.js +++ b/domain-server/resources/web/js/settings.js @@ -82,10 +82,7 @@ $(document).ready(function(){ $(window).resize(resizeFn); }) - $('#settings-form').on('click', '.add-row', function(){ - console.log("add-row " + $(this)) - var row = $(this).parents("tr") var data = row.parent().children(".data") @@ -146,7 +143,11 @@ $(document).ready(function(){ } else { span.remove() } - } else if($(element).hasClass("data") || $(element).hasClass("key")) { // Hide inputs + } else if ($(element).hasClass("key")) { + var input = $(element).children("input") + $(element).html(input.val()) + input.remove() + } else if($(element).hasClass("data")) { // Hide inputs var input = $(element).children("input") input.attr("type", "hidden") input.attr("name", full_name + "." + $(element).attr("name")) @@ -159,18 +160,15 @@ $(document).ready(function(){ } }) row.parent().append(input_clone) - //showAlertMessage("Row added", true) + showAlertMessage("Row added", true) }) $('#settings-form').on('click', '.del-row', function(){ - console.log("del-row " + $(this)) - var row = $(this).parents("tr") row.empty() row.html(""); }) - $('#settings-form').on('change', '.setting-input', function(){ // this input was changed, add the changed data attribute to it $(this).attr('data-changed', true)