Commit a6f2c1ff authored by Boris Kocherov's avatar Boris Kocherov

simplify array rendering

parent 016e9bfd
...@@ -598,17 +598,9 @@ ...@@ -598,17 +598,9 @@
}); });
} }
function render_array(gadget, schema, json_document, root, path, schema_path) { function render_array(gadget, schema, json_document, div_input, path, schema_path) {
var div, var input,
div_input,
input,
minItems = schema.minItems || 0; minItems = schema.minItems || 0;
div = document.createElement("div");
div.setAttribute("class", "jsonformfield");
div.title = schema.description;
div_input = document.createElement("div");
div_input.setAttribute("class", "input");
function element_append(child) { function element_append(child) {
if (child) { if (child) {
...@@ -684,8 +676,6 @@ ...@@ -684,8 +676,6 @@
// XXX update on every add/delete item // XXX update on every add/delete item
// input.hidden = maxItems !== undefined && json_document.length >= maxItems; // input.hidden = maxItems !== undefined && json_document.length >= maxItems;
div_input.appendChild(input); div_input.appendChild(input);
div.appendChild(div_input);
root.appendChild(div);
}); });
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment