Commit 353f772d authored by Boris Kocherov's avatar Boris Kocherov

cleanup

parent 49b09b94
...@@ -116,15 +116,13 @@ ...@@ -116,15 +116,13 @@
g.props.objects[parent_path][property_name] = scope; g.props.objects[parent_path][property_name] = scope;
form_gadget.element.setAttribute("data-json-property-name", property_name); form_gadget.element.setAttribute("data-json-property-name", property_name);
} }
// add to end of list
// element.parentNode.appendChild(form_gadget.element);
return form_gadget.renderForm({ return form_gadget.renderForm({
schema: options.schema_part, schema: options.schema_part,
document: options.default_dict, document: options.default_dict,
display_label: options.parent_type !== "array", display_label: options.parent_type !== "array",
scope: scope scope: scope
}); });
}); // XXX focus on first element subform });
} }
function render_array(gadget, json_field, default_array, root, path) { function render_array(gadget, json_field, default_array, root, path) {
...@@ -561,7 +559,7 @@ ...@@ -561,7 +559,7 @@
}); });
} }
function getContentAndPushArray(scope, parent_scope) { function getContentAndPushArray(scope, parent_path) {
queue queue
.push(function () { .push(function () {
return g.getDeclaredGadget(scope); return g.getDeclaredGadget(scope);
...@@ -570,10 +568,10 @@ ...@@ -570,10 +568,10 @@
return gadget.getContent(); return gadget.getContent();
}) })
.push(function (jdict) { .push(function (jdict) {
var arr = convertOnMultiLevel(multi_level_dict, parent_scope); var arr = convertOnMultiLevel(multi_level_dict, parent_path);
if (!(arr instanceof Array)) { if (!(arr instanceof Array)) {
arr = []; arr = [];
convertOnMultiLevel(multi_level_dict, parent_scope, arr); convertOnMultiLevel(multi_level_dict, parent_path, arr);
} }
arr.push(jdict); arr.push(jdict);
}); });
......
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