Commit 460e6a96 authored by Boris Kocherov's avatar Boris Kocherov

simplify attributes set

parent 2733e960
...@@ -665,9 +665,7 @@ ...@@ -665,9 +665,7 @@
first_path + '/', first_path + '/',
schema_path schema_path
); );
div.setAttribute("data-json-path", first_path + '/');
gadget.props.arrays[first_path + '/'] = div; gadget.props.arrays[first_path + '/'] = div;
div.setAttribute("data-json-type", type);
} }
if (type === "object") { if (type === "object") {
...@@ -682,7 +680,6 @@ ...@@ -682,7 +680,6 @@
schema_path schema_path
); );
}); });
div.setAttribute("data-json-path", first_path + '/');
} }
if (input) { if (input) {
...@@ -690,8 +687,12 @@ ...@@ -690,8 +687,12 @@
// gadget.props.inputs not contain values // gadget.props.inputs not contain values
gadget.props.inputs.push(input); gadget.props.inputs.push(input);
input.name = first_path; input.name = first_path;
input.setAttribute("class", "slapos-parameter"); // XXX for gui
//input.setAttribute("class", "slapos-parameter");
div_input.appendChild(input); div_input.appendChild(input);
} else {
div.setAttribute("data-json-path", first_path + '/');
div.setAttribute("data-json-type", type);
} }
if (json_field.info !== undefined) { if (json_field.info !== undefined) {
......
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