diff --git a/domain-server/resources/web/settings/js/settings.js b/domain-server/resources/web/settings/js/settings.js index 2c42699523..3b8da0a849 100644 --- a/domain-server/resources/web/settings/js/settings.js +++ b/domain-server/resources/web/settings/js/settings.js @@ -1163,8 +1163,6 @@ function makeTable(setting, keypath, setting_value) { var isNonDeletableRow = !setting.can_add_new_rows; - // console.log(setting); - _.each(setting.columns, function(col) { var colValue, colName; @@ -1185,24 +1183,6 @@ function makeTable(setting, keypath, setting_value) { "" + ""; - } else if (isArray && col.type === "select" ) { - - //console.log("adding row"); - //console.log(col); - //console.log(setting); - - html += - "" + - ""; - html += ""; - - } else if (isArray && col.type === "time" && col.editable) { html += "" + @@ -1302,13 +1282,8 @@ function makeTableHiddenInputs(setting, initialValues, categoryValue) { "name='" + col.name + "'" + (defaultValue ? " checked" : "") + "/>" + ""; } else if (col.type === "select") { - - console.log(col); - console.log(setting); - console.log(categoryValue); - html += "" - html += "'" for(var i in col.options) { var option = col.options[i]; @@ -1316,8 +1291,7 @@ function makeTableHiddenInputs(setting, initialValues, categoryValue) { } html += ""; - html += ""; - + html += ""; } else { html += " 1 ? "." + key : ""); - + if (isCheckbox) { input.attr("name", newName) } else { - if(isDropdown) { + if(isDropdown) { $(element).children("select").attr("data-hidden-input", newName); } input.attr("name", newName); @@ -1467,7 +1441,6 @@ function addTableRow(row) { } else { // because the name of the setting in question requires the key // setup a hook to change the HTML name of the element whenever the key changes - var colName = $(element).attr("name"); keyInput.on('change', function(){ input.attr("name", setting_name + "." + $(this).val() + "." + colName); @@ -1478,6 +1451,12 @@ function addTableRow(row) { input.focus(); focusChanged = true; } + + // if we are adding a dropdown, we should go ahead and make its select + // element is visible + if(isDropdown) { + $(element).children("select").attr("style", ""); + } if (isCheckbox) { $(input).find("input").attr("data-changed", "true");